B2BITS FIX Antenna C++  2.31.0
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
Engine::FIXFieldValue Struct Reference

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

#include <B2BITS_FIXFieldValue.h>

Public Member Functions

void clear ()
 Resets internal storage. More...
 
 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...
 
bool isEmpty () const
 Verifies is sequence empty. More...
 
bool operator!= (const FIXFieldValue &fieldValue) const
 Compares two object. More...
 
bool operator== (const FIXFieldValue &fieldValue) const
 Compares two object. More...
 
bool operator== (const char *val) const
 Compares with null-terminated char* std::string. More...
 
int toSigned () const
 Returns signed numeric value of sequence. More...
 
System::i64 toSigned64 () const
 Returns signed 64bit numeric value of sequence. More...
 
unsigned int toUnsigned () const
 Returns unsigned numeric value of sequence. More...
 
System::u64 toUnsigned64 () const
 Returns signed 64bit numeric value of sequence. More...
 

Static Public Member Functions

static int compare (const FIXFieldValue &firstValue, const FIXFieldValue &secondValue)
 Compares two sequences in 'std::strcmp' style. More...
 

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

◆ FIXFieldValue() [1/3]

Engine::FIXFieldValue::FIXFieldValue ( )
inline

Constructs empty sequence.

Referenced by operator==().

◆ FIXFieldValue() [2/3]

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

Constructs object from null-terminated C-string.

◆ FIXFieldValue() [3/3]

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

Constructs object from char chain.

Member Function Documentation

◆ clear()

void Engine::FIXFieldValue::clear ( )

Resets internal storage.

◆ compare()

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

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

Parameters
firstValuelvalue
secondValuervalue

Referenced by operator!=(), and operator==().

◆ isEmpty()

bool Engine::FIXFieldValue::isEmpty ( ) const
inline

Verifies is sequence empty.

References length_.

◆ operator!=()

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

Compares two object.

Based on compare() member.

Parameters
fieldValueInstance of FIXFieldValue to compare with.

References compare().

◆ operator==() [1/2]

bool Engine::FIXFieldValue::operator== ( const FIXFieldValue fieldValue) const
inline

Compares two object.

Based on compare() member.

Parameters
fieldValueInstance of FIXFieldValue to compare with.

References compare().

◆ operator==() [2/2]

bool Engine::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.

References compare(), and FIXFieldValue().

◆ toSigned()

int Engine::FIXFieldValue::toSigned ( ) const

Returns signed numeric value of sequence.

◆ toSigned64()

System::i64 Engine::FIXFieldValue::toSigned64 ( ) const

Returns signed 64bit numeric value of sequence.

Exceptions
Utils::ExceptionIf value cannot be converted

◆ toUnsigned()

unsigned int Engine::FIXFieldValue::toUnsigned ( ) const

Returns unsigned numeric value of sequence.

Exceptions
Utils::ExceptionIf value cannot be converted

◆ toUnsigned64()

System::u64 Engine::FIXFieldValue::toUnsigned64 ( ) const

Returns signed 64bit numeric value of sequence.

Exceptions
Utils::ExceptionIf value cannot be converted

Member Data Documentation

◆ data_

const char* Engine::FIXFieldValue::data_

Pointer to byte array.

◆ length_

std::size_t Engine::FIXFieldValue::length_

Length of sequence.

Referenced by isEmpty().