Open Inventor Reference
SoTempPath Class Reference

This class is internal to Inventor. More...

#include <Inventor/misc/SoTempPath.h>

Inheritance diagram for SoTempPath:
SoFullPath SoPath SoBase

Public Member Functions

 SoTempPath (int approxLength)
 Constructor given approximate number of nodes in chain.
 
virtual ~SoTempPath ()
 
- Public Member Functions inherited from SoFullPath
void pop ()
 Override methods that normally stop at last public child:
 
SoNodegetTail () const
 These return the first and last nodes in a path chain.
 
SoNodegetNodeFromTail (int i) const
 Returns a pointer to the i'th node. Passing 0 for i returns the tail node.
 
int getIndexFromTail (int i) const
 Returns the index of the i'th node (within its parent) in the chain, counting backward from the tail node.
 
int getLength () const
 Returns length of path chain (number of nodes).
 
- Public Member Functions inherited from SoPath
 SoPath ()
 Constructs an empty path.
 
 SoPath (int approxLength)
 Constructs a path with a hint to length (number of nodes in chain).
 
 SoPath (SoNode *node)
 Constructs a path and sets the head node to the given node.
 
void setHead (SoNode *node)
 Sets head node (first node in chain).
 
void append (int childIndex)
 Adds node to end of chain; the node is the childIndex'th child of the current tail node.
 
void append (SoNode *childNode)
 Adds node to end of chain; uses the first occurrence of childNode as child of current tail node.
 
void append (const SoPath *fromPath)
 Adds all nodes in fromPath's chain to end of chain; the head node of fromPath must be the same as or a child of the current tail node.
 
void push (int childIndex)
 These allow a path to be treated as a stack; they push a node at the end of the chain and pop the last node off.
 
void pop ()
 These allow a path to be treated as a stack; they push a node at the end of the chain and pop the last node off.
 
SoNodegetHead () const
 These return the first and last nodes in a path chain.
 
SoNodegetTail () const
 These return the first and last nodes in a path chain.
 
SoNodegetNode (int i) const
 Returns a pointer to the i'th node in the chain.
 
SoNodegetNodeFromTail (int i) const
 Returns a pointer to the i'th node.
 
int getIndex (int i) const
 Return the index of the i'th node (within its parent) in the chain.
 
int getIndexFromTail (int i) const
 Return the index of the i'th node (within its parent) in the chain, counting backward from the tail node.
 
int getLength () const
 Returns length of path chain (number of nodes).
 
void truncate (int start)
 Truncates the path chain, removing all nodes from index start on.
 
bool containsNode (const SoNode *node) const
 Returns TRUE if the node is found anywhere in the path chain.
 
bool containsPath (const SoPath *path) const
 Returns TRUE if the nodes in the chain in the passed path are contained (in consecutive order) in this path chain.
 
int findFork (const SoPath *path) const
 If the two paths have different head nodes, this returns -1.
 
SoPathcopy (int startFromNodeIndex=0, int numNodes=0) const
 Creates and returns a new path that is a copy of some or all of this path.
 
virtual SoType getTypeId () const
 Returns type identifier for path instance.
 
void insertIndex (SoNode *parent, int newIndex)
 This is called when a node in the path chain has a child added.
 
void removeIndex (SoNode *parent, int oldIndex)
 This is called when a node in the path chain has a child removed.
 
void replaceIndex (SoNode *parent, int index, SoNode *newChild)
 This is called when a node in the path chain replaces a child.
 
virtual void write (SoWriteAction *writeAction) const
 Writes path using given write action.
 
bool isRelevantNotification (SoNotList *list) const
 Returns TRUE if the given notification list involves a change to a node that affects the path.
 
- Public Member Functions inherited from SoBase
void ref () const
 Adds and removes a reference to an instance.
 
void unref () const
 
void unrefNoDelete () const
 
void touch ()
 Marks an instance as modified, simulating a change to it.
 
virtual SoType getTypeId () const =0
 Returns the type identifier for a specific instance.
 
bool isOfType (SoType type) const
 Returns TRUE if this object is of the type specified in type or is derived from that type.
 
virtual SbName getName () const
 Returns the name of an instance.
 
