QDOS::Time Class Reference

#include <QdTime.h>

Inheritance diagram for QDOS::Time:

QDOS::QdTime QDOS::TimeUnitsBase< T, F, O >

List of all members.

Public Types

enum  MonthNamesOptionE {
  FULL, FULL_LC, FULL_UC, SHORT,
  SHORT_LC, SHORT_UC
}
typedef double TRep
typedef enum
QDOS::Time::MonthNamesOptionE 
MonthNamesOption

Public Member Functions

 Time ()
 Time (const Time &ttime)
 Time (const string &iso_time)
 Time (int year, int month, int day, double hour=0.0, double min=0.0, double sec=0.0)
Timeoperator= (const Time &ttime)
Timeoperator= (const string &time)
Timeassign_ymd (int year, int month, int day, double hour=0.0, double min=0.0, double sec=0.0)
Timeset_ymd (int year, int month, int day, double hour=0.0, double min=0.0, double sec=0.0)
Timeassign_ydoy (int year, int doy, double hour=0.0, double min=0.0, double sec=0.0)
Timeset_ydoy (int year, int doy, double hour=0.0, double min=0.0, double sec=0.0)
Timeset_from_iso (const string &iso_string)
Timeset_current_time ()
Timeset_today ()
Time operator+ () const
Time operator- () const
Time operator+ (const Time &ttime) const
Time operator- (const Time &ttime) const
Time operator* (const TRep &tfact) const
Time operator* (const Time &ttime) const
Time operator/ (const TRep &tfact) const
TRep operator/ (const Time &ttime) const
Timeoperator+= (const Time &ttime)
Timeoperator-= (const Time &ttime)
Timeoperator>> (const Time &ttime)
Timeoperator<< (const Time &ttime)
Timeoperator*= (const TRep &tfact)
Timeoperator*= (const Time &ttime)
Timeoperator/= (const TRep &tfact)
bool operator== (const Time &ttime) const
bool operator!= (const Time &ttime) const
bool operator< (const Time &ttime) const
bool operator>= (const Time &ttime) const
bool operator> (const Time &ttime) const
bool operator<= (const Time &ttime) const
string iso (const string &t_str=" ", const string &z_str="") const
string iso_srep (const string &t_str=" ", const string &z_str="") const
void split_srep (vector< string > &str_components) const
void split_dhms (int &d, int &h, int &m, double &s) const
TRep get_time_rep () const
void set_time_rep (const TRep &tsec)
double second_of_day (void) const
double day_of_year (void) const
void split_ymd (int &year, int &month, int &day) const
void split_ymd (int &year, int &month, int &day, int &hour, int &min, int &sec, int &msec) const
void split_ymd (int &year, int &month, int &day, int &hour, int &min, double &sec) const
void split_ymd (int &year, int &month, int &day, int &hour, int &min, float &sec) const
void split_ydoy (int &year, int &doy) const
void split_ydoy (int &year, int &doy, int &hour, int &min, int &sec, int &msec) const
void split_ydoy (int &year, int &doy, int &hour, int &min, double &sec) const
void split_ydoy (int &year, int &doy, int &hour, int &min, float &sec) const
void display () const

Static Public Attributes

static int epoch = 2451545

Protected Member Functions

 Time (const TRep &tval)
Timeoperator= (TRep tval)

Static Protected Member Functions

static int cdf_julian_day (int year, int month, int day)
static bool is_leap_year (int year)
static int leap_index (int year)

Protected Attributes

TRep _trep

Static Protected Attributes

static int qie_days_in_month [2][13]
static const char * month_names [13]
static const char * full_month_names [13]

Friends

Vostreamoperator<< (Vostream &, const Time &)
Vistreamoperator>> (Vistream &, Time &)
Time operator* (const TRep &tfact, const Time &ttime)
Time abs (const Time &t)


Member Typedef Documentation

typedef double QDOS::Time::TRep


Member Enumeration Documentation

Enumerator:
FULL 
FULL_LC 
FULL_UC 
SHORT 
SHORT_LC 
SHORT_UC 


Constructor & Destructor Documentation

QDOS::Time::Time ( const TRep tval  )  [inline, protected]

QDOS::Time::Time (  )  [inline]

QDOS::Time::Time ( const Time ttime  )  [inline]

QDOS::Time::Time ( const string &  iso_time  )  [inline]

QDOS::Time::Time ( int  year,
int  month,
int  day,
double  hour = 0.0,
double  min = 0.0,
double  sec = 0.0 
) [inline]


Member Function Documentation

Time & QDOS::Time::assign_ydoy ( int  year,
int  doy,
double  hour = 0.0,
double  min = 0.0,
double  sec = 0.0 
)

Time & QDOS::Time::assign_ymd ( int  year,
int  month,
int  day,
double  hour = 0.0,
double  min = 0.0,
double  sec = 0.0 
)

int QDOS::Time::cdf_julian_day ( int  year,
int  month,
int  day 
) [static, protected]

double QDOS::Time::day_of_year ( void   )  const

void QDOS::Time::display (  )  const [inline]

Reimplemented in QDOS::TimeUnitsBase< T, F, O >.

TRep QDOS::Time::get_time_rep (  )  const [inline]

