OnixS C++ CME MDP Conflated TCP Handler  1.3.6
API Documentation
Timestamp Class Reference

#include <OnixS/CME/ConflatedTCP/messaging/Time.h>

Public Types

enum  { Size = sizeof(Ticks) }
 
typedef UInt64 Ticks
 
typedef UInt32 Year
 
typedef OnixS::CME::ConflatedTCP::Messaging::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

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

Static Public Member Functions

static Timestamp fromStr (const std::string &, TimestampFormat::Enum=TimestampFormat::YYYYMMDDHHMMSSnsec)
 

Detailed Description

Definition at line 467 of file Time.h.

Member Typedef Documentation

typedef UInt32 Day

Integral type presenting the day component.

Definition at line 502 of file Time.h.

typedef UInt32 Hour

Integral type presenting the hour component.

Definition at line 505 of file Time.h.

Integral type presenting the microsecond component.

Definition at line 517 of file Time.h.

Integral type presenting the millisecond component.

Definition at line 514 of file Time.h.

typedef UInt32 Minute

Integral type presenting the minute component.

Definition at line 508 of file Time.h.

Type presenting the month component.

Definition at line 499 of file Time.h.

typedef UInt32 Nanosecond

Integral type presenting the nanosecond component.

Definition at line 520 of file Time.h.

typedef UInt32 Second

Integral type presenting the second component.

Definition at line 511 of file Time.h.

typedef UInt64 Ticks

Integral type storing internal ticks.

Definition at line 472 of file Time.h.

typedef UInt32 Year

Integral type presenting the year component.

Definition at line 494 of file Time.h.

Member Enumeration Documentation

anonymous enum

Traits.

Enumerator
Size 

Size of the class in bytes.

Definition at line 487 of file Time.h.

Constructor & Destructor Documentation

Timestamp ( Ticks  ticks = 0)
inlineexplicitnoexcept

Initializes from the number of ticks since epoch.

Definition at line 527 of file Time.h.

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 an exception if input values do not fit into their valid ranges.

Definition at line 535 of file Time.h.

Timestamp ( const Timestamp other)
inlinenoexcept

Definition at line 551 of file Time.h.

Member Function Documentation

Timestamp date ( ) const
inlinenoexcept
Returns
the Timestamp without a time part.

Definition at line 623 of file Time.h.

Day day ( ) const
inline
Returns
Day component

Definition at line 577 of file Time.h.

Timestamp fromStr ( const std::string &  str,
TimestampFormat::Enum  format = TimestampFormat::YYYYMMDDHHMMSSnsec 
)
inlinestatic

De-serializes a timestamp from the given string.

Exceptions
std::runtime_errorif the de-serialization is impossible.

Definition at line 858 of file Time.h.

Hour hour ( ) const
inlinenoexcept
Returns
the Hour component

Definition at line 587 of file Time.h.

Microsecond microsecond ( ) const
inlinenoexcept
Returns
the Microsecond component.

Definition at line 611 of file Time.h.

Millisecond millisecond ( ) const
inlinenoexcept
Returns
the Millisecond component.

Definition at line 605 of file Time.h.

Minute minute ( ) const
inlinenoexcept
Returns
the Minute component.

Definition at line 593 of file Time.h.

Month month ( ) const
inline
Returns
the Month component.

Definition at line 567 of file Time.h.

Nanosecond nanosecond ( ) const
inlinenoexcept
Returns
the Nanosecond component.

Definition at line 617 of file Time.h.

Timestamp& operator= ( const Timestamp other)
inlinenoexcept

Definition at line 647 of file Time.h.

Second second ( ) const
inlinenoexcept
Returns
the Second component.

Definition at line 599 of file Time.h.

Ticks sinceEpoch ( ) const
inlinenoexcept
Returns
the number of nanoseconds since the Epoch (01-01-1970).

Definition at line 642 of file Time.h.

void swap ( Timestamp other)
inlinenoexcept

Exchanges the value.

Definition at line 655 of file Time.h.

TimeSpan time ( ) const
inlinenoexcept
Returns
the Time part of timestamp.

Definition at line 633 of file Time.h.

std::string toString ( TimestampFormat::Enum  format = TimestampFormat::YYYYMMDDHHMMSSnsec) const
inline
Returns
a human-readable presentation.

Definition at line 892 of file Time.h.

Year year ( ) const
inline
Returns
the Year component.

Definition at line 557 of file Time.h.


The documentation for this class was generated from the following file: