00001 /*---------------------------------------------------------------------------*\ 00002 * OpenSG * 00003 * * 00004 * * 00005 * Copyright (C) 2000-2002 by the OpenSG Forum * 00006 * * 00007 * www.opensg.org * 00008 * * 00009 * contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de * 00010 * * 00011 \*---------------------------------------------------------------------------*/ 00012 /*---------------------------------------------------------------------------*\ 00013 * License * 00014 * * 00015 * This library is free software; you can redistribute it and/or modify it * 00016 * under the terms of the GNU Library General Public License as published * 00017 * by the Free Software Foundation, version 2. * 00018 * * 00019 * This library is distributed in the hope that it will be useful, but * 00020 * WITHOUT ANY WARRANTY; without even the implied warranty of * 00021 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 00022 * Library General Public License for more details. * 00023 * * 00024 * You should have received a copy of the GNU Library General Public * 00025 * License along with this library; if not, write to the Free Software * 00026 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * 00027 * * 00028 \*---------------------------------------------------------------------------*/ 00029 /*---------------------------------------------------------------------------*\ 00030 * Changes * 00031 * * 00032 * * 00033 * * 00034 * * 00035 * * 00036 * * 00037 \*---------------------------------------------------------------------------*/ 00038 00039 #ifndef _OSGEXTRACHILDRENLIST_H_ 00040 #define _OSGEXTRACHILDRENLIST_H_ 00041 #ifdef __sgi 00042 #pragma once 00043 #endif 00044 00045 #include <OSGConfig.h> 00046 #include <OSGSystemDef.h> 00047 #include "OSGNewActionTypes.h" 00048 00049 #include <vector> 00050 00051 OSG_BEGIN_NAMESPACE 00052 00053 class OSG_SYSTEMLIB_DLLMAPPING ExtraChildrenList 00054 { 00055 public: 00056 /*---------------------------------------------------------------------*/ 00060 typedef NewActionTypes::PriorityType PriorityType; 00061 typedef NewActionTypes::PriorityTypeTraits PriorityTypeTraits; 00062 00064 /*---------------------------------------------------------------------*/ 00068 inline ExtraChildrenList(void); 00069 00071 /*---------------------------------------------------------------------*/ 00075 inline ~ExtraChildrenList(void); 00076 00078 /*---------------------------------------------------------------------*/ 00082 inline UInt32 addChild(const NodePtr &pChild ); 00083 inline UInt32 addChild(const NodePtr &pChild, PriorityType prio); 00084 00086 /*---------------------------------------------------------------------*/ 00090 inline NodePtr getChild (UInt32 childIndex ) const; 00091 00092 inline PriorityType getPriority(UInt32 childIndex ) const; 00093 inline void setPriority(UInt32 childIndex, 00094 PriorityType prio ); 00095 00096 inline bool getActive (UInt32 childIndex ) const; 00097 inline void setActive (UInt32 childIndex, 00098 bool active ); 00099 00101 /*---------------------------------------------------------------------*/ 00105 inline UInt32 getSize (void ) const; 00106 inline void clear (void ); 00107 00109 /*========================== PRIVATE ================================*/ 00110 private: 00111 /*---------------------------------------------------------------------*/ 00115 class ChildrenListEntry 00116 { 00117 public: 00118 inline ChildrenListEntry(void ); 00119 inline ChildrenListEntry(const NodePtr &pNode ); 00120 inline ChildrenListEntry(const NodePtr &pNode, PriorityType prio); 00121 00122 inline NodePtr getNode ( void ) const; 00123 inline void setNode (const NodePtr &pNode ); 00124 00125 inline PriorityType getPriority( void ) const; 00126 inline void setPriority( PriorityType prio ); 00127 00128 inline bool getActive ( void ) const; 00129 inline void setActive ( bool active); 00130 00131 private: 00132 NodePtr _pNode; 00133 PriorityType _priority; 00134 bool _active; 00135 }; 00136 00137 typedef std::vector<ChildrenListEntry> InternalChildrenList; 00138 typedef InternalChildrenList::iterator InternalChildrenListIt; 00139 typedef InternalChildrenList::const_iterator InternalChildrenListConstIt; 00140 00142 /*---------------------------------------------------------------------*/ 00143 00144 InternalChildrenList _childrenList; 00145 }; 00146 00147 OSG_END_NAMESPACE 00148 00149 #include "OSGExtraChildrenList.inl" 00150 00151 #define OSGEXTRACHILDRENLIST_HEADER_CVSID "@(#)$Id: OSGExtraChildrenList.h,v 1.2 2004/09/17 14:09:43 neumannc Exp $" 00152 00153 #endif /* _OSGEXTRACHILDRENLIST_H_ */
1.4.3