Coin  4.0.3
Coin3D core library
Loading...
Searching...
No Matches
SoChildList Class Reference

The SoChildList class is a container for node children. More...

#include <Inventor/misc/SoChildList.h>

Inheritance diagram for SoChildList:
SoNodeList SoBaseList SbPList

Public Member Functions

 SoChildList (SoNode *const parent)
 
 SoChildList (SoNode *const parent, const int size)
 
 SoChildList (SoNode *const parent, const SoChildList &cl)
 
 ~SoChildList ()
 
void addPathAuditor (SoPath *const path)
 
void append (SoNode *const node)
 
void copy (const SoChildList &cl)
 
void insert (SoNode *const ptr, const int addbefore)
 
void remove (const int index)
 
void removePathAuditor (SoPath *const path)
 
void set (const int index, SoNode *const node)
 
void traverse (SoAction *const action)
 
void traverse (SoAction *const action, const int first, const int last)
 
void traverse (SoAction *const action, const int index)
 
void traverse (SoAction *const action, SoNode *node)
 
void traverseInPath (SoAction *const action, const int numindices, const int *indices)
 
void truncate (const int length)
 
- Public Member Functions inherited from SoNodeList
 SoNodeList (const int size)
 
 SoNodeList (const SoNodeList &nl)
 
 SoNodeList (void)
 
 ~SoNodeList ()
 
void append (SoNode *const ptr)
 
SoNodeListoperator= (const SoNodeList &nl)
 
SoNodeoperator[] (const int i) const
 
- Public Member Functions inherited from SoBaseList
 SoBaseList (const int size)
 
 SoBaseList (const SoBaseList &l)
 
 SoBaseList (void)
 
 ~SoBaseList ()
 
void addReferences (const SbBool flag)
 
void append (SoBase *ptr)
 
void copy (const SoBaseList &l)
 
void insert (SoBase *ptr, const int addbefore)
 
SbBool isReferencing (void) const
 
SoBaseListoperator= (const SoBaseList &l)
 
SoBaseoperator[] (const int i) const
 
void remove (const int index)
 
void removeItem (SoBase *item)
 
void set (const int i, SoBase *const ptr)
 
void truncate (const int length)
 
- Public Member Functions inherited from SbPList
 SbPList (const int sizehint=DEFAULTSIZE)
 
 SbPList (const SbPList &l)
 
 ~SbPList ()
 
void append (void *item)
 
void copy (const SbPList &l)
 
int find (const void *item) const
 
void fit (void)
 
voidget (const int index) const
 
void ** getArrayPtr (const int start=0) const
 
int getLength (void) const
 
void insert (void *item, const int insertbefore)
 
int operator!= (const SbPList &l) const
 
SbPListoperator= (const SbPList &l)
 
int operator== (const SbPList &l) const
 
void *& operator[] (const int index) const
 
void remove (const int index)
 
void removeFast (const int index)
 
void removeItem (void *item)
 
void set (const int index, void *item)
 
void truncate (const int length, const int fit=0)
 

Additional Inherited Members

- Protected Member Functions inherited from SbPList
void expand (const int size)
 
int getArraySize (void) const
 

Detailed Description

The SoChildList class is a container for node children.

This class does automatic notification on the parent nodes upon adding or removing children.

Methods for action traversal of the children are also provided.

Constructor & Destructor Documentation

◆ SoChildList() [1/3]

SoChildList::SoChildList ( SoNode *const parentptr)

Default constructor, sets parent container and initializes a minimal list.

◆ SoChildList() [2/3]

SoChildList::SoChildList ( SoNode *const parentptr,
const int size )

Constructor with hint about list size.

See also
SoNodeList::SoNodeList(const int)

◆ SoChildList() [3/3]

SoChildList::SoChildList ( SoNode *const parentptr,
const SoChildList & cl )

Copy constructor.

See also
SoNodeList::SoNodeList(const SoNodeList &)

◆ ~SoChildList()

SoChildList::~SoChildList ( )

Destructor.

Member Function Documentation

◆ addPathAuditor()

void SoChildList::addPathAuditor ( SoPath *const path)

Notify path whenever this list of node children changes.

◆ append()

void SoChildList::append ( SoNode *const node)

Append a new node instance as a child of our parent container.

Automatically notifies parent node and any SoPath instances auditing paths with nodes from this list.

Overloaded from parent to accept an SoNode pointer argument.

See also
SbPList::insert()

◆ copy()

void SoChildList::copy ( const SoChildList & cl)

Copy contents of cl into this list.

Overloaded from parent to handle notification.

See also
SbPList::copy()

◆ insert()

void SoChildList::insert ( SoNode *const node,
const int addbefore )

Insert a new node instance as a child of our parent container at position addbefore.

Automatically notifies parent node and any SoPath instances auditing paths with nodes from this list.

Overloaded from parent to accept an SoNode pointer argument.

See also
SbPList::insert()

◆ remove()

void SoChildList::remove ( const int index)

Remove the item at index, moving all subsequent items downwards one place in the list.

Automatically notifies parent node and any SoPath instances auditing paths with nodes from this list.

Overloaded from parent to handle notification.

See also
SbPList::remove(const int index)

◆ removePathAuditor()

void SoChildList::removePathAuditor ( SoPath *const path)

Remove path as an auditor for our list of node children.

◆ set()

void SoChildList::set ( const int index,
SoNode *const node )

Index operator to set element at index. Does not expand array bounds if index is outside the list.

Overloaded from parent to handle notification.

See also
SbPList::set()

◆ traverse() [1/4]

void SoChildList::traverse ( SoAction *const action)

Traverse all nodes in the list, invoking their methods for the given action.

◆ traverse() [2/4]

void SoChildList::traverse ( SoAction *const action,
const int first,
const int last )

Traverse child nodes in the list from index first up to and including index last, or until the SoAction::hasTerminated() flag of action has been set.

◆ traverse() [3/4]

void SoChildList::traverse ( SoAction *const action,
const int index )

Traverse the node at index (and possibly its children, if it is a group node), applying the node's method for the given action.

◆ traverse() [4/4]

void SoChildList::traverse ( SoAction *const action,
SoNode * node )

Traverse the node (and possibly its children, if it is a group node), applying the nodes method for the given action.

◆ traverseInPath()

void SoChildList::traverseInPath ( SoAction *const action,
const int numindices,
const int * indices )

Optimized IN_PATH traversal method.

This method is an extension versus the Open Inventor API.

◆ truncate()

void SoChildList::truncate ( const int length)

Shorten the list to contain length elements, removing items from index length and onwards.

If fit is non-zero, will also shrink the internal size of the allocated array. Note that this is much less efficient than not re-fitting the array size.

Overloaded from parent to handle notification.

See also
SbPList::truncate()

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