changed: gcc8 base update
[opensg.git] / Source / System / NodeCores / Drawables / Geometry / Properties / OSGGeoVectorBufferRefPropertyBase.cpp
blob1d29af5ba7c0f5a4e06c43ed42b49eb751014e02
1 /*---------------------------------------------------------------------------*\
2 * OpenSG *
3 * *
4 * *
5 * Copyright (C) 2000-2013 by the OpenSG Forum *
6 * *
7 * www.opensg.org *
8 * *
9 * contact: dirk@opensg.org, gerrit.voss@vossg.org, carsten_neumann@gmx.net *
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 /*****************************************************************************\
40 *****************************************************************************
41 ** **
42 ** This file is automatically generated. **
43 ** **
44 ** Any changes made to this file WILL be lost when it is **
45 ** regenerated, which can become necessary at any time. **
46 ** **
47 ** Do not change this file, changes should be done in the derived **
48 ** class GeoVectorBufferRefProperty!
49 ** **
50 *****************************************************************************
51 \*****************************************************************************/
53 #include <cstdlib>
54 #include <cstdio>
56 #ifdef WIN32
57 #pragma warning(disable: 4355) // turn off 'this' : used in base member initializer list warning
58 #pragma warning(disable: 4290) // disable exception specification warning
59 #endif
61 #include "OSGConfig.h"
66 #include "OSGGeoVectorBufferRefPropertyBase.h"
67 #include "OSGGeoVectorBufferRefProperty.h"
69 #include <boost/bind.hpp>
71 OSG_BEGIN_NAMESPACE
73 /***************************************************************************\
74 * Description *
75 \***************************************************************************/
77 /*! \class OSG::GeoVectorBufferRefProperty
81 /***************************************************************************\
82 * Field Documentation *
83 \***************************************************************************/
86 /***************************************************************************\
87 * FieldType/FieldTrait Instantiation *
88 \***************************************************************************/
90 #if !defined(OSG_DO_DOC) || defined(OSG_DOC_DEV)
91 PointerType FieldTraits<GeoVectorBufferRefProperty *, nsOSG>::_type(
92 "GeoVectorBufferRefPropertyPtr",
93 "GeoVectorBufferPropertyPtr",
94 GeoVectorBufferRefProperty::getClassType(),
95 nsOSG);
96 #endif
98 OSG_FIELDTRAITS_GETTYPE_NS(GeoVectorBufferRefProperty *, nsOSG)
100 OSG_EXPORT_PTR_SFIELD_FULL(PointerSField,
101 GeoVectorBufferRefProperty *,
102 nsOSG)
104 OSG_EXPORT_PTR_MFIELD_FULL(PointerMField,
105 GeoVectorBufferRefProperty *,
106 nsOSG)
108 DataType &FieldTraits< GeoVectorBufferRefProperty *, nsOSG + 1 >::getType(void)
110 return FieldTraits<GeoVectorBufferRefProperty *, nsOSG>::getType();
114 OSG_EXPORT_PTR_SFIELD(ChildPointerSField,
115 GeoVectorBufferRefProperty *,
116 UnrecordedRefCountPolicy,
117 nsOSG + 1)
120 OSG_EXPORT_PTR_MFIELD(ChildPointerMField,
121 GeoVectorBufferRefProperty *,
122 UnrecordedRefCountPolicy,
123 nsOSG + 1)
126 /***************************************************************************\
127 * Field Description *
128 \***************************************************************************/
130 void GeoVectorBufferRefPropertyBase::classDescInserter(TypeObject &oType)
135 GeoVectorBufferRefPropertyBase::TypeObject GeoVectorBufferRefPropertyBase::_type(
136 GeoVectorBufferRefPropertyBase::getClassname(),
137 Inherited::getClassname(),
138 "NULL",
139 nsOSG, //Namespace
140 reinterpret_cast<PrototypeCreateF>(&GeoVectorBufferRefPropertyBase::createEmptyLocal),
141 reinterpret_cast<InitContainerF>(&GeoVectorBufferRefProperty::initMethod),
142 reinterpret_cast<ExitContainerF>(&GeoVectorBufferRefProperty::exitMethod),
143 reinterpret_cast<InitalInsertDescFunc>(
144 reinterpret_cast<void *>(&GeoVectorBufferRefProperty::classDescInserter)),
145 false,
147 "<?xml version=\"1.0\"?>\n"
148 "\n"
149 "<FieldContainer\n"
150 " name=\"GeoVectorBufferRefProperty\"\n"
151 " parent=\"GeoVectorBufferProperty\"\n"
152 " library=\"Drawable\"\n"
153 " pointerfieldtypes=\"both\"\n"
154 " structure=\"concrete\"\n"
155 " systemcomponent=\"true\"\n"
156 " parentsystemcomponent=\"true\"\n"
157 " decoratable=\"false\"\n"
158 " childFields=\"both\"\n"
159 " docGroupBase=\"GrpDrawablesGeometry\"\n"
160 " >\n"
161 "</FieldContainer>\n",
165 /*------------------------------ get -----------------------------------*/
167 FieldContainerType &GeoVectorBufferRefPropertyBase::getType(void)
169 return _type;
172 const FieldContainerType &GeoVectorBufferRefPropertyBase::getType(void) const
174 return _type;
177 UInt32 GeoVectorBufferRefPropertyBase::getContainerSize(void) const
179 return sizeof(GeoVectorBufferRefProperty);
182 /*------------------------- decorator get ------------------------------*/
189 /*------------------------------ access -----------------------------------*/
191 SizeT GeoVectorBufferRefPropertyBase::getBinSize(ConstFieldMaskArg whichField)
193 SizeT returnValue = Inherited::getBinSize(whichField);
196 return returnValue;
199 void GeoVectorBufferRefPropertyBase::copyToBin(BinaryDataHandler &pMem,
200 ConstFieldMaskArg whichField)
202 Inherited::copyToBin(pMem, whichField);
206 void GeoVectorBufferRefPropertyBase::copyFromBin(BinaryDataHandler &pMem,
207 ConstFieldMaskArg whichField)
209 Inherited::copyFromBin(pMem, whichField);
213 //! create a new instance of the class
214 GeoVectorBufferRefPropertyTransitPtr GeoVectorBufferRefPropertyBase::createLocal(BitVector bFlags)
216 GeoVectorBufferRefPropertyTransitPtr fc;
218 if(getClassType().getPrototype() != NULL)
220 FieldContainerTransitPtr tmpPtr =
221 getClassType().getPrototype()-> shallowCopyLocal(bFlags);
223 fc = dynamic_pointer_cast<GeoVectorBufferRefProperty>(tmpPtr);
226 return fc;
229 //! create a new instance of the class, copy the container flags
230 GeoVectorBufferRefPropertyTransitPtr GeoVectorBufferRefPropertyBase::createDependent(BitVector bFlags)
232 GeoVectorBufferRefPropertyTransitPtr fc;
234 if(getClassType().getPrototype() != NULL)
236 FieldContainerTransitPtr tmpPtr =
237 getClassType().getPrototype()-> shallowCopyDependent(bFlags);
239 fc = dynamic_pointer_cast<GeoVectorBufferRefProperty>(tmpPtr);
242 return fc;
245 //! create a new instance of the class
246 GeoVectorBufferRefPropertyTransitPtr GeoVectorBufferRefPropertyBase::create(void)
248 GeoVectorBufferRefPropertyTransitPtr fc;
250 if(getClassType().getPrototype() != NULL)
252 FieldContainerTransitPtr tmpPtr =
253 getClassType().getPrototype()-> shallowCopy();
255 fc = dynamic_pointer_cast<GeoVectorBufferRefProperty>(tmpPtr);
258 return fc;
261 GeoVectorBufferRefProperty *GeoVectorBufferRefPropertyBase::createEmptyLocal(BitVector bFlags)
263 GeoVectorBufferRefProperty *returnValue;
265 newPtr<GeoVectorBufferRefProperty>(returnValue, bFlags);
267 returnValue->_pFieldFlags->_bNamespaceMask &= ~bFlags;
269 return returnValue;
272 //! create an empty new instance of the class, do not copy the prototype
273 GeoVectorBufferRefProperty *GeoVectorBufferRefPropertyBase::createEmpty(void)
275 GeoVectorBufferRefProperty *returnValue;
277 newPtr<GeoVectorBufferRefProperty>(returnValue, Thread::getCurrentLocalFlags());
279 returnValue->_pFieldFlags->_bNamespaceMask &=
280 ~Thread::getCurrentLocalFlags();
282 return returnValue;
286 FieldContainerTransitPtr GeoVectorBufferRefPropertyBase::shallowCopyLocal(
287 BitVector bFlags) const
289 GeoVectorBufferRefProperty *tmpPtr;
291 newPtr(tmpPtr, dynamic_cast<const GeoVectorBufferRefProperty *>(this), bFlags);
293 FieldContainerTransitPtr returnValue(tmpPtr);
295 tmpPtr->_pFieldFlags->_bNamespaceMask &= ~bFlags;
297 return returnValue;
300 FieldContainerTransitPtr GeoVectorBufferRefPropertyBase::shallowCopyDependent(
301 BitVector bFlags) const
303 GeoVectorBufferRefProperty *tmpPtr;
305 newPtr(tmpPtr, dynamic_cast<const GeoVectorBufferRefProperty *>(this), ~bFlags);
307 FieldContainerTransitPtr returnValue(tmpPtr);
309 tmpPtr->_pFieldFlags->_bNamespaceMask = bFlags;
311 return returnValue;
314 FieldContainerTransitPtr GeoVectorBufferRefPropertyBase::shallowCopy(void) const
316 GeoVectorBufferRefProperty *tmpPtr;
318 newPtr(tmpPtr,
319 dynamic_cast<const GeoVectorBufferRefProperty *>(this),
320 Thread::getCurrentLocalFlags());
322 tmpPtr->_pFieldFlags->_bNamespaceMask &= ~Thread::getCurrentLocalFlags();
324 FieldContainerTransitPtr returnValue(tmpPtr);
326 return returnValue;
332 /*------------------------- constructors ----------------------------------*/
334 GeoVectorBufferRefPropertyBase::GeoVectorBufferRefPropertyBase(void) :
335 Inherited()
339 GeoVectorBufferRefPropertyBase::GeoVectorBufferRefPropertyBase(const GeoVectorBufferRefPropertyBase &source) :
340 Inherited(source)
345 /*-------------------------- destructors ----------------------------------*/
347 GeoVectorBufferRefPropertyBase::~GeoVectorBufferRefPropertyBase(void)
353 #ifdef OSG_MT_CPTR_ASPECT
354 void GeoVectorBufferRefPropertyBase::execSyncV( FieldContainer &oFrom,
355 ConstFieldMaskArg whichField,
356 AspectOffsetStore &oOffsets,
357 ConstFieldMaskArg syncMode,
358 const UInt32 uiSyncInfo)
360 GeoVectorBufferRefProperty *pThis = static_cast<GeoVectorBufferRefProperty *>(this);
362 pThis->execSync(static_cast<GeoVectorBufferRefProperty *>(&oFrom),
363 whichField,
364 oOffsets,
365 syncMode,
366 uiSyncInfo);
368 #endif
371 #ifdef OSG_MT_CPTR_ASPECT
372 FieldContainer *GeoVectorBufferRefPropertyBase::createAspectCopy(
373 const FieldContainer *pRefAspect) const
375 GeoVectorBufferRefProperty *returnValue;
377 newAspectCopy(returnValue,
378 dynamic_cast<const GeoVectorBufferRefProperty *>(pRefAspect),
379 dynamic_cast<const GeoVectorBufferRefProperty *>(this));
381 return returnValue;
383 #endif
385 void GeoVectorBufferRefPropertyBase::resolveLinks(void)
387 Inherited::resolveLinks();
393 OSG_END_NAMESPACE