EPAM B2BITS C++ Bovespa MarketData handler  1.28.2
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
B2bits::FIXFieldValue Struct Reference

It is used for storing the Contents information (data + length). More...

#include <b2bits/fix/FIXFieldValue.h>

Public Member Functions

 FIXFieldValue ()
 Constructs empty sequence. More...
 
 FIXFieldValue (const char *str)
 Constructs object from null-terminated C-string. More...
 
 FIXFieldValue (const char *data, std::size_t length)
 Constructs object from char chain. More...
 
void clear ()
 Resets internal storage. More...
 
bool isEmpty () const
 Verifies is sequence empty. More...
 
int toSigned () const
 Returns signed numeric value of sequence. More...
 
i64 toSigned64 () const
 
u64 toUnsigned64 () const
 
unsigned int toUnsigned () const
 
bool operator== (const FIXFieldValue &fieldValue) const
 
bool operator== (const char *val) const
 
bool operator!= (const FIXFieldValue &fieldValue) const
 

Static Public Member Functions

static int compare (const FIXFieldValue &firstValue, const FIXFieldValue &secondValue)
 

Public Attributes

const char * data_
 Pointer to byte array. More...
 
std::size_t length_
 Length of sequence. More...
 

Detailed Description

It is used for storing the Contents information (data + length).

Constructor & Destructor Documentation

B2bits::FIXFieldValue::FIXFieldValue ( )
inline

Constructs empty sequence.

B2bits::FIXFieldValue::FIXFieldValue ( const char *  str)
explicit

Constructs object from null-terminated C-string.

B2bits::FIXFieldValue::FIXFieldValue ( const char *  data,
std::size_t  length 
)
inline

Constructs object from char chain.

Member Function Documentation

void B2bits::FIXFieldValue::clear ( )
inline

Resets internal storage.

static int B2bits::FIXFieldValue::compare ( const FIXFieldValue firstValue,
const FIXFieldValue secondValue 
)
static

Compares two sequences in 'std::strcmp' style.

Parameters
firstValuelvalue
secondValuervalue
bool B2bits::FIXFieldValue::isEmpty ( ) const
inline

Verifies is sequence empty.

bool B2bits::FIXFieldValue::operator!= ( const FIXFieldValue fieldValue) const
inline

Compares two object. Based on compare() member.

Parameters
fieldValueInstance of FIXFieldValue to compare with.
bool B2bits::FIXFieldValue::operator== ( const FIXFieldValue fieldValue) const
inline

Compares two object. Based on compare() member.

Parameters
fieldValueInstance of FIXFieldValue to compare with.
bool B2bits::FIXFieldValue::operator== ( const char *  val) const
inline

Compares with null-terminated char* std::string. Based on compare() member.

Parameters
valnull-terminated std::string to compare with.
int B2bits::FIXFieldValue::toSigned ( ) const

Returns signed numeric value of sequence.

i64 B2bits::FIXFieldValue::toSigned64 ( ) const

Returns signed 64bit numeric value of sequence.

Exceptions
std:exceptionIf value cannot be converted
unsigned int B2bits::FIXFieldValue::toUnsigned ( ) const

Returns unsigned numeric value of sequence.

Exceptions
std:exceptionIf value cannot be converted
u64 B2bits::FIXFieldValue::toUnsigned64 ( ) const

Returns signed 64bit numeric value of sequence.

Exceptions
std:exceptionIf value cannot be converted

Member Data Documentation

const char* B2bits::FIXFieldValue::data_

Pointer to byte array.

std::size_t B2bits::FIXFieldValue::length_

Length of sequence.