Fawkes API  Fawkes Development Version
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
fawkes::ClockAspect Class Reference

Thread aspect that allows to obtain the current time from the clock. More...

#include <>>

Inheritance diagram for fawkes::ClockAspect:

List of all members.

Public Member Functions

 ClockAspect ()
 Constructor.
virtual ~ClockAspect ()
 Virtual empty destructor.
void init_ClockAspect (Clock *clock)
 Set the clock.
- Public Member Functions inherited from fawkes::Aspect
const std::list< const char * > & get_aspects () const
 Get list of aspect names attached to a aspected thread.

Protected Attributes

Clockclock
 By means of this member access to the clock is given.

Additional Inherited Members

- Protected Member Functions inherited from fawkes::Aspect
void add_aspect (const char *name)
 Add an aspect to a thread.

Detailed Description

Thread aspect that allows to obtain the current time from the clock.

Threads that need to deal with the current time should have this aspect and not obtain the time by means of gettimeofday!

Author:
Daniel Beck

Definition at line 36 of file clock.h.


Constructor & Destructor Documentation

fawkes::ClockAspect::ClockAspect ( )

Constructor.

Definition at line 47 of file clock.cpp.

fawkes::ClockAspect::~ClockAspect ( )
virtual

Virtual empty destructor.

Definition at line 53 of file clock.cpp.


Member Function Documentation

void fawkes::ClockAspect::init_ClockAspect ( Clock clock)

Set the clock.

It is guaranteed that this is called for a clock thread before Thread::start() is called (when running regularly inside Fawkes).

Parameters:
clockClock instance to use.

Definition at line 64 of file clock.cpp.

Referenced by fawkes::ClockAspectIniFin::init().


Member Data Documentation


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