changed: gcc8 base update
[opensg.git] / Source / Base / FieldContainer / Fields / PointerFields / OSGPointerSFieldCommon.h
blob87064c92aff64104f96f0095b9931725c05d6195
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 \*---------------------------------------------------------------------------*/
39 #ifndef _OSGPOINTERSFIELDCOMMON_H_
40 #define _OSGPOINTERSFIELDCOMMON_H_
42 #ifdef __sgi
43 #pragma once
44 #endif
46 #include "OSGConfig.h"
47 #include "OSGPointerSFieldBase.h"
48 #include "OSGBinaryDataHandler.h"
51 OSG_BEGIN_NAMESPACE
53 // forward declarations
54 template <Int32 NamespaceI>
55 class PointerFieldTraitsBase;
57 /*! \ingroup GrpBaseFieldContainerFields
58 \ingroup GrpLibOSGBase
61 template <class AccessHandlerT,
62 Int32 NamespaceI = 0>
63 class PointerSFieldCommon : public PointerSFieldBase
65 /*========================== PUBLIC =================================*/
67 public:
69 /*---------------------------------------------------------------------*/
70 /*! \name Public Types */
71 /*! \{ */
74 typedef PointerSFieldBase Inherited;
75 typedef PointerSFieldCommon Self;
77 typedef typename Inherited::const_value const_value;
78 typedef typename Inherited::value_type value_type;
80 typedef typename Inherited::StoredType StoredType;
82 typedef AccessHandlerT AccessHandler;
84 typedef FieldTraitsFCPtrBase<
85 FieldContainer *,
86 NamespaceI > PtrBaseTraitsType;
88 /*! \} */
89 /*---------------------------------------------------------------------*/
90 /*! \name Constants */
91 /*! \{ */
93 static const Int32 Namespace = NamespaceI;
95 /*! \} */
96 /*========================= PROTECTED ===============================*/
98 protected:
100 /*---------------------------------------------------------------------*/
101 /*! \name Constructors */
102 /*! \{ */
104 PointerSFieldCommon( void );
105 PointerSFieldCommon(const Self &source);
106 explicit PointerSFieldCommon( const_value value );
108 /*! \} */
109 /*---------------------------------------------------------------------*/
110 /*! \name Destructor */
111 /*! \{ */
113 ~PointerSFieldCommon(void);
115 /*! \} */
116 /*---------------------------------------------------------------------*/
117 /*! \name Store Interface */
118 /*! \{ */
120 value_type ptrStoreGet (void ) const;
122 void ptrStoreSet (const_value pNewObj);
123 void ptrStoreClear(void );
125 /*! \} */
126 /*---------------------------------------------------------------------*/
127 /*! \name Binary IO */
128 /*! \{ */
130 void copyFromBin(BinaryDataHandler &pMem);
132 /*! \} */
133 /*---------------------------------------------------------------------*/
134 /*! \name FieldDesc creation */
135 /*! \{ */
137 static FieldDescriptionBase *
138 createFieldDescription (const Char8 *szFieldname,
139 UInt32 uiFieldFlags,
140 FieldEditMethod fEditMethod,
141 FieldGetMethod fGetMethod );
143 static FieldDescriptionBase *
144 createIdxFieldDescription(const Char8 *szFieldname,
145 UInt32 uiFieldFlags,
146 FieldIndexEditMethod fEditMethod,
147 FieldIndexGetMethod fGetMethod );
149 /*! \} */
150 /*---------------------------------------------------------------------*/
151 /*! \name MT Sync */
152 /*! \{ */
154 #ifdef OSG_MT_CPTR_ASPECT
155 void syncWith(Self &source);
156 #endif
158 /*! \} */
159 /*========================== PRIVATE ================================*/
161 private:
163 /*!\brief prohibit default function (move to 'public' if needed) */
164 void operator =(const Self &source);
167 OSG_END_NAMESPACE
169 #include "OSGPointerSFieldCommon.inl"
171 #endif // _OSGPOINTERSFIELDCOMMON_H_