Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

SimpleTime Class Reference

#include <SimpleTime.h>

List of all members.

Public Methods

 SimpleTime ()
 Default = now. More...

 SimpleTime (const SimpleTime &t)
 SimpleTime (const time_t &unix_time)
 SimpleTime (const TimeT &TimeT_time)
 SimpleTime (const timeAndDate_t &calendarTime)
 SimpleTime (const unsigned short year, const unsigned short month, const unsigned short day, const unsigned short hour, const unsigned short min, const unsigned short sec, const unsigned long ns=0, const bool plusInf=0, const bool minusInf=0)
 SimpleTime (const AIDA_STD::string &netLoggerString)
 ~SimpleTime ()
void operator= (const SimpleTime &)
void operator= (const TimeT &)
void operator+= (const SimpleTimeDuration &)
void operator-= (const SimpleTimeDuration &)
 operator TimeT () const
bool operator== (const SimpleTime &other)
bool isBefore (const SimpleTime &) const
TimeT time () const
 Deprecated: don't use this method, use toTimeT() instead. This method will be removed at the next release ! More...

void setPlusInf ()
void setMinusInf ()
bool isPlusInf () const
bool isMinusInf () const
TimeT toTimeT () const
time_t toUnixTime () const
void fromUnixTime (const time_t &unix_time)
AIDA_STD::string toNetLogger () const
 Convert the internal representation to a human readable (and sortable) string. More...

void fromNetLogger (const AIDA_STD::string &)
void fromCalendarTime (const timeAndDate_t &)
void fromCalendarTime (const unsigned short year, const unsigned short month, const unsigned short day, const unsigned short hour, const unsigned short minute, const unsigned short sec, const unsigned long nanosec=0, const bool plusInf=0, const bool minusInf=0)
 Converts an instance of timeAndDate_t into the internal representation. More...

timeAndDate_t toCalendarTime () const
 Converts the internal representation to an instance of timeAndDate_t. More...

unsigned short year () const
unsigned short month () const
unsigned short day () const
unsigned short hour () const
unsigned short minute () const
unsigned short second () const
unsigned long nanosec () const

Private Attributes

TimeT timeval


Detailed Description

Purpose: SimpleTime represents a point in time with nanosecond precision (e.g. 1900-01-01 .. 2484-07-02). Various arithmetic, conversion and comparison operations are supported.

Author: Erik Zeitler Date: 2000-09-06

Definition at line 125 of file SimpleTime.h.


Constructor & Destructor Documentation

SimpleTime  
 

Definition at line 38 of file SimpleTime.cpp.

References fromUnixTime, and time.

SimpleTime const SimpleTime &    t [inline]
 

Definition at line 130 of file SimpleTime.h.

References timeval, and toTimeT.

SimpleTime const time_t &    unix_time
 

Definition at line 45 of file SimpleTime.cpp.

References fromUnixTime.

SimpleTime const TimeT   TimeT_time
 

Definition at line 49 of file SimpleTime.cpp.

References TimeT, and timeval.

SimpleTime const timeAndDate_t   calendarTime
 

Definition at line 66 of file SimpleTime.cpp.

References fromCalendarTime.

SimpleTime const unsigned short    year,
const unsigned short    month,
const unsigned short    day,
const unsigned short    hour,
const unsigned short    min,
const unsigned short    sec,
const unsigned long    ns = 0,
const bool    plusInf = 0,
const bool    minusInf = 0
 

Definition at line 53 of file SimpleTime.cpp.

References day, fromCalendarTime, hour, month, and year.

SimpleTime const AIDA_STD::string &    netLoggerString
 

Definition at line 70 of file SimpleTime.cpp.

References fromNetLogger.

~SimpleTime   [inline]
 

Definition at line 144 of file SimpleTime.h.


Member Function Documentation

unsigned short day   const
 

Definition at line 459 of file SimpleTime.cpp.

References timeAndDate_t::day, and toCalendarTime.

Referenced by operator<<, and SimpleTime.

void fromCalendarTime const unsigned short    year,
const unsigned short    month,
const unsigned short    day,
const unsigned short    hour,
const unsigned short    minute,
const unsigned short    sec,
const unsigned long    nanosec = 0,
const bool    plusInf = 0,
const bool    minusInf = 0
 

Definition at line 254 of file SimpleTime.cpp.

References timeAndDate_t::day, fromCalendarTime, timeAndDate_t::hour, timeAndDate_t::min, timeAndDate_t::minusInf, timeAndDate_t::month, timeAndDate_t::ns, timeAndDate_t::plusInf, timeAndDate_t::sec, and timeAndDate_t::year.

void fromCalendarTime const timeAndDate_t  
 

Definition at line 276 of file SimpleTime.cpp.

References timeAndDate_t::day, timeAndDate_t::hour, timeAndDate_t::min, timeAndDate_t::minusInf, timeAndDate_t::month, timeAndDate_t::ns, timeAndDate_t::plusInf, timeAndDate_t::sec, setMinusInf, setPlusInf, SIMPLETIME_BILLION, TimeT, timeval, year, and timeAndDate_t::year.

Referenced by fromCalendarTime, fromNetLogger, SimpleTime, and toCalendarTime.

void fromNetLogger const AIDA_STD::string &   
 

Definition at line 163 of file SimpleTime.cpp.

References timeAndDate_t::day, fromCalendarTime, timeAndDate_t::hour, timeAndDate_t::min, timeAndDate_t::minusInf, timeAndDate_t::month, timeAndDate_t::ns, timeAndDate_t::plusInf, timeAndDate_t::sec, UnsignedIntegerConversion::strtoi, and timeAndDate_t::year.

Referenced by SimpleTime.

