Back to index

nux  3.0.0
Public Member Functions | Public Attributes
nux::TimeStamp Class Reference

#include <TimeFunctions.h>

List of all members.

Public Member Functions

 TimeStamp ()
 ~TimeStamp ()
long long GetJulianDayNumber () const
double GetJulianDate () const
unsigned int GetSecondOfDay () const
bool operator== (TimeStamp &Other) const
bool operator!= (TimeStamp &Other) const
bool operator< (TimeStamp &Other) const
bool operator> (TimeStamp &Other) const
bool operator>= (TimeStamp &Other) const
bool operator<= (TimeStamp &Other) const
void GetTime ()

Public Attributes

unsigned int m_Year
unsigned int m_Month
unsigned int m_Day
unsigned int m_Hour
unsigned int m_Minute
unsigned int m_Second
unsigned int m_MicroSecond

Detailed Description

Definition at line 29 of file TimeFunctions.h.


Constructor & Destructor Documentation

Definition at line 28 of file TimeFunctions.cpp.

  {
    GetTime();
  }

Here is the call graph for this function:

Definition at line 33 of file TimeFunctions.cpp.

  {
    m_Year          = 1970;
    m_Month         = 1;
    m_Day           = 1;
    m_Hour          = 0;
    m_Minute        = 0;
    m_Second        = 0;
    m_MicroSecond   = 0;
  }

Member Function Documentation

Definition at line 54 of file TimeFunctions.cpp.

  {
    double JD = GetJulianDayNumber() + (m_Hour - 12) / 1440.0f + m_Minute / 1440.0f + m_Second / 86400.0f;
    return JD;
  }

Here is the call graph for this function:

Here is the caller graph for this function:

long long nux::TimeStamp::GetJulianDayNumber ( void  ) const

Definition at line 45 of file TimeFunctions.cpp.

  {
    long long JDN =  m_Day - 32075L +
                 1461L * (m_Year  + 4800L + (m_Month  - 14L) / 12L) / 4L +
                 367L * (m_Month - 2L - ( (m_Month - 14L) / 12L) * 12L) / 12L -
                 3L * ( (m_Year + 4900L - (m_Month  - 14L) / 12L) / 100L) / 4L;
    return JDN;
  }

Here is the caller graph for this function:

unsigned int nux::TimeStamp::GetSecondOfDay ( void  ) const

Definition at line 60 of file TimeFunctions.cpp.

  {
    return m_Hour * 60 * 60 + m_Minute * 60 + m_Second;
  }

Definition at line 124 of file TimeFunctions.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool nux::TimeStamp::operator!= ( TimeStamp Other) const

Definition at line 76 of file TimeFunctions.cpp.

  {
    if (*this == Other)
      return false;

    return true;
  }
bool nux::TimeStamp::operator< ( TimeStamp Other) const

Definition at line 84 of file TimeFunctions.cpp.

  {
    double JD = GetJulianDate();

    if (JD < Other.GetJulianDate() )
      return true;

    return false;
  }

Here is the call graph for this function:

bool nux::TimeStamp::operator<= ( TimeStamp Other) const

Definition at line 114 of file TimeFunctions.cpp.

  {
    double JD = GetJulianDate();

    if (JD <= Other.GetJulianDate() )
      return true;

    return false;
  }

Here is the call graph for this function:

bool nux::TimeStamp::operator== ( TimeStamp Other) const

Definition at line 65 of file TimeFunctions.cpp.

  {
    bool b = (m_Year  ==  Other.m_Year)       &&
             (m_Day        ==  Other.m_Day)      &&
             (m_Month      ==  Other.m_Month)    &&
             (m_Hour       ==  Other.m_Hour)     &&
             (m_Minute     ==  Other.m_Minute)   &&
             (m_Second     ==  Other.m_Second);
    return b;
  }
bool nux::TimeStamp::operator> ( TimeStamp Other) const

Definition at line 94 of file TimeFunctions.cpp.

  {
    double JD = GetJulianDate();

    if (JD > Other.GetJulianDate() )
      return true;

    return false;
  }

Here is the call graph for this function:

bool nux::TimeStamp::operator>= ( TimeStamp Other) const

Definition at line 104 of file TimeFunctions.cpp.

  {
    double JD = GetJulianDate();

    if (JD >= Other.GetJulianDate() )
      return true;

    return false;
  }

Here is the call graph for this function:


Member Data Documentation

unsigned int nux::TimeStamp::m_Day

Definition at line 38 of file TimeFunctions.h.

unsigned int nux::TimeStamp::m_Hour

Definition at line 39 of file TimeFunctions.h.

Definition at line 44 of file TimeFunctions.h.

Definition at line 40 of file TimeFunctions.h.

Definition at line 37 of file TimeFunctions.h.

Definition at line 41 of file TimeFunctions.h.

unsigned int nux::TimeStamp::m_Year

Definition at line 36 of file TimeFunctions.h.


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