B2BITS FIX Antenna C++ 2.33.0
Loading...
Searching...
No Matches
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.
 
 FIXFieldValue ()
 Constructs empty sequence.
 
 FIXFieldValue (const char *data, std::size_t length)
 Constructs object from char chain.
 
 FIXFieldValue (const char *str)
 Constructs object from null-terminated C-string.
 
bool isEmpty () const
 Verifies is sequence empty.
 
bool operator!= (const FIXFieldValue &fieldValue) const
 Compares two object.
 
bool operator== (const char *val) const
 Compares with null-terminated char* std::string.
 
bool operator== (const FIXFieldValue &fieldValue) const
 Compares two object.
 
int toSigned () const
 Returns signed numeric value of sequence.
 
System::i64 toSigned64 () const
 Returns signed 64bit numeric value of sequence.
 
unsigned int toUnsigned () const
 Returns unsigned numeric value of sequence.
 
System::u64 toUnsigned64 () const
 Returns signed 64bit numeric value of sequence.
 

Static Public Member Functions

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

Public Attributes

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

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!=(), 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 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().

◆ operator==() [2/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().

◆ 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().