fw4spl
fwCore::TimeStamp Class Reference

Provides a timestamp and a expiracy system. More...

#include <TimeStamp.hpp>

+ Inheritance diagram for fwCore::TimeStamp:
+ Collaboration diagram for fwCore::TimeStamp:

Public Types

typedef ::fwCore::HiResClock::HiResClockType TimeStampType
 Type used in logical typestamp.
 

Public Member Functions

virtual bool isA (const std::string &type) const override
 
FWCORE_API void modified ()
 Update the timestamp to the current EPOCH time.
 
FWCORE_API TimeStampType getTimeStamp () const
 
FWCORE_API bool operator> (const TimeStamp &ts) const
 Greater than operator for TimeStamp. More...
 
FWCORE_API bool operator< (const TimeStamp &ts) const
 Lesser than operator for TimeStamp. More...
 
FWCORE_API operator TimeStampType () const
 Cast operator for TimeStamp.
 
FWCORE_API void setLifePeriod (TimeStampType period)
 Setter for the life period. More...
 
FWCORE_API TimeStampType getLifePeriod () const
 Getter for the life period. More...
 
FWCORE_API bool periodExpired () const
 Check TimeStamp expiracy status. More...
 
Constructor/Destructor
FWCORE_API TimeStamp ()
 
- Public Member Functions inherited from fwCore::BaseObject

Static Public Member Functions

static bool isTypeOf (const std::string &type)
 
- Static Public Member Functions inherited from fwCore::BaseObject
static bool isTypeOf (const std::string &type)
 
static const std::string & leafClassname ()
 return object's classname without its namespace, i.e. BaseObject
 
static const std::string & classname ()
 return object's classname without its namespace, i.e. BaseObject
 

Friends

template<class , class , class >
class ::fwTools::ClassFactory
 
class ::fwTools::Factory
 

Demangling methods

virtual const std::string & getLeafClassname () const override
 return object's classname without its namespace, i.e. BaseObject
 
virtual const std::string & getClassname () const override
 return full object's classname with its namespace, i.e. fwCore::BaseObject
 
static const std::string & leafClassname ()
 return object's classname without its namespace, i.e. BaseObject
 
static const std::string & classname ()
 return object's classname without its namespace, i.e. BaseObject
 

Detailed Description

Provides a timestamp and a expiracy system.

Definition at line 20 of file TimeStamp.hpp.

Member Function Documentation

FWCORE_API TimeStampType fwCore::TimeStamp::getLifePeriod ( ) const
inline

Getter for the life period.

Returns
TimeStamp life period

Definition at line 106 of file TimeStamp.hpp.

FWCORE_API TimeStampType fwCore::TimeStamp::getTimeStamp ( ) const
inline
Returns
TimeStamp's current value

Definition at line 55 of file TimeStamp.hpp.

FWCORE_API bool fwCore::TimeStamp::operator< ( const TimeStamp ts) const
inline

Lesser than operator for TimeStamp.

Parameters
tsTimeStamp to compare to

Definition at line 77 of file TimeStamp.hpp.

FWCORE_API bool fwCore::TimeStamp::operator> ( const TimeStamp ts) const
inline

Greater than operator for TimeStamp.

Parameters
tsTimeStamp to compare to

Definition at line 67 of file TimeStamp.hpp.

FWCORE_API bool fwCore::TimeStamp::periodExpired ( ) const
inline

Check TimeStamp expiracy status.

Returns
True if more than m_lifePeriod milliseconds are elapsed from TimeStamp value

Definition at line 118 of file TimeStamp.hpp.

References fwCore::HiResClock::getTimeInMilliSec().

Referenced by fwThread::WorkerAsio::processTasks().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

FWCORE_API void fwCore::TimeStamp::setLifePeriod ( TimeStampType  period)
inline

Setter for the life period.

Parameters
periodPeriod in milliseconds

Definition at line 96 of file TimeStamp.hpp.

Referenced by fwThread::WorkerAsio::processTasks().

+ Here is the caller graph for this function:


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