virtual void setName (const SbName &name)
 Sets the name of an instance.
 
virtual void startNotify ()
 Initiates notification from an instance.
 
virtual void notify (SoNotList *list)
 Propagates modification notification through an instance.
 
void addAuditor (void *auditor, SoNotRec::Type type)
 Adds/removes an auditor to/from list.
 
void removeAuditor (void *auditor, SoNotRec::Type type)
 
const SoAuditorListgetAuditors ()
 Returns auditor list– used by SoField and SoEngineOutput to trace forward connections.
 
int getRefCount () const
 Returns current reference count.
 
virtual void addWriteReference (SoOutput *out, bool isFromField=FALSE)
 Adds a reference to the instance when writing.
 
bool shouldWrite ()
 Returns TRUE if the instance should be written, based on the write-reference info already accumulated.
 

Additional Inherited Members

- Static Public Member Functions inherited from SoPath
static SoType getClassTypeId ()
 Returns type identifier for SoPath class.
 
static SoPathgetByName (const SbName &name)
 
static int getByName (const SbName &name, SoPathList &list)
 These methods lookup and return paths with a given name.
 
static void initClass ()
 Initializes path class.
 
- Static Public Member Functions inherited from SoBase
static SoType getClassTypeId ()
 Returns type identifier for this class.
 
static void initClass ()
 Setup type information.
 
static void incrementCurrentWriteCounter ()
 Increments the current write counter at the start of a write operation.
 
static void decrementCurrentWriteCounter ()
 Decrements the current write counter after a write operation, in some rare cases.
 
static void addName (SoBase *, const char *)
 Internal methods used to maintain the global name dictionary.
 
static void removeName (SoBase *, const char *)
 
static SoBasegetNamedBase (const SbName &, SoType)
 Helper routines used to get stuff out of nameDict.
 
static int getNamedBases (const SbName &, SoBaseList &, SoType)
 
static bool read (SoInput *in, SoBase *&base, SoType expectedType)
 Reads one instance of some subclass of SoBase.
 
static void setInstancePrefix (const SbString &c)
 This defaults to "+" and is used when naming nodes that are DEF's and USE'd.
 
- Static Public Attributes inherited from SoBase
static bool traceRefs
 Turns on/off reference count tracing (for debugging)
 
- Protected Types inherited from SoBase
enum  BaseFlags { IS_ENGINE = 1 , IS_GROUP = 2 }
 This set of enums is used when reading and writing the base. More...
 
- Protected Member Functions inherited from SoPath
void auditPath (bool flag)
 Allows internal SoTempPath subclass to forego auditor overhead.
 
 ~SoPath ()
 
- Protected Member Functions inherited from SoBase
 SoBase ()
 Constructor is protected - this is an abstract class.
 
virtual ~SoBase ()
 Virtual destructor so that subclasses are deleted properly.
 
virtual void destroy ()
 Actually deletes an instance.
 
bool hasMultipleWriteRefs () const
 Returns TRUE if the instance has multiple write references.
 
bool writeHeader (SoOutput *out, bool isGroup, bool isEngine) const
 Writes a header (name, open brace) or footer (close brace) to file defined by SoOutput.
 
void writeFooter (SoOutput *out) const
 
virtual const char * getFileFormatName () const
 Unknown nodes and engines write a different name for themselves than their typeId; this virtual method lets them do that (by default the typeId name is returned)
 
virtual bool readInstance (SoInput *in, unsigned short flags)=0
 Reads stuff into instance of subclass.
 
- Static Protected Member Functions inherited from SoBase
static uint32_t getCurrentWriteCounter ()
 Returns current write counter.
 

Detailed Description

It allows "temporary" paths to be created - these paths do not support the same notification behavior as SoPaths, and are therefore faster to construct and modify. They are used during traversal to maintain the current path through a graph. Since such paths are short-lived, there is no reason to pay the price of the auditor overhead.

Definition at line 74 of file SoTempPath.h.

Constructor & Destructor Documentation

◆ SoTempPath()

SoTempPath::SoTempPath ( int  approxLength)

◆ ~SoTempPath()

virtual SoTempPath::~SoTempPath ( )
virtual

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