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

Encapsulates LocalMktDate FIX type. More...

#include <b2bits/types/LocalMktDate.h>

Public Types

typedef u32 value_type
 Represents storage type for date-time value. More...
 

Public Member Functions

 LocalMktDate () noexcept
 Creates zero object. More...
 
 LocalMktDate (int year, int month, int day) noexcept
 
bool operator== (const LocalMktDate &v) const noexcept
 Compare operators. More...
 
bool operator!= (const LocalMktDate &v) const noexcept
 Compare operators. More...
 
int year () const noexcept
 Returns year part of value. More...
 
int month () const noexcept
 Returns month part of value. More...
 
int day () const noexcept
 Returns day part of value. More...
 
std::string & toFixString (std::string *dest) const
 Converts value stored in object to FIX string 'YYYYMMDD'. More...
 
char * toFixString (char *buf, char *end) const noexcept
 
u32 toDecimal () const noexcept
 Returns value in decimal format (YYYYMMDD) More...
 

Static Public Member Functions

static LocalMktDate fromFixString (AsciiString val) noexcept
 Constructs object from FIX string. More...
 
static LocalMktDate fromDecimal (u32 val) noexcept
 Constructs object from decimal date format (YYYYMMDD). More...
 
static LocalMktDate fromDecimalString (AsciiString val) noexcept
 Constructs object from Decimal string (YYYYMMDD). More...
 
static LocalMktDate fromString (AsciiString val) noexcept
 Constructs object from string. More...
 

Static Public Attributes

static unsigned int const ValueSize = sizeof( "YYYYMMDD" ) - 1
 Maximum buffer size required to store value. More...
 

Detailed Description

Encapsulates LocalMktDate FIX type.

Member Typedef Documentation

Represents storage type for date-time value.

Constructor & Destructor Documentation

B2bits::LocalMktDate::LocalMktDate ( )
noexcept

Creates zero object.

B2bits::LocalMktDate::LocalMktDate ( int  year,
int  month,
int  day 
)
noexcept

Constructor. Constructs object from year, month and day values.

Parameters
yearYear
monthMonth in range [1, 12]
dayDay in range [1, 31]

Member Function Documentation

int B2bits::LocalMktDate::day ( ) const
noexcept

Returns day part of value.

static LocalMktDate B2bits::LocalMktDate::fromDecimal ( u32  val)
staticnoexcept

Constructs object from decimal date format (YYYYMMDD).

static LocalMktDate B2bits::LocalMktDate::fromDecimalString ( AsciiString  val)
staticnoexcept

Constructs object from Decimal string (YYYYMMDD).

static LocalMktDate B2bits::LocalMktDate::fromFixString ( AsciiString  val)
staticnoexcept

Constructs object from FIX string.

static LocalMktDate B2bits::LocalMktDate::fromString ( AsciiString  val)
staticnoexcept

Constructs object from string.

int B2bits::LocalMktDate::month ( ) const
noexcept

Returns month part of value.

bool B2bits::LocalMktDate::operator!= ( const LocalMktDate v) const
inlinenoexcept

Compare operators.

bool B2bits::LocalMktDate::operator== ( const LocalMktDate v) const
inlinenoexcept

Compare operators.

u32 B2bits::LocalMktDate::toDecimal ( ) const
noexcept

Returns value in decimal format (YYYYMMDD)

std::string& B2bits::LocalMktDate::toFixString ( std::string *  dest) const

Converts value stored in object to FIX string 'YYYYMMDD'.

char* B2bits::LocalMktDate::toFixString ( char *  buf,
char *  end 
) const
noexcept

Converts stored value to FIX string 'YYYYMMDD'.

Parameters
bufMemory buffer enough to store string like YYYYMMDD
endPointer to past-the-end element of memory buffer
Returns
pointer to the first character of the result. Last character of result is last character of the 'buf' parameter.
int B2bits::LocalMktDate::year ( ) const
noexcept

Returns year part of value.

Member Data Documentation

unsigned int const B2bits::LocalMktDate::ValueSize = sizeof( "YYYYMMDD" ) - 1
static

Maximum buffer size required to store value.