Changeset 1138 for branches/Carsten_PtrWork2/Source/System/FieldContainer/Fields/Base/OSGPointerSFieldBase.h
- Timestamp:
- 04/07/08 02:50:33 (8 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/Carsten_PtrWork2/Source/System/FieldContainer/Fields/Base/OSGPointerSFieldBase.h
r1072 r1138 1 /*---------------------------------------------------------------------------*\ 2 * OpenSG * 3 * * 4 * * 5 * Copyright (C) 2008 by the OpenSG Forum * 6 * * 7 * www.opensg.org * 8 * * 9 * contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de * 10 * * 11 \*---------------------------------------------------------------------------*/ 12 /*---------------------------------------------------------------------------*\ 13 * License * 14 * * 15 * This library is free software; you can redistribute it and/or modify it * 16 * under the terms of the GNU Library General Public License as published * 17 * by the Free Software Foundation, version 2. * 18 * * 19 * This library is distributed in the hope that it will be useful, but * 20 * WITHOUT ANY WARRANTY; without even the implied warranty of * 21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 22 * Library General Public License for more details. * 23 * * 24 * You should have received a copy of the GNU Library General Public * 25 * License along with this library; if not, write to the Free Software * 26 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * 27 * * 28 \*---------------------------------------------------------------------------*/ 29 /*---------------------------------------------------------------------------*\ 30 * Changes * 31 * * 32 * * 33 * * 34 * * 35 * * 36 * * 37 \*---------------------------------------------------------------------------*/ 1 38 2 39 #ifndef _OSGPOINTERSFIELDBASE_H_ … … 7 44 #endif 8 45 9 #include "OSGConfig.h" 10 #include "OSGField.h" 11 #include "OSGContainerForwards.h" 46 #include "OSGSystemDef.h" 47 #include "OSGSField.h" 48 #include "OSGFieldContainerFieldTraits.h" 49 50 #include "OSGGetPointerSFieldBaseHandle.h" 51 #include "OSGGetPointerSFieldHandle.h" 12 52 #include "OSGEditPointerSFieldBaseHandle.h" 13 #include "OSGGetPointerSFieldBaseHandle.h" 14 53 #include "OSGEditPointerSFieldHandle.h" 15 54 16 55 #ifdef OSG_DOC_FILES_IN_MODULE … … 22 61 OSG_BEGIN_NAMESPACE 23 62 24 class PointerSFieldBase : public Field63 class OSG_SYSTEM_DLLMAPPING PointerSFieldBase : public Field 25 64 { 26 65 /*========================== PUBLIC =================================*/ 66 27 67 public: 68 28 69 /*---------------------------------------------------------------------*/ 29 70 /*! \name Public Types */ 30 71 /*! \{ */ 31 72 32 typedef Field Inherited; 33 typedef PointerSFieldBase Self; 73 typedef Field Inherited; 74 75 typedef PointerSFieldBase Self; 76 typedef FieldTraits <FieldContainerPtr, 0> SFieldTraits; 34 77 35 78 // storage 36 typedef FieldContainerPtr StoredType; 79 typedef FieldContainerPtr StoredType; 80 typedef const FieldContainerPtr const_value; 81 82 typedef EditSFieldHandle <Self > EditHandle; 83 typedef boost::shared_ptr<EditHandle> EditHandlePtr; 84 85 typedef GetSFieldHandle <Self > GetHandle; 86 typedef boost::shared_ptr<GetHandle> GetHandlePtr; 37 87 38 typedef StoredType &StoredTypeRef; 39 typedef StoredType const &StoredTypeConstRef; 88 /*---------------------------------------------------------------------*/ 89 90 static const bool isSField = true; 91 static const bool isMField = false; 92 93 static const bool isPointerField = true; 94 95 /*! \} */ 96 /*---------------------------------------------------------------------*/ 97 /*! \name Class Get */ 98 /*! \{ */ 99 100 static const FieldType &getClassType(void); 101 102 /*! \} */ 103 /*---------------------------------------------------------------------*/ 104 /*! \name Raw Store Access */ 105 /*! \{ */ 40 106 41 // handles 42 typedef EditSFieldHandle<PointerSFieldBase> EditHandle; 43 typedef EditSFieldHandle<PointerSFieldBase>::Ptr EditHandlePtr; 107 const_value getValue(void) const; 44 108 45 typedef GetSFieldHandle <PointerSFieldBase> GetHandle; 46 typedef GetSFieldHandle <PointerSFieldBase>::Ptr GetHandlePtr; 109 /*! \} */ 110 /*---------------------------------------------------------------------*/ 111 /*! \name Binary Interface */ 112 /*! \{ */ 113 114 UInt32 getBinSize(void ) const; 115 116 void copyToBin (BinaryDataHandler &pMem) const; 117 118 /*! \} */ 119 /*---------------------------------------------------------------------*/ 120 /*! \name Raw Store Access */ 121 /*! \{ */ 122 123 bool operator ==(const Self &source) const; 124 125 /*! \} */ 126 /*========================= PROTECTED ===============================*/ 127 128 protected: 129 130 /*---------------------------------------------------------------------*/ 131 /*! \name Members */ 132 /*! \{ */ 133 134 static FieldType _fieldType; 135 136 StoredType _fieldValue; 47 137 48 138 /*! \} */ … … 51 141 /*! \{ */ 52 142 53 PointerSFieldBase( void);54 PointerSFieldBase( Self const&source);55 explicit PointerSFieldBase( FieldContainerPtrConstvalue );143 PointerSFieldBase( void ); 144 PointerSFieldBase(const Self &source); 145 explicit PointerSFieldBase( const_value value ); 56 146 57 147 /*! \} */ … … 64 154 /*! \} */ 65 155 /*---------------------------------------------------------------------*/ 66 /*! \name Raw Store Access*/156 /*! \name Assign */ 67 157 /*! \{ */ 68 69 StoredTypeRef editRawStore(void); 70 StoredTypeConstRef getRawStore (void) const; 71 72 /*! \} */ 73 /*========================= PROTECTED ===============================*/ 74 protected: 75 /*---------------------------------------------------------------------*/ 76 /*! \name Members */ 77 /*! \{ */ 78 79 StoredType _fieldValue; 80 158 159 void operator =(const Self &source); 160 81 161 /*! \} */ 82 162 /*========================== PRIVATE ================================*/ 163 164 StoredType &editRawStore(void); 165 StoredType const &getRawStore (void) const; 166 83 167 private: 84 168 }; 169 170 typedef PointerSFieldBase FieldContainerPtrSFieldBase; 85 171 86 172 OSG_END_NAMESPACE