static bool QDOS::Time::is_leap_year ( int  year  )  [inline, static, protected]

string QDOS::Time::iso ( const string &  t_str = " ",
const string &  z_str = "" 
) const [inline]

string QDOS::Time::iso_srep ( const string &  t_str = " ",
const string &  z_str = "" 
) const

static int QDOS::Time::leap_index ( int  year  )  [inline, static, protected]

bool QDOS::Time::operator!= ( const Time ttime  )  const [inline]

Time QDOS::Time::operator* ( const Time ttime  )  const [inline]

Time QDOS::Time::operator* ( const TRep tfact  )  const [inline]

Time& QDOS::Time::operator*= ( const Time ttime  )  [inline]

Time& QDOS::Time::operator*= ( const TRep tfact  )  [inline]

Time QDOS::Time::operator+ ( const Time ttime  )  const [inline]

Time QDOS::Time::operator+ (  )  const [inline]

Time& QDOS::Time::operator+= ( const Time ttime  )  [inline]

Time QDOS::Time::operator- ( const Time ttime  )  const [inline]

Time QDOS::Time::operator- (  )  const [inline]

Time& QDOS::Time::operator-= ( const Time ttime  )  [inline]

TRep QDOS::Time::operator/ ( const Time ttime  )  const [inline]

Time QDOS::Time::operator/ ( const TRep tfact  )  const [inline]

Time& QDOS::Time::operator/= ( const TRep tfact  )  [inline]

bool QDOS::Time::operator< ( const Time ttime  )  const [inline]

Time& QDOS::Time::operator<< ( const Time ttime  )  [inline]

bool QDOS::Time::operator<= ( const Time ttime  )  const [inline]

Time& QDOS::Time::operator= ( const string &  time  )  [inline]

Time& QDOS::Time::operator= ( const Time ttime  )  [inline]

Reimplemented in QDOS::QdTime.

Time& QDOS::Time::operator= ( TRep  tval  )  [inline, protected]

bool QDOS::Time::operator== ( const Time ttime  )  const [inline]

bool QDOS::Time::operator> ( const Time ttime  )  const [inline]

bool QDOS::Time::operator>= ( const Time ttime  )  const [inline]

Time& QDOS::Time::operator>> ( const Time ttime  )  [inline]

double QDOS::Time::second_of_day ( void   )  const

Time& QDOS::Time::set_current_time (  )  [inline]

Time & QDOS::Time::set_from_iso ( const string &  iso_string  ) 

void QDOS::Time::set_time_rep ( const TRep tsec  )  [inline]

Time& QDOS::Time::set_today (  )  [inline]

Time& QDOS::Time::set_ydoy ( int  year,
int  doy,
double  hour = 0.0,
double  min = 0.0,
double  sec = 0.0 
) [inline]

Time& QDOS::Time::set_ymd ( int  year,
int  month,
int  day,
double  hour = 0.0,
double  min = 0.0,
double  sec = 0.0 
) [inline]

void QDOS::Time::split_dhms ( int &  d,
int &  h,
int &  m,
double &  s 
) const

void QDOS::Time::split_srep ( vector< string > &  str_components  )  const

void QDOS::Time::split_ydoy ( int &  year,
int &  doy,
int &  hour,
int &  min,
float &  sec 
) const

void QDOS::Time::split_ydoy ( int &  year,
int &  doy,
int &  hour,
int &  min,
double &  sec 
) const

void QDOS::Time::split_ydoy ( int &  year,
int &  doy,
int &  hour,
int &  min,
int &  sec,
int &  msec 
) const

void QDOS::Time::split_ydoy ( int &  year,
int &  doy 
) const

void QDOS::Time::split_ymd ( int &  year,
int &  month,
int &  day,
int &  hour,
int &  min,
float &  sec 
) const

void QDOS::Time::split_ymd ( int &  year,
int &  month,
int &  day,
int &  hour,
int &  min,
double &  sec 
) const

void QDOS::Time::split_ymd ( int &  year,
int &  month,
int &  day,
int &  hour,
int &  min,
int &  sec,
int &  msec 
) const

void QDOS::Time::split_ymd ( int &  year,
int &  month,
int &  day 
) const


Friends And Related Function Documentation

Time abs ( const Time t  )  [friend]

Time operator* ( const TRep tfact,
const Time ttime 
) [friend]

Vostream& operator<< ( Vostream v_os,
const Time t 
) [friend]

Vistream& operator>> ( Vistream v_is,
Time t 
) [friend]


Member Data Documentation

TRep QDOS::Time::_trep [protected]

int QDOS::Time::epoch = 2451545 [static]

const char * QDOS::Time::full_month_names [static, protected]

Initial value:

 { 
  "", "January", "February", "March", "April", "May",
  "June", "July", "August", "September", "October", "November", "December" }

const char * QDOS::Time::month_names [static, protected]

Initial value:

 {
  "", "Jan", "Feb", "Mar", "Apr", "May",
  "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" }

int QDOS::Time::qie_days_in_month [static, protected]

Initial value:

 {
  { 0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 },
  { 0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 } }


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

Generated on Tue Dec 9 16:55:41 2008 for QSAS by  doxygen 1.5.7