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::UTCDateOnly Class Reference

Encapsulates UTCDateOnly FIX type. More...

#include <b2bits/types/UTCDateOnly.h>

Public Types

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

Public Member Functions

 UTCDateOnly () noexcept
 Creates zero object. More...
 
 UTCDateOnly (int year, int month, int day) noexcept
 
bool operator== (const UTCDateOnly &v) const noexcept
 Equal operator. More...
 
bool operator!= (const UTCDateOnly &v) const noexcept
 Not equal operator. More...
 
bool operator> (const UTCDateOnly &v) const noexcept
 Greater operator. More...
 
bool operator>= (const UTCDateOnly &v) const noexcept
 Greater or equal operator. More...
 
bool operator< (const UTCDateOnly &v) const noexcept
 Less operator. More...
 
bool operator<= (const UTCDateOnly &v) const noexcept
 Less or equal operator. 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 UTCDateOnly fromFixString (AsciiString val) noexcept
 Constructs object from FIX string. More...
 
static UTCDateOnly fromDecimal (u32 val) noexcept
 Constructs object from decimal date format (YYYYMMDD). More...
 
static UTCDateOnly fromDecimalString (AsciiString val) noexcept
 Constructs object from decimal date format (YYYYMMDD). More...
 
static UTCDateOnly fromString (AsciiString val) noexcept
 Constructs object from decimal date format (YYYYMMDD). More...
 
static UTCDateOnly now () noexcept
 Returns UTCTimestamp with current date. More...
 

Static Public Attributes

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

Detailed Description

Encapsulates UTCDateOnly FIX type.

Member Typedef Documentation

Represents storage type for date-time value.

Constructor & Destructor Documentation

B2bits::UTCDateOnly::UTCDateOnly ( )
noexcept

Creates zero object.

B2bits::UTCDateOnly::UTCDateOnly ( 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::UTCDateOnly::day ( ) const
noexcept

Returns day part of value.

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

Constructs object from decimal date format (YYYYMMDD).

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

Constructs object from decimal date format (YYYYMMDD).

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

Constructs object from FIX string.

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

Constructs object from decimal date format (YYYYMMDD).

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

Returns month part of value.

static UTCDateOnly B2bits::UTCDateOnly::now ( )
staticnoexcept

Returns UTCTimestamp with current date.

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

Not equal operator.

bool B2bits::UTCDateOnly::operator< ( const UTCDateOnly v) const
inlinenoexcept

Less operator.

bool B2bits::UTCDateOnly::operator<= ( const UTCDateOnly v) const
inlinenoexcept

Less or equal operator.

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

Equal operator.

bool B2bits::UTCDateOnly::operator> ( const UTCDateOnly v) const
inlinenoexcept

Greater operator.

bool B2bits::UTCDateOnly::operator>= ( const UTCDateOnly v) const
inlinenoexcept

Greater or equal operator.

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

Returns value in decimal format (YYYYMMDD)

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

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

char* B2bits::UTCDateOnly::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::UTCDateOnly::year ( ) const
noexcept

Returns year part of value.

Member Data Documentation

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

Maximum buffer size required to store value.