Coin Logo http://www.sim.no
http://www.coin3d.org

Public Member Functions
SoChildList Class Reference

The SoChildList class is a container for node children.This class does automatic notification on the parent nodes upon adding or removing children. More...

#include <Inventor/misc/SoChildList.h>

Inheritance diagram for SoChildList:
SoNodeList SoBaseList SbPList

List of all members.

Public Member Functions

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

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::SoChildList ( SoNode *const  parentptr)

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

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

Constructor with hint about list size.

See also:
SoNodeList::SoNodeList(const int)
SoChildList::SoChildList ( SoNode *const  parentptr,
const SoChildList cl 
)

Copy constructor.

See also:
SoNodeList::SoNodeList(const SoNodeList &)

References copy().

SoChildList::~SoChildList ( )

Destructor.

References truncate().


Member Function Documentation

void SoChildList::append ( SoNode *const  node)
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.

References SoBase::addAuditor(), SbPList::getLength(), SbList< Type >::getLength(), and SoNode::startNotify().

Referenced by SoGroup::insertChild(), and SoBaseKit::setPart().

void SoChildList::remove ( const int  index)
void SoChildList::truncate ( const int  length)
void SoChildList::copy ( const SoChildList cl)

Copy contents of cl into this list.

References SbPList::getLength(), SoNode::startNotify(), and truncate().

Referenced by SoFile::readNamedFile(), and SoChildList().

void SoChildList::set ( const int  index,
SoNode *const  node 
)
void SoChildList::traverseInPath ( SoAction *const  action,
const int  numindices,
const int *  indices 
)
void SoChildList::traverse ( SoAction *const  action)
void SoChildList::traverse ( SoAction *const  action,
const int  index 
)

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

References SbPList::getLength(), and traverse().

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

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

References SbPList::find(), and traverse().

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.

References SoNode::affectsState(), SoAction::getCurPathCode(), SbPList::getLength(), SoAction::hasTerminated(), SoAction::popCurPath(), SoAction::popPushCurPath(), SoDebugError::postWarning(), SoAction::pushCurPath(), and SoAction::traverse().

void SoChildList::addPathAuditor ( SoPath *const  path)

Notify path whenever this list of node children changes.

References SbList< Type >::append(), and SoDebugError::postInfo().

Referenced by SoPath::operator=().

void SoChildList::removePathAuditor ( SoPath *const  path)

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

Copyright © 1998-2007 by Systems in Motion AS. All rights reserved.

Generated on Wed Jul 18 2012 for Coin by Doxygen. 1.8.1.1