Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

OSGExtraChildrenList.inl

Go to the documentation of this file.
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 OSG_BEGIN_NAMESPACE
00040 
00041 /*-------------------------------------------------------------------------*/
00042 /* NOTE NOTE                                                               */
00043 /* ExtraChildrenList::ChildrenListEntry must be defined first, because     */
00044 /* the rest depends on the definition for inlining.                        */
00045 /*-------------------------------------------------------------------------*/
00046 
00047 /*-------------------------------------------------------------------------*/
00048 /*    PRIVATE Types                                                        */
00049 
00050 inline
00051 ExtraChildrenList::ChildrenListEntry::ChildrenListEntry(void)
00052     : _pNode   (NullFC                              ),
00053       _priority(PriorityTypeTraits::getZeroElement()),
00054       _active  (false                               )
00055 {
00056 }
00057 
00058 inline
00059 ExtraChildrenList::ChildrenListEntry::ChildrenListEntry(const NodePtr &pNode)
00060     : _pNode   (pNode                               ),
00061       _priority(PriorityTypeTraits::getZeroElement()),
00062       _active  (true                                )
00063 {
00064 }
00065 
00066 inline
00067 ExtraChildrenList::ChildrenListEntry::ChildrenListEntry(
00068     const NodePtr &pNode, PriorityType prio)
00069 
00070     : _pNode   (pNode),
00071       _priority(prio ),
00072       _active  (true )
00073 {
00074 }
00075 
00076 inline NodePtr
00077 ExtraChildrenList::ChildrenListEntry::getNode(void) const
00078 {
00079     return _pNode;
00080 }
00081 
00082 inline void
00083 ExtraChildrenList::ChildrenListEntry::setNode(const NodePtr &pNode)
00084 {
00085     _pNode = pNode;
00086 }
00087 
00088 inline ExtraChildrenList::PriorityType
00089 ExtraChildrenList::ChildrenListEntry::getPriority(void) const
00090 {
00091     return _priority;
00092 }
00093 
00094 inline void
00095 ExtraChildrenList::ChildrenListEntry::setPriority(PriorityType prio)
00096 {
00097     _priority = prio;
00098 }
00099 
00100 inline bool
00101 ExtraChildrenList::ChildrenListEntry::getActive(void) const
00102 {
00103     return _active;
00104 }
00105 
00106 inline void
00107 ExtraChildrenList::ChildrenListEntry::setActive(bool active)
00108 {
00109     _active = active;
00110 }
00111 
00112 /*-------------------------------------------------------------------------*/
00113 /*    Constructors                                                         */
00114 
00115 inline
00116 ExtraChildrenList::ExtraChildrenList(void)
00117     : _childrenList()
00118 {
00119 }
00120 
00121 /*-------------------------------------------------------------------------*/
00122 /*    Destructor                                                           */
00123 
00124 inline
00125 ExtraChildrenList::~ExtraChildrenList(void)
00126 {
00127 }
00128 
00129 /*-------------------------------------------------------------------------*/
00130 /*    Add                                                                  */
00131 
00132 inline UInt32
00133 ExtraChildrenList::addChild(const NodePtr &pNode)
00134 {
00135     UInt32 childIndex = _childrenList.size();
00136 
00137     _childrenList.push_back(ChildrenListEntry(pNode));
00138 
00139     return childIndex;
00140 }
00141 
00142 inline UInt32
00143 ExtraChildrenList::addChild(const NodePtr &pNode, PriorityType prio)
00144 {
00145     UInt32 childIndex = _childrenList.size();
00146 
00147     _childrenList.push_back(ChildrenListEntry(pNode, prio));
00148 
00149     return childIndex;
00150 }
00151 
00152 /*-------------------------------------------------------------------------*/
00153 /*    Access                                                               */
00154 
00155 inline NodePtr
00156 ExtraChildrenList::getChild(UInt32 childIndex) const
00157 {
00158     return _childrenList[childIndex].getNode();
00159 }
00160 
00161 inline ExtraChildrenList::PriorityType
00162 ExtraChildrenList::getPriority(UInt32 childIndex) const
00163 {
00164     return _childrenList[childIndex].getPriority();
00165 }
00166 
00167 inline void
00168 ExtraChildrenList::setPriority(UInt32 childIndex, PriorityType prio)
00169 {
00170     _childrenList[childIndex].setPriority(prio);
00171 }
00172 
00173 inline bool
00174 ExtraChildrenList::getActive(UInt32 childIndex) const
00175 {
00176     return _childrenList[childIndex].getActive();
00177 }
00178 
00179 inline void
00180 ExtraChildrenList::setActive(UInt32 childIndex, bool bActive)
00181 {
00182     _childrenList[childIndex].setActive(bActive);
00183 }
00184 
00185 /*-------------------------------------------------------------------------*/
00186 /*    Misc                                                                 */
00187 
00188 inline UInt32
00189 ExtraChildrenList::getSize(void) const
00190 {
00191     return _childrenList.size();
00192 }
00193 
00194 inline void
00195 ExtraChildrenList::clear(void)
00196 {
00197     _childrenList.clear();
00198 }
00199 
00200 OSG_END_NAMESPACE
00201 
00202 #define OSGEXTRACHILDRENLIST_INLINE_CVSID "@(#)$Id: OSGExtraChildrenList.inl,v 1.2 2004/09/17 14:09:43 neumannc Exp $"

Generated on Thu Aug 25 04:04:38 2005 for OpenSG by  doxygen 1.4.3