|
B2BITS FIX Antenna HFT
1.0.17
|
'Quick' buffer for a sequence of bytes . More...
#include <RawBuffer.h>
Public Member Functions | |
| void * | alloc (unsigned size) |
| void | append (const char v) |
| Appends the given character. More... | |
| void | append (const char *str) |
| Appends the given 'C-style' std::string. More... | |
| void | append (const std::string &str) |
| Appends the given std::string. More... | |
| void | append (const char *str, unsigned size) |
| Appends the given sequence of bytes. More... | |
| void | append (const RawBuffer *rb) |
| Append sequence bytes from the given buffer. More... | |
| void | append (const RawBuffer &rb) |
| Append sequence bytes from another buffer. More... | |
| void | assign (char *storage, unsigned capacity) |
| Assigns a buffer to the instance of RawBuffer class. More... | |
| char * | begin () throw () |
| char const * | begin () const throw () |
| unsigned | capacity () const throw () |
| Returns the storage currently allocated to hold the controlled sequence, a value at least as large as size(). More... | |
| void | clear () |
| Clears buffer's content. More... | |
| void | copy (char const *buffer, unsigned size) |
| Copies content of the buffer. More... | |
| void | dispose () |
| char * | end () throw () |
| char const * | end () const throw () |
| void | erase (unsigned n) |
| Erases n elements from the start of the buffer. More... | |
| char * | get () throw () |
| Returns buffer content. More... | |
| char const * | get () const throw () |
| Returns buffer content. More... | |
| const char * | getBuffer () const throw () |
| Returns buffer content. More... | |
| char * | getBuffer () throw () |
| Returns buffer content. More... | |
| std::string | getString () const |
| Returns std::string that contains data in buffer. More... | |
| void | insert (const char *str, unsigned size) |
| Inserts the given sequence of bytes into the start of the buffer. More... | |
| void | insert (int pos, const char *str, unsigned size) |
| Inserts the given sequence of bytes into the position pos. More... | |
| bool | operator!= (const RawBuffer &right) const throw () |
| bool | operator== (const RawBuffer &right) const |
| char | operator[] (unsigned offset) const throw () |
| char & | operator[] (unsigned offset) throw () |
| RawBuffer () | |
| Constructor. More... | |
| RawBuffer (const char *str, unsigned size) | |
| Constructor. More... | |
| RawBuffer (const std::string &str) | |
| Constructor. More... | |
| RawBuffer (const RawBuffer &rh) | |
| Copy constructor. More... | |
| char * | release () |
| The member replaces the stored pointer myptr with a null pointer. More... | |
| bool | reserve (unsigned n, int capacity_multiplier=CAPACITY_MULTIPLIER) |
| Ensures that capacity() henceforth returns at least n. More... | |
| void | resize (unsigned newSize) |
| Ensures that size() henceforth returns newSize. More... | |
| unsigned | size () const |
| Returns the length of the controlled sequence. More... | |
| void | toRaw (RawBuffer *buf) const |
| Copies buffer. More... | |
| ~RawBuffer () | |
| Destructor. More... | |
Static Public Member Functions | |
| static RawBuffer * | fromRaw (const char *buf, unsigned size) |
| Added for compatibility only. More... | |
Static Public Attributes | |
| static const int | CAPACITY_MULTIPLIER = 1 |
Friends | |
| std::ostream & | operator<< (std::ostream &os, const RawBuffer &aRB) |
'Quick' buffer for a sequence of bytes .
|
inline |
Constructor.
|
inlineexplicit |
Constructor.
References append().
|
inlineexplicit |
Constructor.
References append().
| Utils::RawBuffer::RawBuffer | ( | const RawBuffer & | rh | ) |
Copy constructor.
|
inline |
Destructor.
|
inline |
References reserve(), and size().
Referenced by ILink3BinaryMapping::convertAppMsgToBinary(), B3BinaryMapping::convertAppMsgToBinary(), fix_algo::CmiFixConverter::convertAppMsgToBinary(), B3BinaryMapping::convertSessionLevelMsgToBinary(), ILink3BinaryMapping::convertSessionLevelMsgToBinary(), CMI::convertSessionLevelMsgToBinary(), and CMI::convertToHeartbeat().
|
inline |
Appends the given character.
References reserve().
Referenced by Parser::LiteFixMessage::add(), append(), RawBuffer(), and Parser::LiteFixMessage::updateValueAtIndex().
|
inline |
Appends the given 'C-style' std::string.
References append().
|
inline |
Appends the given std::string.
References append().
|
inline |
|
inline |
Append sequence bytes from the given buffer.
References append(), getBuffer(), and size().
|
inline |
Append sequence bytes from another buffer.
References append(), getBuffer(), and size().
|
inline |
Assigns a buffer to the instance of RawBuffer class.
References capacity().
|
inline | |||||||||||||
|
inline | |||||||||||||
|
inline | |||||||||||||
|
inline |
Clears buffer's content.
|
inline |
Copies content of the buffer.
References resize().
|
inline |
|
inline | |||||||||||||
|
inline | |||||||||||||
| void Utils::RawBuffer::erase | ( | unsigned | n | ) |
Erases n elements from the start of the buffer.
|
static |
Added for compatibility only.
|
inline | |||||||||||||
Returns buffer content.
Referenced by Parser::LiteFixMessage::updateValueAtIndex(), and Parser::LiteFixMessage::updateValueAtIndexNoPadding().
|
inline | |||||||||||||
Returns buffer content.
|
inline | |||||||||||||
Returns buffer content.
Referenced by append(), B3BinaryMapping::convertMsgToBinary(), and ILink3BinaryMapping::convertMsgToBinary().
|
inline | |||||||||||||
Returns buffer content.
|
inline |
Returns std::string that contains data in buffer.
|
inline |
|
inline |
|
inline | ||||||||||||||
|
inline |
|
inline | ||||||||||||||
|
inline | ||||||||||||||
|
inline |
The member replaces the stored pointer myptr with a null pointer.
Used for aquiring full access to the stored buffer. Use free method to release memory allocated.
|
inline |
Ensures that capacity() henceforth returns at least n.
|
inline |
Ensures that size() henceforth returns newSize.
References reserve().
Referenced by copy(), Parser::LiteFixMessage::updateValueAtIndex(), and Parser::LiteFixMessage::updateValueAtIndexNoPadding().
|
inline |
Returns the length of the controlled sequence.
Referenced by alloc(), append(), fix_algo::CmiFixConverter::convertAppMsgToBinary(), B3BinaryMapping::convertMsgToBinary(), ILink3BinaryMapping::convertMsgToBinary(), fix_algo::CmiFixConverter::convertSessionLevelMsgToBinary(), insert(), Parser::LiteFixMessage::updateValueAtIndex(), and Parser::LiteFixMessage::updateValueAtIndexNoPadding().
| void Utils::RawBuffer::toRaw | ( | RawBuffer * | buf | ) | const |
Copies buffer.
Added for compatibility only.
|
friend |
|
static |
1.8.5