OnixS C++ FMX UST BIMP Market Data Handler 1.2.0
API documentation
Loading...
Searching...
No Matches
Timestamp Class Reference

Public Types

typedef UInt64 Ticks
typedef UInt32 Year
typedef OnixS::FmxUST::MarketData::Bimp::Month::Enum Month
typedef UInt32 Day
typedef UInt32 Hour
typedef UInt32 Minute
typedef UInt32 Second
typedef UInt32 Millisecond
typedef UInt32 Microsecond
typedef UInt32 Nanosecond

Public Member Functions

 Timestamp (Ticks ticks=0) ONIXS_FMXUST_BIMP_NOTHROW
 Timestamp (Year year, Month month, Day day, Hour hour=0, Minute minute=0, Second second=0, Nanosecond nanosecond=0)
 Timestamp (const Timestamp &other)
Year year () const
Month month () const
Day day () const
Hour hour () const
Minute minute () const
Second second () const
Millisecond millisecond () const
Microsecond microsecond () const
Nanosecond nanosecond () const
Timestamp date () const
TimeSpan time () const
Ticks sinceEpoch () const ONIXS_FMXUST_BIMP_NOTHROW
Timestampoperator= (const Timestamp &other)
void swap (Timestamp &other)

Static Public Member Functions

static ONIXS_FMXUST_BIMP_API Timestamp utcNow ()
static ONIXS_FMXUST_BIMP_API Timestamp now ()
static Timestamp parse (unsigned long long presentation, TimestampFormat::Enum format=TimestampFormat::YYYYMMDD)

Detailed Description

Definition at line 482 of file Time.h.

Member Typedef Documentation

◆ Day

typedef UInt32 Day

Integral type presenting day component.

Definition at line 497 of file Time.h.

◆ Hour

typedef UInt32 Hour

Integral type presenting hour component.

Definition at line 500 of file Time.h.

◆ Microsecond

typedef UInt32 Microsecond

Integral type presenting microsecond component.

Definition at line 512 of file Time.h.

◆ Millisecond

typedef UInt32 Millisecond

Integral type presenting millisecond component.

Definition at line 509 of file Time.h.

◆ Minute

typedef UInt32 Minute

Integral type presenting minute component.

Definition at line 503 of file Time.h.

◆ Month

Type presenting month component.

Definition at line 494 of file Time.h.

◆ Nanosecond

typedef UInt32 Nanosecond

Integral type presenting nanosecond component.

Definition at line 515 of file Time.h.

◆ Second

typedef UInt32 Second

Integral type presenting second component.

Definition at line 506 of file Time.h.

◆ Ticks

typedef UInt64 Ticks

Integral type storing internal ticks.

Definition at line 486 of file Time.h.

◆ Year

typedef UInt32 Year

Integral type presenting year component.

Definition at line 489 of file Time.h.

Constructor & Destructor Documentation

◆ Timestamp() [1/3]

Timestamp ( Ticks ticks = 0)
inlineexplicit

Initializes from number of ticks since epoch.

Definition at line 529 of file Time.h.

◆ Timestamp() [2/3]

Timestamp ( Year year,
Month month,
Day day,
Hour hour = 0,
Minute minute = 0,
Second second = 0,
Nanosecond nanosecond = 0 )
inline

Explicit time-stamp initialization.

Input parameters are validated, therefore constructor throws exception if input values do not fit into their valid ranges.

Definition at line 540 of file Time.h.

◆ Timestamp() [3/3]

Timestamp ( const Timestamp & other)
inline

Initializes as copy of other instance.

Definition at line 557 of file Time.h.

Member Function Documentation

◆ date()

Timestamp date ( ) const
inline

Timestamp without a time part.

Definition at line 630 of file Time.h.

◆ day()

Day day ( ) const
inline

Day component of given time point.

Definition at line 584 of file Time.h.

◆ hour()

Hour hour ( ) const
inline

Hour component of given time point.

Definition at line 594 of file Time.h.

◆ microsecond()

Microsecond microsecond ( ) const
inline

Microsecond component of given time point.

Definition at line 618 of file Time.h.

◆ millisecond()

Millisecond millisecond ( ) const
inline

Millisecond component of given time point.

Definition at line 612 of file Time.h.

◆ minute()

Minute minute ( ) const
inline

Minute component of given time point.

Definition at line 600 of file Time.h.

◆ month()

Month month ( ) const
inline

Month component of given time point.

Definition at line 574 of file Time.h.

◆ nanosecond()

Nanosecond nanosecond ( ) const
inline

Nanosecond component of given time point.

Definition at line 624 of file Time.h.

◆ now()

ONIXS_FMXUST_BIMP_API Timestamp now ( )
static

Returns current local time.

◆ operator=()

Timestamp & operator= ( const Timestamp & other)
inline

Reinitializes as copy of given instance.

Definition at line 657 of file Time.h.

◆ parse()

Timestamp parse ( unsigned long long presentation,
TimestampFormat::Enum format = TimestampFormat::YYYYMMDD )
static

Parses timestamp from its numeric presentation (like 20201115) only YYYYMMDD is supported

◆ second()

Second second ( ) const
inline

Second component of given time point.

Definition at line 606 of file Time.h.

◆ sinceEpoch()

Ticks sinceEpoch ( ) const
inline

Number of nanoseconds since the Epoch (01-01-1970).

Definition at line 649 of file Time.h.

◆ swap()

void swap ( Timestamp & other)
inline

Exchanges value with other instance.

Definition at line 667 of file Time.h.

◆ time()

TimeSpan time ( ) const
inline

Time part of timestamp.

Definition at line 640 of file Time.h.

◆ utcNow()

ONIXS_FMXUST_BIMP_API Timestamp utcNow ( )
static

Returns current UTC time.

◆ year()

Year year ( ) const
inline

Year component of given time point.

Definition at line 564 of file Time.h.