00001 /*---------------------------------------------------------------------------*\ 00002 * OpenSG * 00003 * * 00004 * * 00005 * Copyright (C) 2000-2002,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 _OSGCNODEPTRIMPL_INL_ 00040 #define _OSGCNODEPTRIMPL_INL_ 00041 00042 #ifdef OSG_DOC_FILES_IN_MODULE 00043 00046 #endif 00047 00048 OSG_BEGIN_NAMESPACE 00049 00050 //--------------------------------------------------------------------------- 00051 // Class 00052 //--------------------------------------------------------------------------- 00053 00054 /*-------------------------------------------------------------------------*/ 00055 /* Constructors */ 00056 00057 inline 00058 CNodePtr::CNodePtr(void) : 00059 Inherited() 00060 { 00061 } 00062 00063 inline 00064 CNodePtr::CNodePtr(const CNodePtr &source) : 00065 Inherited(source) 00066 { 00067 } 00068 00069 inline 00070 CNodePtr::CNodePtr(const NullFieldContainerPtr &source) : 00071 Inherited(source) 00072 { 00073 } 00074 00075 inline 00076 CNodePtr::CNodePtr(const NodePtr &source) : 00077 Inherited(source) 00078 { 00079 } 00080 00081 /*-------------------------------------------------------------------------*/ 00082 /* Destructor */ 00083 00084 inline 00085 CNodePtr::~CNodePtr(void) 00086 { 00087 } 00088 00089 /*-------------------------------------------------------------------------*/ 00090 /* Node */ 00091 00092 inline 00093 Node *CNodePtr::getNode(void) 00094 { 00095 return (Node *) getElemP(Thread::getAspect()); 00096 } 00097 00098 inline 00099 Node *CNodePtr::getNode(void) const 00100 { 00101 return (Node *) getElemP(Thread::getAspect()); 00102 } 00103 00104 /*-------------------------------------------------------------------------*/ 00105 /* Container Access */ 00106 00107 inline 00108 NodeCore *CNodePtr::operator->(void) 00109 { 00110 return ((Node *) getElemP(Thread::getAspect()))->getCore().getCPtr(); 00111 } 00112 00113 inline 00114 NodeCore *CNodePtr::operator->(void) const 00115 { 00116 return ((Node *) getElemP(Thread::getAspect()))->getCore().getCPtr(); 00117 } 00118 00119 inline 00120 NodeCore &CNodePtr::operator *(void) 00121 { 00122 return *(((Node *) getElemP(Thread::getAspect()))->getCore().getCPtr()); 00123 } 00124 00125 inline 00126 NodeCore &CNodePtr::operator *(void) const 00127 { 00128 return *(((Node *) getElemP(Thread::getAspect()))->getCore().getCPtr()); 00129 } 00130 00131 inline 00132 NodeCore *CNodePtr::getCPtr(void) 00133 { 00134 return ((Node *) getElemP(Thread::getAspect()))->getCore().getCPtr(); 00135 } 00136 00137 inline 00138 NodeCore *CNodePtr::getCPtr(void) const 00139 { 00140 return ((Node *) getElemP(Thread::getAspect()))->getCore().getCPtr(); 00141 } 00142 00143 /*-------------------------------------------------------------------------*/ 00144 /* Assignment */ 00145 00146 inline 00147 void CNodePtr::operator = (const NodePtr &source) 00148 { 00149 // copy parts inherited from parent 00150 *(static_cast<Inherited *>(this)) = source; 00151 } 00152 00153 inline 00154 void CNodePtr::operator = (const CNodePtr &source) 00155 { 00156 // copy parts inherited from parent 00157 *(static_cast<Inherited *>(this)) = source; 00158 } 00159 00160 inline 00161 void CNodePtr::operator = (const NullFieldContainerPtr &source) 00162 { 00163 // copy parts inherited from parent 00164 *(static_cast<Inherited *>(this)) = source; 00165 } 00166 00167 /*-------------------------------------------------------------------------*/ 00168 /* Constructors */ 00169 00170 inline 00171 CNodePtr::CNodePtr(const Node &source) : 00172 Inherited(source) 00173 { 00174 } 00175 00176 inline 00177 CNodePtr::CNodePtr(const Node *source) : 00178 Inherited(source) 00179 { 00180 } 00181 00182 inline 00183 CNodePtr::CNodePtr(const Node *source, 00184 const UInt16 uiSize, 00185 const UInt16 uiParentPos) : 00186 Inherited(source, uiSize, uiParentPos) 00187 { 00188 } 00189 00190 OSG_END_NAMESPACE 00191 00192 #define OSGNODEPTR_INLINE_CVSID "@(#)$Id: $" 00193 00194 #endif /* _OSGCNODEPTRIMPL_INL_ */
1.5.5