Basic Image AlgorithmS Library  2.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
BIAS::TimeStampGen Class Reference

Generates absolute timestamps with a certain offset from given base-time. More...

#include <Base/Common/TimeStamp.hh>

+ Inheritance diagram for BIAS::TimeStampGen:
+ Collaboration diagram for BIAS::TimeStampGen:

Public Member Functions

void AddDebugLevel (const long int lv)
 
void AddDebugLevel (const std::string &name)
 
bool DebugLevelIsSet (const long int lv) const
 
bool DebugLevelIsSet (const std::string &name) const
 
TimeStamp GenerateTimeStamp (const long long &msec)
 Generate a timestamp with offset 'msec' from given base-time. More...
 
TimeStamp GenerateTimeStamp (const TimeStamp &ts)
 
TimeStamp GenerateTimeStamp ()
 Generate a timestamp from system time. More...
 
int GetDebugLevel () const
 
std::ostream & GetDebugStream () const
 
void GetDebugStream (std::ostream &os) const
 
long int Name2DebugLevel (const std::string &name) const
 looks up a debuglevel in the internal map, returns 0 if not found More...
 
long int NewDebugLevel (const std::string &name)
 creates a new debuglevel More...
 
void PrintDebugLevel (std::ostream &os=std::cout) const
 
void RemoveDebugLevel (const long int lv)
 
void RemoveDebugLevel (const std::string &name)
 
void SetBaseTime (const long long msecOffset=0)
 Sets system time as base-time for stamp generation. More...
 
void SetDebugLevel (const long int lv)
 
void SetDebugLevel (const std::string &name)
 
void SetDebugStream (const std::ostream &os)
 
void ShowDebugLevel (std::ostream &os=std::cout) const
 prints all internally known debuglevels More...
 
 TimeStampGen ()
 Standard Ctor and Dtor. More...
 
 ~TimeStampGen ()
 

Static Public Member Functions

static long int GetGlobalDebugLevel ()
 
static void SetGlobalDebugLevel (long int lev)
 

Protected Member Functions

long ConsumeNextFreeDebuglevel_ ()
 returns the next available debuglevel More...
 

Protected Attributes

long int _liDebugLevel
 
long int _liNextDebugLevel
 new concept, debuglevel are managed here in the debug class More...
 
std::map< std::string, long int > _String2Debuglevel
 
timeval baseTime_
 
TimeStamp msecBaseTime_
 

Static Protected Attributes

static std::ostream _zDebugStream
 
static long int GlobalDebugLevel = 0
 

Detailed Description

Generates absolute timestamps with a certain offset from given base-time.

Author
23.1.07 apetersen

Definition at line 106 of file TimeStamp.hh.

Constructor & Destructor Documentation

BIAS::TimeStampGen::TimeStampGen ( )
inline

Standard Ctor and Dtor.

Definition at line 112 of file TimeStamp.hh.

References baseTime_, and msecBaseTime_.

BIAS::TimeStampGen::~TimeStampGen ( )
inline

Definition at line 117 of file TimeStamp.hh.

Member Function Documentation

void BIAS::Debug::AddDebugLevel ( const long int  lv)
inlineinherited
void BIAS::Debug::AddDebugLevel ( const std::string &  name)
inlineinherited

Definition at line 362 of file Debug.hh.

long BIAS::Debug::ConsumeNextFreeDebuglevel_ ( )
inlineprotectedinherited

returns the next available debuglevel

Author
woelk 09/2006

Definition at line 521 of file Debug.hh.

bool BIAS::Debug::DebugLevelIsSet ( const long int  lv) const
inlineinherited
bool BIAS::Debug::DebugLevelIsSet ( const std::string &  name) const
inlineinherited

Definition at line 350 of file Debug.hh.

TimeStamp BIAS::TimeStampGen::GenerateTimeStamp ( const long long &  msec)
inline

Generate a timestamp with offset 'msec' from given base-time.

   For msec==0 just returns base-time in ms.
Parameters
msecOffset from base-time for timestamp
Returns
Timestamp with value 'base-time + msec'

Definition at line 127 of file TimeStamp.hh.

References msecBaseTime_.

TimeStamp BIAS::TimeStampGen::GenerateTimeStamp ( const TimeStamp ts)
inline

