osgEarth 2.1.1
|
Public Member Functions | |
void | dirty () |
virtual void | sync (Revision &externalRevision) const |
bool | outOfSyncWith (const Revision &externalRevision) const |
virtual bool | inSyncWith (const Revision &externalRevision) const |
Protected Member Functions | |
Revisioned () | |
void | setAlwaysDirty (bool value) |
Private Attributes | |
Revision | _revision |
bool | _alwaysDirty |
Base class for a revisioned object. A Revisioned object is one that keeps track of its state with a version number. Other objects can then hold a Revision object (see above) and use it to see if they are up to date with this object, thereby enabling passive data model synchronization.
Definition at line 48 of file Revisioning.
osgEarth::Revisioned< T >::Revisioned | ( | ) | [inline, protected] |
Definition at line 73 of file Revisioning.
: _revision(0), _alwaysDirty(false) { }
void osgEarth::Revisioned< T >::dirty | ( | ) | [inline] |
virtual bool osgEarth::Revisioned< T >::inSyncWith | ( | const Revision & | externalRevision | ) | const [inline, virtual] |
Returns true if the external object is at the same revision as this object.
Definition at line 68 of file Revisioning.
{ return _alwaysDirty ? false : _revision == externalRevision; }
bool osgEarth::Revisioned< T >::outOfSyncWith | ( | const Revision & | externalRevision | ) | const [inline] |
Returns true if the external object is at a different revision that this object.
Definition at line 63 of file Revisioning.
{ return !inSyncWith( externalRevision ); }
void osgEarth::Revisioned< T >::setAlwaysDirty | ( | bool | value | ) | [inline, protected] |
Marks this object as always being dirty (i.e. inSyncWith() will always return false)
Definition at line 76 of file Revisioning.
{ _alwaysDirty = value; }
virtual void osgEarth::Revisioned< T >::sync | ( | Revision & | externalRevision | ) | const [inline, virtual] |
Synchronizes the external revision number with this revision, effectively bringing the external object up to date.
Definition at line 58 of file Revisioning.
{ externalRevision = _revision; }
bool osgEarth::Revisioned< T >::_alwaysDirty [private] |
Definition at line 82 of file Revisioning.
Revision osgEarth::Revisioned< T >::_revision [private] |
Definition at line 81 of file Revisioning.