OnixS ICE iMpact Multicast Price Feed Handler C++ library 8.18.0
API documentation
Loading...
Searching...
No Matches
YearMonth Class Reference

Classes

struct  NoVerify

Public Member Functions

 YearMonth ()
 YearMonth (unsigned int year, Month month)
 YearMonth (const YearMonth &other)
unsigned int year () const
Month month () const
bool operator== (const YearMonth &) const
bool operator!= (const YearMonth &) const
YearMonthoperator= (const YearMonth &other)
std::string toString () const
void toString (std::string &) const

Static Public Member Functions

static YearMonth deserialize (unsigned long long)

Protected Member Functions

 YearMonth (unsigned int, Month, const NoVerify &)

Detailed Description

Represents month-year pair. Year must fit into [0001, 9999] range. Month must fit into [01, 12] range.

Definition at line 239 of file Time.h.

Constructor & Destructor Documentation

◆ YearMonth() [1/4]

YearMonth ( )

Initializes instance as Jan, 0001.

◆ YearMonth() [2/4]

YearMonth ( unsigned int year,
Month month )

Initializes instance with given values. Input parameters are checked for validness.

Exceptions
exceptionif input parameters do not fit into a valid range.

◆ YearMonth() [3/4]

YearMonth ( const YearMonth & other)

Initializes as copy of other instance.

◆ YearMonth() [4/4]

YearMonth ( unsigned int ,
Month ,
const NoVerify &  )
protected

Initializes instance without verifying input.

Member Function Documentation

◆ deserialize()

YearMonth deserialize ( unsigned long long )
static

De-serializes instance from its numeric presentation as it's used by ICE.

◆ month()

Month month ( ) const
inline

Month component. Valid range of values is [01, 12].

Definition at line 301 of file Time.h.

◆ operator!=()

bool operator!= ( const YearMonth & ) const

Compares with other instance for inequality.

◆ operator=()

YearMonth & operator= ( const YearMonth & other)

◆ operator==()

bool operator== ( const YearMonth & ) const

Compares with other instance for equality.

◆ toString() [1/2]

std::string toString ( ) const
inline

Serializes into text (YYYYMM) presentation.

Definition at line 306 of file Time.h.

◆ toString() [2/2]

void toString ( std::string & ) const

Serializes into text (YYYYMM) presentation.

◆ year()

unsigned int year ( ) const
inline

Year component. Valid range of values is [0001, 9999].

Definition at line 296 of file Time.h.