Classes | Functions | Variables
User

Classes

struct  FIX::DateTime
 
class  FIX::UtcTimeStamp
 Date and Time represented in UTC. More...
 
class  FIX::LocalTimeStamp
 Date and Time represented in local time. More...
 
class  FIX::UtcTimeOnly
 Time only represented in UTC. More...
 
class  FIX::LocalTimeOnly
 Time only represented in local time. More...
 
class  FIX::UtcDate
 Date only represented in UTC. More...
 
class  FIX::LocalDate
 Date only represented in local time. More...
 
class  FIX::ThreadedSocketInitiator
 Threaded Socket implementation of Initiator. More...
 

Functions

bool FIX::operator== (const DateTime &lhs, const DateTime &rhs)
 
bool FIX::operator!= (const DateTime &lhs, const DateTime &rhs)
 
bool FIX::operator< (const DateTime &lhs, const DateTime &rhs)
 
bool FIX::operator> (const DateTime &lhs, const DateTime &rhs)
 
bool FIX::operator<= (const DateTime &lhs, const DateTime &rhs)
 
bool FIX::operator>= (const DateTime &lhs, const DateTime &rhs)
 
int FIX::operator- (const DateTime &lhs, const DateTime &rhs)
 Calculate the difference between two DateTime values and return the result as a number of seconds.
 

Variables

static const int FIX::PRECISION_FACTOR [10] = {1000000000, 100000000, 10000000, 1000000, 100000, 10000, 1000, 100, 10, 1}
 Date and Time stored as a Julian day number and number of nanoseconds since midnight.
 

Detailed Description

Function Documentation

◆ operator!=()

bool FIX::operator!= ( const DateTime lhs,
const DateTime rhs 
)
inline

Definition at line 541 of file FieldTypes.h.

542{
543 return !(lhs == rhs);
544}

◆ operator-()

int FIX::operator- ( const DateTime lhs,
const DateTime rhs 
)
inline

Calculate the difference between two DateTime values and return the result as a number of seconds.

Definition at line 574 of file FieldTypes.h.

575{
576 return (DateTime::SECONDS_PER_DAY * (lhs.m_date - rhs.m_date) +
577 // Truncate the nanos before subtracting
578 (int)(lhs.m_time / DateTime::NANOS_PER_SEC) - (int)(rhs.m_time / DateTime::NANOS_PER_SEC));
579}

References FIX::DateTime::m_date, FIX::DateTime::m_time, FIX::DateTime::NANOS_PER_SEC, and FIX::DateTime::SECONDS_PER_DAY.

◆ operator<()

bool FIX::operator< ( const DateTime lhs,
const DateTime rhs 
)
inline

Definition at line 546 of file FieldTypes.h.

547{
548 if( lhs.m_date < rhs.m_date )
549 return true;
550 else if( lhs.m_date > rhs.m_date )
551 return false;
552 else if( lhs.m_time < rhs.m_time )
553 return true;
554 return false;
555}

References FIX::DateTime::m_date, and FIX::DateTime::m_time.

◆ operator<=()

bool FIX::operator<= ( const DateTime lhs,
const DateTime rhs 
)
inline

Definition at line 562 of file FieldTypes.h.

563{
564 return lhs == rhs || lhs < rhs;
565}

◆ operator==()

bool FIX::operator== ( const DateTime lhs,
const DateTime rhs 
)
inline

Definition at line 536 of file FieldTypes.h.

537{
538 return lhs.m_date == rhs.m_date && lhs.m_time == rhs.m_time;
539}

References FIX::DateTime::m_date, and FIX::DateTime::m_time.

◆ operator>()

bool FIX::operator> ( const DateTime lhs,
const DateTime rhs 
)
inline

Definition at line 557 of file FieldTypes.h.

558{
559 return !(lhs == rhs || lhs < rhs);
560}

◆ operator>=()

bool FIX::operator>= ( const DateTime lhs,
const DateTime rhs 
)
inline

Definition at line 567 of file FieldTypes.h.

568{
569 return lhs == rhs || lhs > rhs;
570}

Variable Documentation

◆ PRECISION_FACTOR

const int FIX::PRECISION_FACTOR[10] = {1000000000, 100000000, 10000000, 1000000, 100000, 10000, 1000, 100, 10, 1}
static

Date and Time stored as a Julian day number and number of nanoseconds since midnight.

Does not perform any timezone calculations. All magic numbers and related calculations have been taken from:

See also
http://www.faqs.org/faqs/calendars.faq
http://scienceworld.wolfram.com/astronomy/JulianDate.html
http://scienceworld.wolfram.com/astronomy/GregorianCalendar.html
http://scienceworld.wolfram.com/astronomy/Weekday.html
Author
Caleb Epstein <caleb.epstein at gmail dot com>

Definition at line 58 of file FieldTypes.h.

58{1000000000, 100000000, 10000000, 1000000, 100000, 10000, 1000, 100, 10, 1};

Referenced by FIX::DateTime::convertToNanos(), FIX::DateTime::DateTime(), FIX::DateTime::fromTm(), FIX::DateTime::getFraction(), FIX::DateTime::getMicroecond(), FIX::DateTime::getMillisecond(), and FIX::DateTime::setHMS().


Generated on Sat Feb 3 2024 04:23:15 for QuickFIX by doxygen 1.9.8 written by Dimitri van Heesch, © 1997-2001