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 _OSGNODEPTRIMPL_H_ 00040 #define _OSGNODEPTRIMPL_H_ 00041 #ifdef __sgi 00042 #pragma once 00043 #endif 00044 00045 #ifdef OSG_DOC_FILES_IN_MODULE 00046 00049 #endif 00050 00051 #include <OSGBaseTypes.h> 00052 #include <OSGSystemDef.h> 00053 #include <OSGAttachmentContainerPtr.h> 00054 00055 OSG_BEGIN_NAMESPACE 00056 00057 class Node; 00058 class NodeCore; 00059 00060 class CNodePtr; 00061 00062 //--------------------------------------------------------------------------- 00063 // Class 00064 //--------------------------------------------------------------------------- 00065 00069 #ifdef __sgi 00070 #pragma set woff 1375,1424 00071 #endif 00072 00073 #ifdef OSG_LINUX_ICC 00074 #pragma warning( disable : 444 ) 00075 #endif 00076 00077 class OSG_SYSTEMLIB_DLLMAPPING NodePtr : public AttachmentContainerPtr 00078 { 00079 /*========================== PUBLIC =================================*/ 00080 00081 public: 00082 00083 typedef Node StoredObjectType; 00084 typedef NodePtr ObjectType; 00085 00086 typedef AttachmentContainerPtr Inherited; 00087 00088 /*---------------------------------------------------------------------*/ 00092 template <class InTypeT> 00093 static NodePtr dcast(const InTypeT oIn); 00094 00096 /*---------------------------------------------------------------------*/ 00100 NodePtr(void); 00101 NodePtr(const NodePtr &source); 00102 NodePtr(const NullFieldContainerPtr &source); 00103 explicit NodePtr(const CNodePtr &source); 00104 00106 /*---------------------------------------------------------------------*/ 00110 ~NodePtr(void); 00111 00113 /*---------------------------------------------------------------------*/ 00117 NodeCore *getCore(void); 00118 NodeCore *getCore(void) const; 00119 00121 /*---------------------------------------------------------------------*/ 00125 Node *operator->(void); 00126 Node *operator->(void) const; 00127 00128 Node &operator *(void); 00129 Node &operator *(void) const; 00130 00131 Node *getCPtr (void); 00132 Node *getCPtr (void) const; 00133 00135 /*---------------------------------------------------------------------*/ 00139 void operator =(const CNodePtr &source); 00140 void operator =(const NodePtr &source); 00141 void operator =(const NullFieldContainerPtr &source); 00142 00144 /*---------------------------------------------------------------------*/ 00150 explicit NodePtr(const Node &source); 00151 explicit NodePtr(const Node *source); 00152 00154 /*========================= PROTECTED ===============================*/ 00155 00156 protected: 00157 00158 /*---------------------------------------------------------------------*/ 00162 NodePtr(const Node *source, 00163 const UInt16 uiSize, 00164 const UInt16 uiParentPos); 00165 00167 /*========================== PRIVATE ================================*/ 00168 00169 private: 00170 00171 friend class FieldContainer; 00172 }; 00173 00174 #ifdef OSG_LINUX_ICC 00175 #pragma warning( default : 444 ) 00176 #endif 00177 00178 #ifdef __sgi 00179 #pragma reset woff 1375,1424 00180 #endif 00181 00185 OSG_SYSTEMLIB_DLLMAPPING 00186 std::ostream &operator <<( std::ostream &os, 00187 const NodePtr &fc); 00188 00189 00193 OSG_SYSTEMLIB_DLLMAPPING 00194 NodePtr makeNodeFor(NodeCorePtr core); 00195 00196 00197 OSG_END_NAMESPACE 00198 00199 #define OSGNODEPTR_HEADER_CVSID "@(#)$Id: $" 00200 00201 #endif /* _OSGNODEPTRIMPL_H_ */
1.4.3