helics
3.5.2
|
Public Member Functions | |
SmallBuffer (const SmallBuffer &sb) | |
SmallBuffer (SmallBuffer &&sb) noexcept | |
template<typename U , typename T = std::enable_if_t<std::is_constructible_v<std::string_view, U>>> | |
SmallBuffer (U &&u) | |
SmallBuffer (const void *data, size_t size) | |
SmallBuffer (std::size_t size) | |
SmallBuffer (std::size_t size, std::byte val) | |
SmallBuffer (std::size_t size, unsigned char val) | |
~SmallBuffer () | |
SmallBuffer & | operator= (const SmallBuffer &sb) |
SmallBuffer & | operator= (SmallBuffer &&sb) noexcept |
template<typename U , typename T = std::enable_if_t<std::is_constructible_v<std::string_view, U>>> | |
SmallBuffer & | operator= (U &&u) |
std::byte * | data () const |
std::byte * | begin () |
std::byte * | end () |
const std::byte * | begin () const |
const std::byte * | end () const |
std::byte | operator[] (size_t index) const |
std::byte & | operator[] (size_t index) |
std::byte | at (size_t index) const |
std::byte & | at (size_t index) |
void | assign (const void *start, const void *end) |
void | assign (const void *start, std::size_t size) |
void | append (const void *start, const void *end) |
void | append (const void *start, std::size_t size) |
void | append (std::string_view data) |
void | push_back (char c) |
void | pop_back () |
std::string_view | to_string () const |
void | null_terminate () |
const char * | char_data () const |
void | moveAssign (void *data, std::size_t size, std::size_t capacity) |
void | spanAssign (void *data, std::size_t size, std::size_t capacity) |
void | resize (size_t size) |
void | resize (size_t size, std::byte val) |
void | reserve (size_t size) |
void | lock (bool lockStatus=true) |
bool | isLocked () const |
std::int8_t | errorState () const |
bool | empty () const |
std::size_t | size () const |
std::size_t | capacity () const |
void | clear () |
void | swap (SmallBuffer &sb2) noexcept |
std::byte * | release () |
Public Attributes | |
std::uint32_t | userKey {0} |
|
inlineexplicit |
create a buffer with a specific size
References size().
|
inline |
create a buffer with a specific size and contents
References size().
|
inline |
create a buffer with a specific size and contents
References size().
|
inline |
destructor
|
inline |
assign some data to the SmallBuffer
References end().
Referenced by helics::PublicationInfo::CheckSetValue(), helics::ActionMessage::fromByteArray(), helics::CommonCore::send(), helics::CommonCore::sendAt(), helics::CommonCore::sendTo(), helics::CommonCore::sendToAt(), and helics::CommonCore::setValue().
|
inline |
get a value reference at a particular index with bounds checking
|
inline |
get the value at a particular index with bounds checking
|
inline |
get the start of the data
|
inline |
get a const iterator
|
inline |
get the current capacity of the buffer
Referenced by moveAssign(), and spanAssign().
|
inline |
get a pointer to the data as a char *
|
inline |
clear the buffer
|
inline |
return a pointer to the data location
Referenced by moveAssign(), spanAssign(), and helics::ActionMessage::toByteArray().
|
inline |
check if the buffer is empty
Referenced by helics::Message::isValid().
|
inline |
end iterator
Referenced by assign().
|
inline |
get a const end iterator
|
inline |
get the error condition
|
inline |
move raw memory into the buffer and give it a preallocated buffer
References capacity(), data(), and size().
|
inline |
ensure there is a null terminator after the last buffer character
|
inline |
get an assignable reference to an element
|
inline |
get an element
|
inline |
release the memory from ownership
|
inline |
get the current size of the buffer
Referenced by moveAssign(), helics::prettyPrintString(), helics::ActionMessage::serializedByteCount(), SmallBuffer(), spanAssign(), and helics::ActionMessage::toByteArray().
|
inline |
use other managed memory
References capacity(), data(), and size().
|
inlinenoexcept |
swap function
Referenced by helics::Message::swap().
|
inline |
interpret the data as a string
Referenced by helics::PublicationInfo::CheckSetValue(), helics::ActionMessage::name(), helics::operator!=(), helics::operator==(), helics::BrokerBase::processBaseCommands(), helics::FederateState::sendCommand(), helics::ActionMessage::to_json_string(), and helics::Message::to_string().