Open Inventor Release 2024.1.3
 
Loading...
Searching...
No Matches
SoNodeDependencies Class Reference

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>

+ Inheritance diagram for SoNodeDependencies:

Public Member Functions

 SoNodeDependencies ()
 
 ~SoNodeDependencies ()
 
bool isValid (SoState *state) const
 Returns true if the cache is valid for the given state.
 
void updateCache (SoState *state)
 Update cache according to given state.
 
void invalidate ()
 Manually invalidate the cache.
 
template<typename SO_ELEMENT >
void addDependency ()
 Add given element type as a dependency for the cache.
 
void addDependency (SoField &field)
 Add given field as a dependency for the cache.
 
void addDependency (SoType type, int classStackIndex)
 Add given element type as a dependency for the cache.
 
- Public Member Functions inherited from SoRefCounter
void ref () const
 Adds a reference to an instance.
 
void unref () const
 Removes a reference from an instance.
 
void unrefNoDelete () const
 unrefNoDelete() should be called when it is desired to decrement the reference count, but not delete the instance if this brings the reference count to zero.
 
int getRefCount () const
 Returns current reference count.
 
void lock () const
 lock this instance.
 
void unlock () const
 unlock this instance.
 

Detailed Description

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.

Definition at line 50 of file SoNodeDependencies.h.

Constructor & Destructor Documentation

◆ SoNodeDependencies()

SoNodeDependencies::SoNodeDependencies ( )

◆ ~SoNodeDependencies()

SoNodeDependencies::~SoNodeDependencies ( )

Member Function Documentation

◆ addDependency() [1/3]

template<typename SO_ELEMENT >
void SoNodeDependencies::addDependency ( )
inline

Add given element type as a dependency for the cache.

Definition at line 76 of file SoNodeDependencies.h.

◆ addDependency() [2/3]

void SoNodeDependencies::addDependency ( SoField field)

Add given field as a dependency for the cache.

◆ addDependency() [3/3]

void SoNodeDependencies::addDependency ( SoType  type,
int  classStackIndex 
)

Add given element type as a dependency for the cache.

◆ invalidate()

void SoNodeDependencies::invalidate ( )

Manually invalidate the cache.

◆ isValid()

bool SoNodeDependencies::isValid ( SoState state) const

Returns true if the cache is valid for the given state.

◆ updateCache()

void SoNodeDependencies::updateCache ( SoState state)

Update cache according to given state.

After this call, the cache will be valid.


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