changed: gcc8 base update
[opensg.git] / Source / System / NodeCores / Drawables / Nurbs / OSGFatBorderChunkBase.cpp
bloba82bb3e1a286b4d1a382817feb1924866881858f
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 FatBorderChunk!
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 "OSGFatBorderChunkBase.h"
67 #include "OSGFatBorderChunk.h"
69 #include <boost/bind.hpp>
71 OSG_BEGIN_NAMESPACE
73 /***************************************************************************\
74 * Description *
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(
92 "FatBorderChunkPtr",
93 "VertexProgramChunkPtr",
94 FatBorderChunk::getClassType(),
95 nsOSG);
96 #endif
98 OSG_FIELDTRAITS_GETTYPE_NS(FatBorderChunk *, nsOSG)
100 OSG_EXPORT_PTR_SFIELD_FULL(PointerSField,
101 FatBorderChunk *,
102 nsOSG)
104 OSG_EXPORT_PTR_MFIELD_FULL(PointerMField,
105 FatBorderChunk *,
106 nsOSG)
108 /***************************************************************************\
109 * Field Description *
110 \***************************************************************************/
112 void FatBorderChunkBase::classDescInserter(TypeObject &oType)
117 FatBorderChunkBase::TypeObject FatBorderChunkBase::_type(
118 FatBorderChunkBase::getClassname(),
119 Inherited::getClassname(),
120 "NULL",
121 nsOSG, //Namespace
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)),
127 false,
129 "<?xml version=\"1.0\"?>\n"
130 "\n"
131 "<FieldContainer\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"
141 " >\n"
142 "</FieldContainer>\n",
146 /*------------------------------ get -----------------------------------*/
148 FieldContainerType &FatBorderChunkBase::getType(void)
150 return _type;
153 const FieldContainerType &FatBorderChunkBase::getType(void) const
155 return _type;
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);
177 return returnValue;
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);
207 return fc;
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);
223 return fc;
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);
239 return fc;
242 FatBorderChunk *FatBorderChunkBase::createEmptyLocal(BitVector bFlags)
244 FatBorderChunk *returnValue;
246 newPtr<FatBorderChunk>(returnValue, bFlags);
248 returnValue->_pFieldFlags->_bNamespaceMask &= ~bFlags;
250 return returnValue;
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();
263 return returnValue;
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;
278 return returnValue;
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;
292 return returnValue;
295 FieldContainerTransitPtr FatBorderChunkBase::shallowCopy(void) const
297 FatBorderChunk *tmpPtr;
299 newPtr(tmpPtr,
300 dynamic_cast<const FatBorderChunk *>(this),
301 Thread::getCurrentLocalFlags());
303 tmpPtr->_pFieldFlags->_bNamespaceMask &= ~Thread::getCurrentLocalFlags();
305 FieldContainerTransitPtr returnValue(tmpPtr);
307 return returnValue;
313 /*------------------------- constructors ----------------------------------*/
315 FatBorderChunkBase::FatBorderChunkBase(void) :
316 Inherited()
320 FatBorderChunkBase::FatBorderChunkBase(const FatBorderChunkBase &source) :
321 Inherited(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),
344 whichField,
345 oOffsets,
346 syncMode,
347 uiSyncInfo);
349 #endif
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));
362 return returnValue;
364 #endif
366 void FatBorderChunkBase::resolveLinks(void)
368 Inherited::resolveLinks();
374 OSG_END_NAMESPACE