User Documentation
Centre for Vision, Speech & Signal Processing
DEVELOP IN NAMESPACE AMMA TREE ROOT AMMA SEARCH AMMA HOME
 

  PUBLIC
DateC::DateC(void)
DateC::DateC(BooleanT,BooleanT)
DateC::DateC(RealT)
DateC::DateC(IntT,IntT,IntT,IntT,IntT,IntT,IntT)
DateC::DateC(istream &)
DateC::DateC(long,long)
DateC::DateC(const DateC &)
DateC::DateC(const StringC &)
DateC::IsLeapYear(int)
DateC::YearToDaysSince1970(int)
DateC::IsValid(void) const
DateC::IsZero(void) const
DateC::SetInvalid(void)
DateC::SetToNow(BooleanT)
DateC::MaxUSeconds(void) const
DateC::Resolution(void) const
DateC::NormalisePos(void)
DateC::NormaliseNeg(void)
DateC::operator==(const DateC &) const
DateC::operator!=(const DateC &) const
DateC::operator>(const DateC &) const
DateC::operator<(const DateC &) const
DateC::operator>=(const DateC &) const
DateC::operator<=(const DateC &) const
DateC::operator+(const DateC &) const
DateC::operator-(const DateC &) const
DateC::operator-=(const DateC &)
DateC::operator-=(double)
DateC::operator+=(const DateC &)
DateC::operator+=(double)
DateC::Text(void) const
DateC::CTime(void) const
DateC::CTimeShort(void) const
DateC::USeconds(void) const
DateC::TotalSeconds(void) const
DateC::Double(void) const
DateC::Seconds(void) const
DateC::Minute(void) const
DateC::Hour(void) const
DateC::Month(void) const
DateC::Year(void) const
DateC::DayInMonth(void) const
DateC::DayInYear(void) const
DateC::DayInWeek(void) const
DateC::DaylightSaving(void) const
DateC::Wait(void) const
DateC::Sleep(RealT)
DateC::Save(ostream &) const
DateC
 
Date & Time information.
 
include "amma/Date.hh"
User Level:Default
Library:Msys
Example:exOption.cc
Section:Basic Types.Misc Utilities.File System
In Scope:std

Comments:
SMALL OBJECT. NB. The virtual timer uses the clock() system call. This means virtual timing will only make sense for the first 36 minutes. After that the timer will wrap.

Variables:
Methods:
DateC()
Default constructor.
Sets time to 0.

DateC(BooleanT setval,BooleanT useVirt = FALSE)
Constructor.
If 'setval' is FALSE an invalid date is created. otherwise the date is set to now. if useVirt is TRUE a virtual time is used.

DateC(RealT val)
Construct from a real in seconds.

DateC(IntT year,IntT month,IntT day,IntT hour = 0,IntT min = 0,IntT sec = 0,IntT usec = 0)
Constructer.

DateC(istream & in)
Construct from a stream

DateC(long xsec,long xusec)
Construct from two longs..

DateC(const DateC & val)
Copy constructor

DateC(const StringC &)
String constructor
Expects data in sec:usec format as produced by Text() method.

BooleanT IsLeapYear(int year)
Is give year a leap year ?

int YearToDaysSince1970(int year)
Convert year to days since 1970

BooleanT IsValid() const
Is a valid date ?

BooleanT IsZero() const
Is time zero ?

void SetInvalid()
Make this date invalid.

void SetToNow(BooleanT useVirt = FALSE)
Set value of variable to now!

long MaxUSeconds() const
Maximum mircro seconds.

long Resolution() const
Get resolution of timer in microseconds.
NB. This assumes 100Hz by default.

void NormalisePos()
Normalise time representation after addition

void NormaliseNeg()
Normalise time representation after subtraction

BooleanT operator==(const DateC & oth) const
Compair times.

BooleanT operator!=(const DateC & oth) const
Compair times.

BooleanT operator>(const DateC & oth) const
Compair times.

BooleanT operator<(const DateC & oth) const
Compair times.

BooleanT operator>=(const DateC & oth) const
Compair times.

BooleanT operator<=(const DateC & oth) const
Compair times.

DateC operator+(const DateC & oth) const
Add times.

DateC operator-(const DateC & oth) const
Subtract times.

const DateC & operator-=(const DateC & val)
Inplace subtraction.

const DateC & operator-=(double val)
Inplace subtraction.

const DateC & operator+=(const DateC & val)
Inplace addition.

const DateC & operator+=(double val)
Inplace addition.

StringC Text() const
Get the time in string form.
This currently prints the time in the form sec:usec.

StringC CTime() const
Returns results equivelent to calling ctime().

StringC CTimeShort() const
Returns a short string containing date/time.

long USeconds() const
Get micro seconds.

long TotalSeconds() const
Get total seconds.

double Double() const
Get time in double form.

IntT Seconds() const
Return number of seconds after minuite. 0,61 (61 for leap seconds.)

IntT Minute() const
Get minute.

IntT Hour() const
Hours since midnight. 0-23

IntT Month() const
Get month 1-31

IntT Year() const
Get year.

IntT DayInMonth() const
Get day in month. 1,31

IntT DayInYear() const
Get day of year. 0-365

IntT DayInWeek() const
Get day of week. Since sunday, 0-6

BooleanT DaylightSaving() const
Are we daylight saveing ?
True = yes

BooleanT Wait() const
Wait until this time.

BooleanT Sleep(RealT delay)
Pause execution for 'delay' seconds.

void Save(ostream & out) const
Write to a stream.


Programmer:Charles Galambos, Documentation by CxxDoc: Tue Mar 20 10:48:08 2001