void fromUnixTime const time_t &    unix_time
 

Definition at line 249 of file SimpleTime.cpp.

References SIMPLETIME_BILLION, SIMPLETIME_UNIX_ORIGIN, and timeval.

Referenced by SimpleTime.

unsigned short hour   const
 

Definition at line 463 of file SimpleTime.cpp.

References timeAndDate_t::hour, and toCalendarTime.

Referenced by operator<<, and SimpleTime.

bool isBefore const SimpleTime &    const
 

Definition at line 155 of file SimpleTime.cpp.

Referenced by SimpleTimeInterval::contains, SimpleTimeInterval::endsBefore, SimpleTimeDuration::setDuration, SimpleTimeInterval::setEnd, SimpleTimeInterval::setInterval, SimpleTimeInterval::setStart, and SimpleTimeInterval::startsAfter.

bool isMinusInf   const
 

Definition at line 148 of file SimpleTime.cpp.

References timeval.

Referenced by operator+=, operator-=, operator<<, SimpleTimeDuration::setDuration, toCalendarTime, toNetLogger, and toUnixTime.

bool isPlusInf   const
 

Definition at line 144 of file SimpleTime.cpp.

References SIMPLETIME_MAX, and timeval.

Referenced by operator+=, operator-=, operator<<, SimpleTimeDuration::setDuration, toCalendarTime, toNetLogger, and toUnixTime.

unsigned short minute   const
 

Definition at line 467 of file SimpleTime.cpp.

References timeAndDate_t::min, and toCalendarTime.

Referenced by operator<<.

unsigned short month   const
 

Definition at line 455 of file SimpleTime.cpp.

References timeAndDate_t::month, and toCalendarTime.

Referenced by operator<<, and SimpleTime.

unsigned long nanosec   const
 

Definition at line 475 of file SimpleTime.cpp.

References SIMPLETIME_BILLION, and toTimeT.

Referenced by operator<<.

operator TimeT   const [inline]
 

Definition at line 152 of file SimpleTime.h.

References toTimeT.

void operator+= const SimpleTimeDuration  
 

Definition at line 85 of file SimpleTime.cpp.

References SimpleTimeDuration::duration, isMinusInf, SimpleTimeDuration::isPlusInf, isPlusInf, setPlusInf, and timeval.

void operator-= const SimpleTimeDuration  
 

Definition at line 95 of file SimpleTime.cpp.

References SimpleTimeDuration::duration, isMinusInf, SimpleTimeDuration::isPlusInf, isPlusInf, setMinusInf, and timeval.

void operator= const TimeT  
 

Definition at line 81 of file SimpleTime.cpp.

References TimeT, and timeval.

void operator= const SimpleTime &   
 

Definition at line 77 of file SimpleTime.cpp.

bool operator== const SimpleTime &    other [inline]
 

Definition at line 155 of file SimpleTime.h.

References timeval, and toTimeT.

unsigned short second   const
 

Definition at line 471 of file SimpleTime.cpp.

References timeAndDate_t::sec, and toCalendarTime.

Referenced by operator<<.

void setMinusInf  
 

Definition at line 140 of file SimpleTime.cpp.

References timeval.

Referenced by fromCalendarTime, and operator-=.

void setPlusInf  
 

Definition at line 136 of file SimpleTime.cpp.

References SIMPLETIME_MAX, and timeval.

Referenced by fromCalendarTime, and operator+=.

TimeT time   const
 

Definition at line 131 of file SimpleTime.cpp.

Referenced by SimpleTime.

timeAndDate_t toCalendarTime   const
 

Definition at line 357 of file SimpleTime.cpp.

References timeAndDate_t::day, fromCalendarTime, timeAndDate_t::hour, isMinusInf, isPlusInf, timeAndDate_t::min, timeAndDate_t::minusInf, timeAndDate_t::month, timeAndDate_t::ns, timeAndDate_t::plusInf, timeAndDate_t::sec, SIMPLETIME_BILLION, TimeT, timeval, toTimeT, and timeAndDate_t::year.

Referenced by day, hour, minute, month, second, toNetLogger, and year.

AIDA_STD::string toNetLogger   const
 

Definition at line 186 of file SimpleTime.cpp.

References timeAndDate_t::day, timeAndDate_t::hour, isMinusInf, isPlusInf, UnsignedIntegerConversion::itostr, timeAndDate_t::min, timeAndDate_t::month, timeAndDate_t::ns, timeAndDate_t::sec, toCalendarTime, and timeAndDate_t::year.

TimeT toTimeT   const
 

Definition at line 235 of file SimpleTime.cpp.

References TimeT, and timeval.

Referenced by nanosec, operator TimeT, operator==, SimpleTimeDuration::setDuration, SimpleTime, and toCalendarTime.

time_t toUnixTime   const
 

Definition at line 239 of file SimpleTime.cpp.

References isMinusInf, isPlusInf, SIMPLETIME_BILLION, SIMPLETIME_UNIX_MAX, SIMPLETIME_UNIX_ORIGIN, and timeval.

unsigned short year   const
 

Definition at line 451 of file SimpleTime.cpp.

References toCalendarTime, and timeAndDate_t::year.

Referenced by fromCalendarTime, operator<<, and SimpleTime.


Member Data Documentation

TimeT timeval [private]
 

Definition at line 197 of file SimpleTime.h.

Referenced by fromCalendarTime, fromUnixTime, isMinusInf, isPlusInf, operator+=, operator-=, operator=, operator==, setMinusInf, setPlusInf, SimpleTime, toCalendarTime, toTimeT, and toUnixTime.


The documentation for this class was generated from the following files:
Generated on Tue May 20 14:50:28 2003 for HepUtilities by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002