OnixS C++ CME Market Data Handler  5.4.0
API documentation
StrRef Class Reference

#include <OnixS/CME/MDH/String.h>

Public Types

typedef const CharIterator
 

Public Member Functions

 StrRef ()
 
 StrRef (const Char *chars, size_t size)
 
 StrRef (const StrRef &other)
 
bool empty () const
 
const Charitems () const
 
size_t size () const
 
Iterator begin () const
 
Iterator end () const
 
void reset ()
 
void reset (const Char *chars, size_t size)
 
const Charoperator[] (size_t index) const
 
const Charat (size_t index) const
 
StrRefoperator= (const StrRef &other)
 
void swap (StrRef &other)
 

Detailed Description

Provides efficient way of accessing text-based values without copying content of the text being referred.

Definition at line 41 of file String.h.

Member Typedef Documentation

typedef const Char* Iterator

STL-like iterator.

Definition at line 51 of file String.h.

Constructor & Destructor Documentation

StrRef ( )
inline

Initializes the instance referring to nothing.

Definition at line 54 of file String.h.

StrRef ( const Char chars,
size_t  size 
)
inline

Explicit reference initialization.

Definition at line 61 of file String.h.

StrRef ( const StrRef other)
inline

Initializes as the clone of other instance. Data referenced by the instance is not copied. Instead both instances will refer to same text.

Definition at line 72 of file String.h.

Member Function Documentation

const Char& at ( size_t  index) const
inline

Provides bound-checked per-item access.

Definition at line 136 of file String.h.

Iterator begin ( ) const
inline

STL-like begin().

Definition at line 98 of file String.h.

bool empty ( ) const
inline

Indicates whether the referenced text is empty.

Definition at line 80 of file String.h.

Iterator end ( ) const
inline

STL-like end().

Definition at line 104 of file String.h.

const Char* items ( ) const
inline

Read-only content.

Definition at line 86 of file String.h.

StrRef& operator= ( const StrRef other)
inline

Reinitializes from the other instance.

Definition at line 147 of file String.h.

const Char& operator[] ( size_t  index) const
inline

Provides per-item access.

Definition at line 128 of file String.h.

void reset ( )
inline

Resets the reference to nothing.

Definition at line 110 of file String.h.

void reset ( const Char chars,
size_t  size 
)
inline

Updates the given instance to refer to the new text.

Definition at line 118 of file String.h.

size_t size ( ) const
inline

Number of chars.

Definition at line 92 of file String.h.

void swap ( StrRef other)
inline

Swaps content with the other instance.

Definition at line 158 of file String.h.


The documentation for this class was generated from the following file: