#include <OnixS/Eurex/MarketData/StringRef.h>
Public Types | |
typedef const char * | ConstIterator |
Public Member Functions | |
StringRef () | |
StringRef (const char *chars, size_t size) | |
StringRef (const StringRef &other) | |
StringRef (const std::string &stdStr) | |
StringRef (const char *cStr) | |
bool | empty () const |
const char * | data () const |
ConstIterator | begin () const |
ConstIterator | end () const |
size_t | size () const |
void | reset () |
void | reset (const char *chars, size_t size) |
const char & | operator[] (size_t index) const |
const char & | at (size_t index) const |
template<typename NumericType > | |
bool | toNumber (NumericType &number) const |
void | toString (std::string &str) const |
std::string | toString () const |
bool | operator== (const StringRef &other) const |
bool | operator!= (const StringRef &other) const |
StringRef & | operator= (const StringRef &other) |
void | swap (StringRef &other) |
Provides efficient way of accessing text-based FIX field values.
By default, OnixS::FIX::Message and OnixS::FIX::GroupInstance classes convert all values assigned to the fields into their text presentations and store textual data. This approach optimizes message reuse when same instance of message is used to update a few fields and is sent over FIX session multiple times. Also, when message comes from the network and is deserialized from its raw (tag=value) presentation, all field values in fact represent segments of text. To have access to textual values, StringRef class was added together with new access members (FieldSet::getStringRef()). If value is accessed using FieldSet::getStringRef() member, instance of StringRef class is returned. That instance holds reference to a read-only segment of text. An important aspect is that no memory is allocated and copied while accessing field values that way.
Definition at line 51 of file StringRef.h.
typedef const char* ConstIterator |
Immutable iterator over chars.
Definition at line 57 of file StringRef.h.
|
inline |
Initializes blank instance.
Definition at line 60 of file StringRef.h.
|
inline |
Full initialization.
Definition at line 67 of file StringRef.h.
Initializes as clone of other instance. Data referenced by clone is not copied. Instead both instances will refer to same text segment.
Definition at line 78 of file StringRef.h.
|
inlineexplicit |
Initializes instance from string content.
Definition at line 86 of file StringRef.h.
|
inline |
Initializes instance from zero-terminated string.
Definition at line 93 of file StringRef.h.
|
inline |
Definition at line 152 of file StringRef.h.
|
inline |
STL-like begin().
Definition at line 112 of file StringRef.h.
|
inline |
Read-only content.
Definition at line 106 of file StringRef.h.
|
inline |
Indicates whether array of zero length.
Definition at line 100 of file StringRef.h.
|
inline |
STL-like end().
Definition at line 118 of file StringRef.h.
|
inline |
Compares with another instance.
Definition at line 201 of file StringRef.h.
Reinitializes from another instance.
Definition at line 213 of file StringRef.h.
|
inline |
Compares with another instance.
Definition at line 189 of file StringRef.h.
|
inline |
Definition at line 146 of file StringRef.h.
|
inline |
Resets reference to nothing.
Definition at line 130 of file StringRef.h.
|
inline |
Updates data being referenced.
Definition at line 137 of file StringRef.h.
|
inline |
Number of chars.
Definition at line 124 of file StringRef.h.
|
inline |
Swaps content with other instance.
Definition at line 224 of file StringRef.h.
|
inline |
Returns number if text is string representation of an integer.
Definition at line 167 of file StringRef.h.
|
inline |
Definition at line 175 of file StringRef.h.
|
inline |
Definition at line 182 of file StringRef.h.