Flow 2.0.0
Flow project: Full implementation reference.
Classes | Namespaces | Functions
basic_blob.hpp File Reference
#include "flow/util/blob_fwd.hpp"
#include "flow/log/log.hpp"
#include <boost/interprocess/smart_ptr/shared_ptr.hpp>
#include <boost/move/make_unique.hpp>
#include <boost/compressed_pair.hpp>
#include <optional>
#include <limits>
#include <cstring>

Go to the source code of this file.

Classes

struct  flow::util::Clear_on_alloc
 Tag type used at least in Basic_blob and Blob_with_log_context to specify that an allocated buffer be zeroed. More...
 
class  flow::util::Basic_blob< Allocator, SHARING >
 A hand-optimized and API-tweaked replacement for vector<uint8_t>, i.e., buffer of bytes inside an allocated area of equal or larger size; also optionally supports limited garbage-collected memory pool functionality and SHM-friendly custom-allocator support. More...
 
class  flow::util::Basic_blob< Allocator, SHARING >::Deleter_raw
 Internal deleter functor used if and only if S_IS_VANILLA_ALLOC is false and therefore only with Buf_ptr being boost::interprocess::shared_ptr or deleter-parameterized unique_ptr. More...
 

Namespaces

namespace  flow
 Catch-all namespace for the Flow project: A collection of various production-quality modules written in modern C++17, originally by ygoldfel.
 
namespace  flow::util
 Flow module containing miscellaneous general-use facilities that don't fit into any other Flow module.
 

Functions

template<typename Allocator , bool SHARING>
void flow::util::swap (Basic_blob< Allocator, SHARING > &blob1, Basic_blob< Allocator, SHARING > &blob2, log::Logger *logger_ptr=nullptr) noexcept
 Equivalent to blob1.swap(blob2). More...
 
template<typename Allocator , bool SHARING>
bool flow::util::blobs_sharing (const Basic_blob< Allocator, SHARING > &blob1, const Basic_blob< Allocator, SHARING > &blob2)
 Returns true if and only if both given objects are not zero() == true, and they either co-own a common underlying buffer, or are the same object. More...