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:
SoRefCounter

List of all members.

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)

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.


Constructor & Destructor Documentation

SoNodeDependencies::SoNodeDependencies (  ) 
SoNodeDependencies::~SoNodeDependencies (  ) 

Member Function Documentation

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.

template<typename SO_ELEMENT >
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.


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

Open Inventor Toolkit reference manual, generated on 15 Mar 2023
Copyright © Thermo Fisher Scientific All rights reserved.
http://www.openinventor.com/