Base class for objects which change from time to time.
More...
#include <memcore/Ageable.hpp>
List of all members.
Public Member Functions
-
Ageable (const volatile Ageable &A) throw ()
- Copy constructor.
-
Ageable (const Ageable &A) throw ()
- Copy constructor.
-
Ageable (time_t t) throw ()
- Constructor with explicit time value.
-
Ageable () throw ()
- Constructor; remembers birth time from current time counter.
-
bool isNewerThan (const Ageable &a) const throw ()
- Comparison operator.
-
bool isOlderThan (const Ageable &a) const throw ()
- Comparison operator.
-
bool isYoungerThan (const Ageable &a) const throw ()
- Comparison operator (alias to isNewerThan() ).
-
bool operator!= (const Ageable &a) const throw ()
- Comparison operator.
-
bool operator< (volatile const Ageable &a) const volatile throw ()
-
bool operator< (const Ageable &a) const throw ()
- Comparison operator.
-
bool operator<= (const volatile Ageable &a) const volatile throw ()
- Comparision operator.
-
bool operator<= (const Ageable &a) const throw ()
- Comparision operator.
-
bool operator== (const Ageable &a) const throw ()
- Comparison operator.
-
bool operator> (const volatile Ageable &a) const volatile throw ()
- Comparision operator.
-
bool operator> (const Ageable &a) const throw ()
- Comparison operator.
-
bool operator>= (const volatile Ageable &a) const volatile throw ()
- Comparison operator.
-
bool operator>= (const Ageable &a) const throw ()
- Comparision operator.
-
time_t time_value () const volatile throw ()
- Return an object's current age.
-
time_t time_value () const throw ()
- Return an object's current age.
- time_t touch () throw ()
- Mark the current object as being modified "now".
-
time_t update (time_t age) throw ()
- Set the age of the current object to a specific age if that is newer than the current one.
-
time_t update (const volatile Ageable &Other) volatile throw ()
- Set the age of the current object to the age of another object if that other one is newer than the current one.
-
time_t update (const Ageable &Other) throw ()
- Set the age of the current object to the age of another object if that other one is newer than the current one.
-
~Ageable () throw ()
- Destructor.
Static Public Member Functions
- static const Ageable & InfinitelyOld () throw ()
- Return a time that is infinitely in the past (well, sort of).
-
static time_t now () throw ()
- Return the current global time.
Detailed Description
Base class for objects which change from time to time.
Upon touching such "ageable" objects, a change is indicated. The "age" is not related to physical time, but just an integer number. This number is a global counter that is increased when any object is touched.
Member Function Documentation
static const Ageable& Ageable::InfinitelyOld |
( |
|
) |
throw () [inline, static] |
Return a time that is infinitely in the past (well, sort of).
It is a reference to a static members whose time value is zero, means it's the oldest of all objects (smallest age).
time_t Ageable::touch |
( |
|
) |
throw () [inline] |
Mark the current object as being modified "now".
The global time counter is increased by this operation.
The documentation for this class was generated from the following files:
- memcore/Ageable.hpp
- memcore/Ageable.cpp