Definition at line 129 of file TimeStamp.hh.

References msecBaseTime_.

TimeStamp BIAS::TimeStampGen::GenerateTimeStamp ( )
inline

Generate a timestamp from system time.

Returns
actual system time in ms

Definition at line 137 of file TimeStamp.hh.

int BIAS::Debug::GetDebugLevel ( ) const
inlineinherited
std::ostream& BIAS::Debug::GetDebugStream ( ) const
inlineinherited

Definition at line 405 of file Debug.hh.

void BIAS::Debug::GetDebugStream ( std::ostream &  os) const
inlineinherited

Definition at line 414 of file Debug.hh.

static long int BIAS::Debug::GetGlobalDebugLevel ( )
inlinestaticinherited

Definition at line 431 of file Debug.hh.

long int BIAS::Debug::Name2DebugLevel ( const std::string &  name) const
inlineinherited

looks up a debuglevel in the internal map, returns 0 if not found

Author
woelk 09/2006

Definition at line 454 of file Debug.hh.

long int BIAS::Debug::NewDebugLevel ( const std::string &  name)
inlineinherited
void BIAS::Debug::PrintDebugLevel ( std::ostream &  os = std::cout) const
inlineinherited

Definition at line 383 of file Debug.hh.

void BIAS::Debug::RemoveDebugLevel ( const long int  lv)
inlineinherited

Definition at line 369 of file Debug.hh.

void BIAS::Debug::RemoveDebugLevel ( const std::string &  name)
inlineinherited

Definition at line 376 of file Debug.hh.

void BIAS::TimeStampGen::SetBaseTime ( const long long  msecOffset = 0)
inline

Sets system time as base-time for stamp generation.

   'msecOffset' will be added to base-time as timing correction.
   Timestamps are conform with (unix) gettimeofday; baseTime_ holds
   the 'raw' timeval struct and msecBaseTime_ the (corresponding) 
   milliseconds since beginning of epoch (unix: 1.1.1970 00:00).
Parameters
msecOffsetOffset from actual time to base-time

Definition at line 152 of file TimeStamp.hh.

References baseTime_, and msecBaseTime_.

void BIAS::Debug::SetDebugLevel ( const long int  lv)
inlineinherited
void BIAS::Debug::SetDebugLevel ( const std::string &  name)
inlineinherited

Definition at line 325 of file Debug.hh.

void BIAS::Debug::SetDebugStream ( const std::ostream &  os)
inlineinherited

Definition at line 398 of file Debug.hh.

static void BIAS::Debug::SetGlobalDebugLevel ( long int  lev)
inlinestaticinherited

Definition at line 424 of file Debug.hh.

void BIAS::Debug::ShowDebugLevel ( std::ostream &  os = std::cout) const
inlineinherited

prints all internally known debuglevels

Author
woelk 09/2006

Definition at line 496 of file Debug.hh.

Member Data Documentation

long int BIAS::Debug::_liDebugLevel
protectedinherited

Definition at line 510 of file Debug.hh.

Referenced by BIAS::Debug::operator=(), and BIAS::ImageBase::operator=().

long int BIAS::Debug::_liNextDebugLevel
protectedinherited

new concept, debuglevel are managed here in the debug class

Definition at line 516 of file Debug.hh.

Referenced by BIAS::Debug::operator=().

std::map<std::string, long int> BIAS::Debug::_String2Debuglevel
protectedinherited

Definition at line 517 of file Debug.hh.

Referenced by BIAS::Debug::operator=().

std::ostream BIAS::Debug::_zDebugStream
staticprotectedinherited

Definition at line 511 of file Debug.hh.

Referenced by BIAS::Debug::operator=().

timeval BIAS::TimeStampGen::baseTime_
protected

Definition at line 163 of file TimeStamp.hh.

Referenced by SetBaseTime(), and TimeStampGen().

long int BIAS::Debug::GlobalDebugLevel = 0
staticprotectedinherited

Definition at line 513 of file Debug.hh.

TimeStamp BIAS::TimeStampGen::msecBaseTime_
protected

Definition at line 164 of file TimeStamp.hh.

Referenced by GenerateTimeStamp(), SetBaseTime(), and TimeStampGen().


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