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 FatBorderChunk!
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 "OSGFatBorderChunkBase.h"
67 #include "OSGFatBorderChunk.h"
69 #include <boost/bind.hpp>
73 /***************************************************************************\
75 \***************************************************************************/
77 /*! \class OSG::FatBorderChunk
81 /***************************************************************************\
82 * Field Documentation *
83 \***************************************************************************/
86 /***************************************************************************\
87 * FieldType/FieldTrait Instantiation *
88 \***************************************************************************/
90 #if !defined(OSG_DO_DOC) || defined(OSG_DOC_DEV)
91 PointerType FieldTraits
<FatBorderChunk
*, nsOSG
>::_type(
93 "VertexProgramChunkPtr",
94 FatBorderChunk::getClassType(),
98 OSG_FIELDTRAITS_GETTYPE_NS(FatBorderChunk
*, nsOSG
)
100 OSG_EXPORT_PTR_SFIELD_FULL(PointerSField
,
104 OSG_EXPORT_PTR_MFIELD_FULL(PointerMField
,
108 /***************************************************************************\
109 * Field Description *
110 \***************************************************************************/
112 void FatBorderChunkBase::classDescInserter(TypeObject
&oType
)
117 FatBorderChunkBase::TypeObject
FatBorderChunkBase::_type(
118 FatBorderChunkBase::getClassname(),
119 Inherited::getClassname(),
122 reinterpret_cast<PrototypeCreateF
>(&FatBorderChunkBase::createEmptyLocal
),
123 reinterpret_cast<InitContainerF
>(&FatBorderChunk::initMethod
),
124 reinterpret_cast<ExitContainerF
>(&FatBorderChunk::exitMethod
),
125 reinterpret_cast<InitalInsertDescFunc
>(
126 reinterpret_cast<void *>(&FatBorderChunk::classDescInserter
)),
129 "<?xml version=\"1.0\"?>\n"
132 " name=\"FatBorderChunk\"\n"
133 " parent=\"VertexProgramChunk\"\n"
134 " library=\"Drawable\"\n"
135 " pointerfieldtypes=\"both\"\n"
136 " structure=\"concrete\"\n"
137 " systemcomponent=\"true\"\n"
138 " parentsystemcomponent=\"true\"\n"
139 " decoratable=\"false\"\n"
140 " docGroupBase=\"GrpDrawablesNurbs\"\n"
142 "</FieldContainer>\n",
146 /*------------------------------ get -----------------------------------*/
148 FieldContainerType
&FatBorderChunkBase::getType(void)
153 const FieldContainerType
&FatBorderChunkBase::getType(void) const
158 UInt32
FatBorderChunkBase::getContainerSize(void) const
160 return sizeof(FatBorderChunk
);
163 /*------------------------- decorator get ------------------------------*/
170 /*------------------------------ access -----------------------------------*/
172 SizeT
FatBorderChunkBase::getBinSize(ConstFieldMaskArg whichField
)
174 SizeT returnValue
= Inherited::getBinSize(whichField
);
180 void FatBorderChunkBase::copyToBin(BinaryDataHandler
&pMem
,
181 ConstFieldMaskArg whichField
)
183 Inherited::copyToBin(pMem
, whichField
);
187 void FatBorderChunkBase::copyFromBin(BinaryDataHandler
&pMem
,
188 ConstFieldMaskArg whichField
)
190 Inherited::copyFromBin(pMem
, whichField
);
194 //! create a new instance of the class
195 FatBorderChunkTransitPtr
FatBorderChunkBase::createLocal(BitVector bFlags
)
197 FatBorderChunkTransitPtr fc
;
199 if(getClassType().getPrototype() != NULL
)
201 FieldContainerTransitPtr tmpPtr
=
202 getClassType().getPrototype()-> shallowCopyLocal(bFlags
);
204 fc
= dynamic_pointer_cast
<FatBorderChunk
>(tmpPtr
);
210 //! create a new instance of the class, copy the container flags
211 FatBorderChunkTransitPtr
FatBorderChunkBase::createDependent(BitVector bFlags
)
213 FatBorderChunkTransitPtr fc
;
215 if(getClassType().getPrototype() != NULL
)
217 FieldContainerTransitPtr tmpPtr
=
218 getClassType().getPrototype()-> shallowCopyDependent(bFlags
);
220 fc
= dynamic_pointer_cast
<FatBorderChunk
>(tmpPtr
);
226 //! create a new instance of the class
227 FatBorderChunkTransitPtr
FatBorderChunkBase::create(void)
229 FatBorderChunkTransitPtr fc
;
231 if(getClassType().getPrototype() != NULL
)
233 FieldContainerTransitPtr tmpPtr
=
234 getClassType().getPrototype()-> shallowCopy();
236 fc
= dynamic_pointer_cast
<FatBorderChunk
>(tmpPtr
);
242 FatBorderChunk
*FatBorderChunkBase::createEmptyLocal(BitVector bFlags
)
244 FatBorderChunk
*returnValue
;
246 newPtr
<FatBorderChunk
>(returnValue
, bFlags
);
248 returnValue
->_pFieldFlags
->_bNamespaceMask
&= ~bFlags
;
253 //! create an empty new instance of the class, do not copy the prototype
254 FatBorderChunk
*FatBorderChunkBase::createEmpty(void)
256 FatBorderChunk
*returnValue
;
258 newPtr
<FatBorderChunk
>(returnValue
, Thread::getCurrentLocalFlags());
260 returnValue
->_pFieldFlags
->_bNamespaceMask
&=
261 ~Thread::getCurrentLocalFlags();
267 FieldContainerTransitPtr
FatBorderChunkBase::shallowCopyLocal(
268 BitVector bFlags
) const
270 FatBorderChunk
*tmpPtr
;
272 newPtr(tmpPtr
, dynamic_cast<const FatBorderChunk
*>(this), bFlags
);
274 FieldContainerTransitPtr
returnValue(tmpPtr
);
276 tmpPtr
->_pFieldFlags
->_bNamespaceMask
&= ~bFlags
;
281 FieldContainerTransitPtr
FatBorderChunkBase::shallowCopyDependent(
282 BitVector bFlags
) const
284 FatBorderChunk
*tmpPtr
;
286 newPtr(tmpPtr
, dynamic_cast<const FatBorderChunk
*>(this), ~bFlags
);
288 FieldContainerTransitPtr
returnValue(tmpPtr
);
290 tmpPtr
->_pFieldFlags
->_bNamespaceMask
= bFlags
;
295 FieldContainerTransitPtr
FatBorderChunkBase::shallowCopy(void) const
297 FatBorderChunk
*tmpPtr
;
300 dynamic_cast<const FatBorderChunk
*>(this),
301 Thread::getCurrentLocalFlags());
303 tmpPtr
->_pFieldFlags
->_bNamespaceMask
&= ~Thread::getCurrentLocalFlags();
305 FieldContainerTransitPtr
returnValue(tmpPtr
);
313 /*------------------------- constructors ----------------------------------*/
315 FatBorderChunkBase::FatBorderChunkBase(void) :
320 FatBorderChunkBase::FatBorderChunkBase(const FatBorderChunkBase
&source
) :
326 /*-------------------------- destructors ----------------------------------*/
328 FatBorderChunkBase::~FatBorderChunkBase(void)
334 #ifdef OSG_MT_CPTR_ASPECT
335 void FatBorderChunkBase::execSyncV( FieldContainer
&oFrom
,
336 ConstFieldMaskArg whichField
,
337 AspectOffsetStore
&oOffsets
,
338 ConstFieldMaskArg syncMode
,
339 const UInt32 uiSyncInfo
)
341 FatBorderChunk
*pThis
= static_cast<FatBorderChunk
*>(this);
343 pThis
->execSync(static_cast<FatBorderChunk
*>(&oFrom
),
352 #ifdef OSG_MT_CPTR_ASPECT
353 FieldContainer
*FatBorderChunkBase::createAspectCopy(
354 const FieldContainer
*pRefAspect
) const
356 FatBorderChunk
*returnValue
;
358 newAspectCopy(returnValue
,
359 dynamic_cast<const FatBorderChunk
*>(pRefAspect
),
360 dynamic_cast<const FatBorderChunk
*>(this));
366 void FatBorderChunkBase::resolveLinks(void)
368 Inherited::resolveLinks();