1 /*---------------------------------------------------------------------------*\
5 * Copyright (C) 2000-2013 by the OpenSG Forum *
9 * contact: dirk@opensg.org, gerrit.voss@vossg.org, carsten_neumann@gmx.net *
11 \*---------------------------------------------------------------------------*/
12 /*---------------------------------------------------------------------------*\
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. *
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. *
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. *
28 \*---------------------------------------------------------------------------*/
29 /*---------------------------------------------------------------------------*\
37 \*---------------------------------------------------------------------------*/
39 /*****************************************************************************\
40 *****************************************************************************
42 ** This file is automatically generated. **
44 ** Any changes made to this file WILL be lost when it is **
45 ** regenerated, which can become necessary at any time. **
47 ** Do not change this file, changes should be done in the derived **
48 ** class GeoVectorBufferRefProperty!
50 *****************************************************************************
51 \*****************************************************************************/
57 #pragma warning(disable: 4355) // turn off 'this' : used in base member initializer list warning
58 #pragma warning(disable: 4290) // disable exception specification warning
61 #include "OSGConfig.h"
66 #include "OSGGeoVectorBufferRefPropertyBase.h"
67 #include "OSGGeoVectorBufferRefProperty.h"
69 #include <boost/bind.hpp>
73 /***************************************************************************\
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(),
98 OSG_FIELDTRAITS_GETTYPE_NS(GeoVectorBufferRefProperty
*, nsOSG
)
100 OSG_EXPORT_PTR_SFIELD_FULL(PointerSField
,
101 GeoVectorBufferRefProperty
*,
104 OSG_EXPORT_PTR_MFIELD_FULL(PointerMField
,
105 GeoVectorBufferRefProperty
*,
108 DataType
&FieldTraits
< GeoVectorBufferRefProperty
*, nsOSG
+ 1 >::getType(void)
110 return FieldTraits
<GeoVectorBufferRefProperty
*, nsOSG
>::getType();
114 OSG_EXPORT_PTR_SFIELD(ChildPointerSField
,
115 GeoVectorBufferRefProperty
*,
116 UnrecordedRefCountPolicy
,
120 OSG_EXPORT_PTR_MFIELD(ChildPointerMField
,
121 GeoVectorBufferRefProperty
*,
122 UnrecordedRefCountPolicy
,
126 /***************************************************************************\
127 * Field Description *
128 \***************************************************************************/
130 void GeoVectorBufferRefPropertyBase::classDescInserter(TypeObject
&oType
)
135 GeoVectorBufferRefPropertyBase::TypeObject
GeoVectorBufferRefPropertyBase::_type(
136 GeoVectorBufferRefPropertyBase::getClassname(),
137 Inherited::getClassname(),
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
)),
147 "<?xml version=\"1.0\"?>\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"
161 "</FieldContainer>\n",
165 /*------------------------------ get -----------------------------------*/
167 FieldContainerType
&GeoVectorBufferRefPropertyBase::getType(void)
172 const FieldContainerType
&GeoVectorBufferRefPropertyBase::getType(void) const
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
);
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
);
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
);
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
);
261 GeoVectorBufferRefProperty
*GeoVectorBufferRefPropertyBase::createEmptyLocal(BitVector bFlags
)
263 GeoVectorBufferRefProperty
*returnValue
;
265 newPtr
<GeoVectorBufferRefProperty
>(returnValue
, bFlags
);
267 returnValue
->_pFieldFlags
->_bNamespaceMask
&= ~bFlags
;
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();
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
;
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
;
314 FieldContainerTransitPtr
GeoVectorBufferRefPropertyBase::shallowCopy(void) const
316 GeoVectorBufferRefProperty
*tmpPtr
;
319 dynamic_cast<const GeoVectorBufferRefProperty
*>(this),
320 Thread::getCurrentLocalFlags());
322 tmpPtr
->_pFieldFlags
->_bNamespaceMask
&= ~Thread::getCurrentLocalFlags();
324 FieldContainerTransitPtr
returnValue(tmpPtr
);
332 /*------------------------- constructors ----------------------------------*/
334 GeoVectorBufferRefPropertyBase::GeoVectorBufferRefPropertyBase(void) :
339 GeoVectorBufferRefPropertyBase::GeoVectorBufferRefPropertyBase(const GeoVectorBufferRefPropertyBase
&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
),
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));
385 void GeoVectorBufferRefPropertyBase::resolveLinks(void)
387 Inherited::resolveLinks();