82 public Basic_blob<std::allocator<uint8_t>, SHARING>
275 template<
typename Emit_blob_func>
291 template<
typename Blob_container>
308 template<
typename Blob_ptr_container>
392template<
bool SHARING>
394 log::Log_context(logger_ptr,
Base::S_LOG_COMPONENT)
400template<
bool SHARING>
402 log::Log_context(logger_ptr,
Base::S_LOG_COMPONENT),
403 Base(size, get_logger())
408template<
bool SHARING>
411 log::Log_context(logger_ptr,
Base::S_LOG_COMPONENT),
412 Base(size, coa_tag, get_logger())
417template<
bool SHARING>
420 Base(std::move(moved_src), get_logger())
425template<
bool SHARING>
427 log::Log_context(static_cast<const log::Log_context&>(src)),
428 Base(src, get_logger())
433template<
bool SHARING>
442template<
bool SHARING>
448 Log_context::operator=(
static_cast<const Log_context&
>(src));
449 Base::assign(src, get_logger());
453template<
bool SHARING>
459 Log_context::operator=(
static_cast<Log_context&&
>(std::move(moved_src)));
460 Base::assign(std::move(moved_src), get_logger());
464template<
bool SHARING>
472 swap(*
static_cast<Log_context*
>(
this),
static_cast<Log_context&
>(other));
477template<
bool SHARING>
480 return blob1.swap(blob2);
483template<
bool SHARING>
487 static_cast<Base&
>(blob) = Base::share(get_logger());
491template<
bool SHARING>
496 static_cast<Base&
>(blob) = Base::share_after_split_left(lt_size, get_logger());
500template<
bool SHARING>
505 static_cast<Base&
>(blob) = Base::share_after_split_right(rt_size, get_logger());
509template<
bool SHARING>
510template<
typename Emit_blob_func>
512 Emit_blob_func&& emit_blob_func)
514 Base::share_after_split_equally_impl(size, headless_pool, std::move(emit_blob_func), get_logger(),
518 assert(logger_ptr == get_logger());
519 return share_after_split_left(lt_size);
523template<
bool SHARING>
524template<
typename Blob_container>
526 Blob_container* out_blobs_ptr)
530 assert(out_blobs_ptr);
533 out_blobs_ptr->push_back(std::move(blob_moved));
537template<
bool SHARING>
538template<
typename Blob_ptr_container>
541 Blob_ptr_container* out_blobs_ptr)
546 using Ptr =
typename Blob_ptr_container::value_type;
548 assert(out_blobs_ptr);
556template<
bool SHARING>
559 Base::reserve(new_capacity, get_logger());
562template<
bool SHARING>
565 Base::reserve(new_capacity, coa_tag, get_logger());
568template<
bool SHARING>
571 Base::resize(new_size, new_start_or_unchanged, get_logger());
574template<
bool SHARING>
578 Base::resize(new_size, coa_tag, new_start_or_unchanged, get_logger());
581template<
bool SHARING>
584 Base::make_zero(get_logger());
587template<
bool SHARING>
591 return Base::assign_copy(src, get_logger());
594template<
bool SHARING>
598 return Base::emplace_copy(dest, src, get_logger());
601template<
bool SHARING>
605 return Base::sub_copy(src, dest, get_logger());
Convenience class that simply stores a Logger and/or Component passed into a constructor; and returns...
Interface that the user should implement, passing the implementing Logger into logging classes (Flow'...
A hand-optimized and API-tweaked replacement for vector<uint8_t>, i.e., buffer of bytes inside an all...
std::allocator< uint8_t > Allocator_raw
Short-hand for the allocator type specified at compile-time. Its element type is our value_type.
value_type const * Const_iterator
Type for iterator pointing into an immutable structure of this type.
value_type * Iterator
Type for iterator pointing into a mutable structure of this type.
size_type capacity() const
Returns the number of elements in the internally allocated buffer, which is 1 or more; or 0 if no buf...
const value_type & const_reference
For container compliance (hence the irregular capitalization): reference to const element.
std::size_t size_type
Type for index into blob or length of blob or sub-blob.
Iterator pointer
For container compliance (hence the irregular capitalization): pointer to element.
Iterator iterator
For container compliance (hence the irregular capitalization): Iterator type.
value_type & reference
For container compliance (hence the irregular capitalization): reference to element.
static constexpr bool S_IS_VANILLA_ALLOC
true if Allocator_raw underlying allocator template is simply std::allocator; false otherwise.
static constexpr size_type S_UNCHANGED
Special value indicating an unchanged size_type value; such as in resize().
uint8_t value_type
Short-hand for values, which in this case are unsigned bytes.
Const_iterator const_pointer
For container compliance (hence the irregular capitalization): pointer to const element.
std::ptrdiff_t difference_type
Type for difference of size_types.
Const_iterator const_iterator
For container compliance (hence the irregular capitalization): Const_iterator type.
static constexpr bool S_SHARING
Value of template parameter SHARING (for generic programming).
size_type size() const
Returns number of elements stored, namely end() - begin().
Basic_blob that works in regular heap (and is itself placed in heap or stack) and memorizes a log::Lo...
typename Base::iterator iterator
Short-hand for base member (needed because base access to a template must be qualified otherwise).
typename Base::pointer pointer
Short-hand for base member (needed because base access to a template must be qualified otherwise).
void swap(Blob_with_log_context &other) noexcept
On top of the similar Basic_blob method, logs using the stored log context.
typename Base::value_type value_type
Short-hand for base member (needed because base access to a template must be qualified otherwise).
static constexpr auto S_IS_VANILLA_ALLOC
Short-hand for base member (needed because base access to a template must be qualified otherwise).
size_type assign_copy(const boost::asio::const_buffer &src)
On top of the similar Basic_blob method, logs using the stored log context.
void share_after_split_equally(size_type size, bool headless_pool, Emit_blob_func &&emit_blob_func)
On top of the similar Basic_blob method, logs using the stored log context and copies it to the emitt...
static constexpr auto S_UNCHANGED
Short-hand for base member (needed because base access to a template must be qualified otherwise).
typename Base::const_pointer const_pointer
Short-hand for base member (needed because base access to a template must be qualified otherwise).
void make_zero()
On top of the similar Basic_blob method, logs using the stored log context.
Const_iterator sub_copy(Const_iterator src, const boost::asio::mutable_buffer &dest) const
On top of the similar Basic_blob method, logs using the stored log context.
void resize(size_type size, size_type start_or_unchanged=S_UNCHANGED)
On top of the similar Basic_blob method, logs using the stored log context.
typename Base::Iterator Iterator
Short-hand for base member (needed because base access to a template must be qualified otherwise).
Blob_with_log_context share() const
On top of the similar Basic_blob method, logs using the stored log context and copies it to the retur...
typename Base::Allocator_raw Allocator_raw
Short-hand for base member (needed because base access to a template must be qualified otherwise).
typename Base::difference_type difference_type
Short-hand for base member (needed because base access to a template must be qualified otherwise).
Blob_with_log_context share_after_split_right(size_type size)
On top of the similar Basic_blob method, logs using the stored log context and copies it to the retur...
typename Base::const_reference const_reference
Short-hand for base member (needed because base access to a template must be qualified otherwise).
void reserve(size_type capacity)
On top of the similar Basic_blob method, logs using the stored log context.
static constexpr auto S_SHARING
Short-hand for base member (needed because base access to a template must be qualified otherwise).
Iterator emplace_copy(Const_iterator dest, const boost::asio::const_buffer &src)
On top of the similar Basic_blob method, logs using the stored log context.
void share_after_split_equally_emit_seq(size_type size, bool headless_pool, Blob_container *out_blobs)
On top of the similar Basic_blob method, logs using the stored log context and copies it to the emitt...
typename Base::Const_iterator Const_iterator
Short-hand for base member (needed because base access to a template must be qualified otherwise).
Blob_with_log_context share_after_split_left(size_type size)
On top of the similar Basic_blob method, logs using the stored log context and copies it to the retur...
typename Base::reference reference
Short-hand for base member (needed because base access to a template must be qualified otherwise).
typename Base::size_type size_type
Short-hand for base member (needed because base access to a template must be qualified otherwise).
~Blob_with_log_context()
On top of the similar Basic_blob dtor, adds some possible TRACE-logging.
Blob_with_log_context(log::Logger *logger_ptr=nullptr)
On top of the similar 2-arg Basic_blob ctor, memorizes the given log::Logger for all future logging i...
typename Base::const_iterator const_iterator
Short-hand for base member (needed because base access to a template must be qualified otherwise).
Blob_with_log_context & operator=(Blob_with_log_context &&moved_src) noexcept
On top of the similar Basic_blob method, logs using the stored log context.
void share_after_split_equally_emit_ptr_seq(size_type size, bool headless_pool, Blob_ptr_container *out_blobs)
On top of the similar Basic_blob method, logs using the stored log context and copes it to the emitte...
Flow module containing miscellaneous general-use facilities that don't fit into any other Flow module...
void swap(Blob_with_log_context< SHARING > &blob1, Blob_with_log_context< SHARING > &blob2) noexcept
On top of the similar Basic_blob related function, logs using the stored log context of blob1.
void swap(Basic_blob< Allocator, SHARING > &blob1, Basic_blob< Allocator, SHARING > &blob2, log::Logger *logger_ptr) noexcept
Equivalent to blob1.swap(blob2).
Tag type used at least in Basic_blob and Blob_with_log_context to specify that an allocated buffer be...