OnixS C++ FIX Engine  4.10.1
API Documentation
TimeSpan Class Reference

#include <OnixS/FIXEngine/FIX/TimeSpan.h>

Public Member Functions

 TimeSpan ()
 
 TimeSpan (TotalSeconds seconds, Nanoseconds nanoseconds)
 
 TimeSpan (TotalSeconds seconds, Picoseconds picoseconds)
 
 TimeSpan (Hours hours, Minutes minutes, Seconds seconds)
 
 TimeSpan (Days days, Hours hours, Minutes minutes, Seconds seconds, Nanoseconds nanoseconds)
 
 TimeSpan (Days days, Hours hours, Minutes minutes, Seconds seconds, Picoseconds picooseconds)
 
TotalSeconds totalSeconds () const
 
Days days () const
 
Hours hours () const
 
Minutes minutes () const
 
Seconds seconds () const
 
Milliseconds milliseconds () const
 
Microseconds microseconds () const
 
Nanoseconds nanoseconds () const
 
Picoseconds picoseconds () const
 
TimeSpan absolute () const
 
bool operator== (const TimeSpan &) const
 
bool operator!= (const TimeSpan &) const
 
bool operator< (const TimeSpan &) const
 
TimeSpanoperator+= (const TimeSpan &)
 
TimeSpanoperator-= (const TimeSpan &)
 
std::string toString (TimeSpanFormat::Enum=TimeSpanFormat::HHMMSSNsec) const
 
void toString (std::string &, TimeSpanFormat::Enum=TimeSpanFormat::HHMMSSNsec) const
 

Static Public Member Functions

static TimeSpan min ()
 
static TimeSpan max ()
 
static TimeSpan zero ()
 
static TimeSpan parse (const std::string &)
 

Protected Member Functions

void normalize ()
 

Protected Attributes

TotalSeconds seconds_
 
Picoseconds picoseconds_
 

Friends

class TimeManager
 

Detailed Description

Definition at line 93 of file TimeSpan.h.

Constructor & Destructor Documentation

TimeSpan ( )

Constructs an uninitialized instance.

TimeSpan ( TotalSeconds  seconds,
Nanoseconds  nanoseconds 
)

Initializes the TimeSpan from seconds and nanoseconds.

TimeSpan ( TotalSeconds  seconds,
Picoseconds  picoseconds 
)

Initializes the TimeSpan from seconds and picoseconds.

TimeSpan ( Hours  hours,
Minutes  minutes,
Seconds  seconds 
)

Initializes the TimeSpan from hours, minutes and seconds.

TimeSpan ( Days  days,
Hours  hours,
Minutes  minutes,
Seconds  seconds,
Nanoseconds  nanoseconds 
)

Initializes the TimeSpan from days, hours, minutes, seconds and nanoseconds.

TimeSpan ( Days  days,
Hours  hours,
Minutes  minutes,
Seconds  seconds,
Picoseconds  picooseconds 
)

Initializes the TimeSpan from days, hours, minutes, seconds and picoseconds.

Member Function Documentation

TimeSpan absolute ( ) const

The current absolute time span.

Days days ( ) const

Current days.

Hours hours ( ) const

Current hours.

static TimeSpan max ( )
static

The maximum value of the time span.

Microseconds microseconds ( ) const

Current microseconds.

Milliseconds milliseconds ( ) const

Current milliseconds.

static TimeSpan min ( )
static

The minimum value of the time span.

Minutes minutes ( ) const

Current minutes.

Nanoseconds nanoseconds ( ) const

Current nanoseconds.

void normalize ( )
protected
bool operator!= ( const TimeSpan ) const

Compares the instance with another one.

TimeSpan& operator+= ( const TimeSpan )

Increases the instance by another one.

TimeSpan& operator-= ( const TimeSpan )

Decreases the instance by another one.

bool operator< ( const TimeSpan ) const

Tests whether the instance is less than another one.

bool operator== ( const TimeSpan ) const

Compares the instance with another one.

static TimeSpan parse ( const std::string &  )
static

Parses time span from its text presentation.

Picoseconds picoseconds ( ) const
inline

Current nanoseconds.

Definition at line 213 of file TimeSpan.h.

Seconds seconds ( ) const

Current seconds.

std::string toString ( TimeSpanFormat::Enum  = TimeSpanFormat::HHMMSSNsec) const

Returns the time span text presentation in the requested format ("HH:MM:SS.sssssssss" by default).

void toString ( std::string &  ,
TimeSpanFormat::Enum  = TimeSpanFormat::HHMMSSNsec 
) const
TotalSeconds totalSeconds ( ) const
inline

The total number of seconds.

Definition at line 206 of file TimeSpan.h.

static TimeSpan zero ( )
static

The zero value of the time span.

Friends And Related Function Documentation

friend class TimeManager
friend

Definition at line 196 of file TimeSpan.h.

Member Data Documentation

Picoseconds picoseconds_
protected

Definition at line 199 of file TimeSpan.h.

TotalSeconds seconds_
protected

Definition at line 198 of file TimeSpan.h.


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