changed: gcc8 base update
[opensg.git] / Source / System / State / OpenGL / OSGTwoSidedLightingChunkBase.cpp
blobb1a8bfa3c4c24473de1ec6de2b4a85b56e24498c
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 TwoSidedLightingChunk!
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 "OSGTwoSidedLightingChunkBase.h"
67 #include "OSGTwoSidedLightingChunk.h"
69 #include <boost/bind.hpp>
71 OSG_BEGIN_NAMESPACE
73 /***************************************************************************\
74 * Description *
75 \***************************************************************************/
77 /*! \class OSG::TwoSidedLightingChunk
81 /***************************************************************************\
82 * Field Documentation *
83 \***************************************************************************/
86 /***************************************************************************\
87 * FieldType/FieldTrait Instantiation *
88 \***************************************************************************/
90 #if !defined(OSG_DO_DOC) || defined(OSG_DOC_DEV)
91 PointerType FieldTraits<TwoSidedLightingChunk *, nsOSG>::_type(
92 "TwoSidedLightingChunkPtr",
93 "StateChunkPtr",
94 TwoSidedLightingChunk::getClassType(),
95 nsOSG);
96 #endif
98 OSG_FIELDTRAITS_GETTYPE_NS(TwoSidedLightingChunk *, nsOSG)
100 /***************************************************************************\
101 * Field Description *
102 \***************************************************************************/
104 void TwoSidedLightingChunkBase::classDescInserter(TypeObject &oType)
109 TwoSidedLightingChunkBase::TypeObject TwoSidedLightingChunkBase::_type(
110 TwoSidedLightingChunkBase::getClassname(),
111 Inherited::getClassname(),
112 "NULL",
113 nsOSG, //Namespace
114 reinterpret_cast<PrototypeCreateF>(&TwoSidedLightingChunkBase::createEmptyLocal),
115 reinterpret_cast<InitContainerF>(&TwoSidedLightingChunk::initMethod),
116 reinterpret_cast<ExitContainerF>(&TwoSidedLightingChunk::exitMethod),
117 reinterpret_cast<InitalInsertDescFunc>(
118 reinterpret_cast<void *>(&TwoSidedLightingChunk::classDescInserter)),
119 false,
121 "<?xml version=\"1.0\"?>\n"
122 "\n"
123 "<FieldContainer\n"
124 " name=\"TwoSidedLightingChunk\"\n"
125 " parent=\"StateChunk\"\n"
126 " library=\"State\"\n"
127 " pointerfieldtypes=\"none\"\n"
128 " structure=\"concrete\"\n"
129 " systemcomponent=\"true\"\n"
130 " parentsystemcomponent=\"true\"\n"
131 " decoratable=\"false\"\n"
132 " useLocalIncludes=\"false\"\n"
133 " docGroupBase=\"GrpStateOpenGL\"\n"
134 " >\n"
135 "</FieldContainer>\n",
139 /*------------------------------ get -----------------------------------*/
141 FieldContainerType &TwoSidedLightingChunkBase::getType(void)
143 return _type;
146 const FieldContainerType &TwoSidedLightingChunkBase::getType(void) const
148 return _type;
151 UInt32 TwoSidedLightingChunkBase::getContainerSize(void) const
153 return sizeof(TwoSidedLightingChunk);
156 /*------------------------- decorator get ------------------------------*/
163 /*------------------------------ access -----------------------------------*/
165 SizeT TwoSidedLightingChunkBase::getBinSize(ConstFieldMaskArg whichField)
167 SizeT returnValue = Inherited::getBinSize(whichField);
170 return returnValue;
173 void TwoSidedLightingChunkBase::copyToBin(BinaryDataHandler &pMem,
174 ConstFieldMaskArg whichField)
176 Inherited::copyToBin(pMem, whichField);
180 void TwoSidedLightingChunkBase::copyFromBin(BinaryDataHandler &pMem,
181 ConstFieldMaskArg whichField)
183 Inherited::copyFromBin(pMem, whichField);
187 //! create a new instance of the class
188 TwoSidedLightingChunkTransitPtr TwoSidedLightingChunkBase::createLocal(BitVector bFlags)
190 TwoSidedLightingChunkTransitPtr fc;
192 if(getClassType().getPrototype() != NULL)
194 FieldContainerTransitPtr tmpPtr =
195 getClassType().getPrototype()-> shallowCopyLocal(bFlags);
197 fc = dynamic_pointer_cast<TwoSidedLightingChunk>(tmpPtr);
200 return fc;
203 //! create a new instance of the class, copy the container flags
204 TwoSidedLightingChunkTransitPtr TwoSidedLightingChunkBase::createDependent(BitVector bFlags)
206 TwoSidedLightingChunkTransitPtr fc;
208 if(getClassType().getPrototype() != NULL)
210 FieldContainerTransitPtr tmpPtr =
211 getClassType().getPrototype()-> shallowCopyDependent(bFlags);
213 fc = dynamic_pointer_cast<TwoSidedLightingChunk>(tmpPtr);
216 return fc;
219 //! create a new instance of the class
220 TwoSidedLightingChunkTransitPtr TwoSidedLightingChunkBase::create(void)
222 TwoSidedLightingChunkTransitPtr fc;
224 if(getClassType().getPrototype() != NULL)
226 FieldContainerTransitPtr tmpPtr =
227 getClassType().getPrototype()-> shallowCopy();
229 fc = dynamic_pointer_cast<TwoSidedLightingChunk>(tmpPtr);
232 return fc;
235 TwoSidedLightingChunk *TwoSidedLightingChunkBase::createEmptyLocal(BitVector bFlags)
237 TwoSidedLightingChunk *returnValue;
239 newPtr<TwoSidedLightingChunk>(returnValue, bFlags);
241 returnValue->_pFieldFlags->_bNamespaceMask &= ~bFlags;
243 return returnValue;
246 //! create an empty new instance of the class, do not copy the prototype
247 TwoSidedLightingChunk *TwoSidedLightingChunkBase::createEmpty(void)
249 TwoSidedLightingChunk *returnValue;
251 newPtr<TwoSidedLightingChunk>(returnValue, Thread::getCurrentLocalFlags());
253 returnValue->_pFieldFlags->_bNamespaceMask &=
254 ~Thread::getCurrentLocalFlags();
256 return returnValue;
260 FieldContainerTransitPtr TwoSidedLightingChunkBase::shallowCopyLocal(
261 BitVector bFlags) const
263 TwoSidedLightingChunk *tmpPtr;
265 newPtr(tmpPtr, dynamic_cast<const TwoSidedLightingChunk *>(this), bFlags);
267 FieldContainerTransitPtr returnValue(tmpPtr);
269 tmpPtr->_pFieldFlags->_bNamespaceMask &= ~bFlags;
271 return returnValue;
274 FieldContainerTransitPtr TwoSidedLightingChunkBase::shallowCopyDependent(
275 BitVector bFlags) const
277 TwoSidedLightingChunk *tmpPtr;
279 newPtr(tmpPtr, dynamic_cast<const TwoSidedLightingChunk *>(this), ~bFlags);
281 FieldContainerTransitPtr returnValue(tmpPtr);
283 tmpPtr->_pFieldFlags->_bNamespaceMask = bFlags;
285 return returnValue;
288 FieldContainerTransitPtr TwoSidedLightingChunkBase::shallowCopy(void) const
290 TwoSidedLightingChunk *tmpPtr;
292 newPtr(tmpPtr,
293 dynamic_cast<const TwoSidedLightingChunk *>(this),
294 Thread::getCurrentLocalFlags());
296 tmpPtr->_pFieldFlags->_bNamespaceMask &= ~Thread::getCurrentLocalFlags();
298 FieldContainerTransitPtr returnValue(tmpPtr);
300 return returnValue;
306 /*------------------------- constructors ----------------------------------*/
308 TwoSidedLightingChunkBase::TwoSidedLightingChunkBase(void) :
309 Inherited()
313 TwoSidedLightingChunkBase::TwoSidedLightingChunkBase(const TwoSidedLightingChunkBase &source) :
314 Inherited(source)
319 /*-------------------------- destructors ----------------------------------*/
321 TwoSidedLightingChunkBase::~TwoSidedLightingChunkBase(void)
327 #ifdef OSG_MT_CPTR_ASPECT
328 void TwoSidedLightingChunkBase::execSyncV( FieldContainer &oFrom,
329 ConstFieldMaskArg whichField,
330 AspectOffsetStore &oOffsets,
331 ConstFieldMaskArg syncMode,
332 const UInt32 uiSyncInfo)
334 TwoSidedLightingChunk *pThis = static_cast<TwoSidedLightingChunk *>(this);
336 pThis->execSync(static_cast<TwoSidedLightingChunk *>(&oFrom),
337 whichField,
338 oOffsets,
339 syncMode,
340 uiSyncInfo);
342 #endif
345 #ifdef OSG_MT_CPTR_ASPECT
346 FieldContainer *TwoSidedLightingChunkBase::createAspectCopy(
347 const FieldContainer *pRefAspect) const
349 TwoSidedLightingChunk *returnValue;
351 newAspectCopy(returnValue,
352 dynamic_cast<const TwoSidedLightingChunk *>(pRefAspect),
353 dynamic_cast<const TwoSidedLightingChunk *>(this));
355 return returnValue;
357 #endif
359 void TwoSidedLightingChunkBase::resolveLinks(void)
361 Inherited::resolveLinks();
367 OSG_END_NAMESPACE