This class is a cache handler that can be used to monitor the modifications made to elements or fields. More...
#include <Inventor/caches/SoNodeDependencies.h>
Classes | |
struct | CachedElement |
Public Member Functions | |
SoNodeDependencies () | |
~SoNodeDependencies () | |
bool | isValid (SoState *state) const |
void | updateCache (SoState *state) |
void | invalidate () |
template<typename SO_ELEMENT > | |
void | addDependency () |
void | addDependency (SoField &field) |
void | addDependency (SoType type, int classStackIndex) |
This class is a cache handler that can be used to monitor the modifications made to elements or fields.
In order to add new Elements or Fields to be monitored by the cache, use the appropriate addDependency() method.
If one of the added elements or fields has been modified since the last call to updateCache(), the isValid() method will return false, and a subsequent call to updateCache() will make it valid again.
Additionnally, the handled cache can be manually invalidated using the invalidate() method.
SoNodeDependencies::SoNodeDependencies | ( | ) |
SoNodeDependencies::~SoNodeDependencies | ( | ) |
void SoNodeDependencies::addDependency | ( | SoType | type, | |
int | classStackIndex | |||
) |
Add given element type as a dependency for the cache.
void SoNodeDependencies::addDependency | ( | SoField & | field | ) |
Add given field as a dependency for the cache.
void SoNodeDependencies::addDependency | ( | ) | [inline] |
Add given element type as a dependency for the cache.
void SoNodeDependencies::invalidate | ( | ) |
Manually invalidate the cache.
bool SoNodeDependencies::isValid | ( | SoState * | state | ) | const |
Returns true if the cache is valid for the given state.
void SoNodeDependencies::updateCache | ( | SoState * | state | ) |
Update cache according to given state.
After this call, the cache will be valid.