This class is a helper class for the Timestamp class and holds various information of an object like the timestamp, its dependencies etc. More...
#include <Timestamp.hpp>
Public Member Functions | |
ObjectInfo () | |
Do not use it; it will cause an assertion to fire! | |
ObjectInfo (Timestamp &parent_collection) | |
virtual | ~ObjectInfo () |
void | addDependency (const std::string &object_name) |
Adds dependencies to the given object. | |
void | removeDependency (const std::string &object_name) |
Removes dependencies from a given object. | |
bool | dependenciesHaveChanged () const |
Check timestamp of all dependencies. | |
bool | dependencyHasChanged (const std::string &other_object) const |
Check timestamp of a single dependency. | |
bool | isMoreRecentThan (const std::string &object, bool dependencies=true) const |
void | update () |
Updates the timestamp of the object. |
This class is a helper class for the Timestamp class and holds various information of an object like the timestamp, its dependencies etc.
Definition at line 215 of file Timestamp.hpp.
TRTK::Timestamp::ObjectInfo::ObjectInfo | ( | ) |
Do not use it; it will cause an assertion to fire!
Constructs an invalid ObjectInfo object.
This constructor must be defined to allow the use of ObjectInfo objects in certain associative containers of the STL. Nevertheless add only otherwise initialized objects...
Definition at line 96 of file Timestamp.cpp.
TRTK::Timestamp::ObjectInfo::ObjectInfo | ( | Timestamp & | parent_collection ) |
Constructs an ObjectInfo object.
Definition at line 107 of file Timestamp.cpp.
TRTK::Timestamp::ObjectInfo::~ObjectInfo | ( | ) | [virtual] |
Destroys an ObjectInfo object.
Definition at line 116 of file Timestamp.cpp.
void TRTK::Timestamp::ObjectInfo::addDependency | ( | const std::string & | object_name ) |
Adds dependencies to the given object.
[in] | object_name | name of the object to be processed |
This allows you to check if some required objects were already set up or up-to-date (providing you use the timestamp mechanism consistently).
Definition at line 131 of file Timestamp.cpp.
bool TRTK::Timestamp::ObjectInfo::dependenciesHaveChanged | ( | ) | const |
Check timestamp of all dependencies.
Check if the timestamps of all dependencies are further back in time than the timestamp of this object.
Definition at line 148 of file Timestamp.cpp.
bool TRTK::Timestamp::ObjectInfo::dependencyHasChanged | ( | const std::string & | other_object ) | const |
Check timestamp of a single dependency.
Check if the timestamp of a single dependency is further back in time than the timestamp of this object (checking is done recursively, though).
Definition at line 177 of file Timestamp.cpp.
bool TRTK::Timestamp::ObjectInfo::isMoreRecentThan | ( | const std::string & | object, |
bool | dependencies = true |
||
) | const |
Checks if the timestamp of the given object is further back in time than the one of *this
.
If dependencies
is set to true
, dependencies of object
are regarded as well, i.e. if any dependency is more recent than *this
then false
is returned.
[in] | other_object | object to check against |
[in] | dependencies | specifies if dependencies shall be checked as well |
Definition at line 240 of file Timestamp.cpp.
void TRTK::Timestamp::ObjectInfo::removeDependency | ( | const std::string & | object_name ) |
Removes dependencies from a given object.
[in] | object_name | name of the object to be processed |
Definition at line 286 of file Timestamp.cpp.
void TRTK::Timestamp::ObjectInfo::update | ( | ) |
Updates the timestamp of the object.
[in] | object_name | name of the object to be processed |
Definition at line 297 of file Timestamp.cpp.
Documentation generated by Doxygen