fixed: compile issue
[opensg.git] / Source / System / Window / Background / OSGDepthClearBackgroundBase.cpp
blobdc16ccc7baafef0840c4ee2478ec6941d4dc2fdc
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 DepthClearBackground!
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 "OSGDepthClearBackgroundBase.h"
67 #include "OSGDepthClearBackground.h"
69 #include <boost/bind.hpp>
71 OSG_BEGIN_NAMESPACE
73 /***************************************************************************\
74 * Description *
75 \***************************************************************************/
77 /*! \class OSG::DepthClearBackground
78 A depth-clear background, see \ref PageSystemWindowBackgroundDepthClear for a
79 description.
82 /***************************************************************************\
83 * Field Documentation *
84 \***************************************************************************/
87 /***************************************************************************\
88 * FieldType/FieldTrait Instantiation *
89 \***************************************************************************/
91 #if !defined(OSG_DO_DOC) || defined(OSG_DOC_DEV)
92 PointerType FieldTraits<DepthClearBackground *, nsOSG>::_type(
93 "DepthClearBackgroundPtr",
94 "BackgroundPtr",
95 DepthClearBackground::getClassType(),
96 nsOSG);
97 #endif
99 OSG_FIELDTRAITS_GETTYPE_NS(DepthClearBackground *, nsOSG)
101 OSG_EXPORT_PTR_SFIELD_FULL(PointerSField,
102 DepthClearBackground *,
103 nsOSG)
106 /***************************************************************************\
107 * Field Description *
108 \***************************************************************************/
110 void DepthClearBackgroundBase::classDescInserter(TypeObject &oType)
115 DepthClearBackgroundBase::TypeObject DepthClearBackgroundBase::_type(
116 DepthClearBackgroundBase::getClassname(),
117 Inherited::getClassname(),
118 "NULL",
119 nsOSG, //Namespace
120 reinterpret_cast<PrototypeCreateF>(&DepthClearBackgroundBase::createEmptyLocal),
121 reinterpret_cast<InitContainerF>(&DepthClearBackground::initMethod),
122 reinterpret_cast<ExitContainerF>(&DepthClearBackground::exitMethod),
123 reinterpret_cast<InitalInsertDescFunc>(
124 reinterpret_cast<void *>(&DepthClearBackground::classDescInserter)),
125 false,
127 "<?xml version=\"1.0\" ?>\n"
128 "\n"
129 "<FieldContainer\n"
130 " name=\"DepthClearBackground\"\n"
131 " parent=\"Background\"\n"
132 " library=\"Window\"\n"
133 " structure=\"concrete\"\n"
134 " pointerfieldtypes=\"single\"\n"
135 " systemcomponent=\"true\"\n"
136 " parentsystemcomponent=\"true\"\n"
137 " docGroupBase=\"GrpWindowBackground\"\n"
138 " >\n"
139 " A depth-clear background, see \\ref PageSystemWindowBackgroundDepthClear for a\n"
140 " description.\n"
141 "</FieldContainer>\n",
142 "A depth-clear background, see \\ref PageSystemWindowBackgroundDepthClear for a\n"
143 "description.\n"
146 /*------------------------------ get -----------------------------------*/
148 FieldContainerType &DepthClearBackgroundBase::getType(void)
150 return _type;
153 const FieldContainerType &DepthClearBackgroundBase::getType(void) const
155 return _type;
158 UInt32 DepthClearBackgroundBase::getContainerSize(void) const
160 return sizeof(DepthClearBackground);
163 /*------------------------- decorator get ------------------------------*/
170 /*------------------------------ access -----------------------------------*/
172 SizeT DepthClearBackgroundBase::getBinSize(ConstFieldMaskArg whichField)
174 SizeT returnValue = Inherited::getBinSize(whichField);
177 return returnValue;
180 void DepthClearBackgroundBase::copyToBin(BinaryDataHandler &pMem,
181 ConstFieldMaskArg whichField)
183 Inherited::copyToBin(pMem, whichField);
187 void DepthClearBackgroundBase::copyFromBin(BinaryDataHandler &pMem,
188 ConstFieldMaskArg whichField)
190 Inherited::copyFromBin(pMem, whichField);
194 //! create a new instance of the class
195 DepthClearBackgroundTransitPtr DepthClearBackgroundBase::createLocal(BitVector bFlags)
197 DepthClearBackgroundTransitPtr fc;
199 if(getClassType().getPrototype() != NULL)
201 FieldContainerTransitPtr tmpPtr =
202 getClassType().getPrototype()-> shallowCopyLocal(bFlags);
204 fc = dynamic_pointer_cast<DepthClearBackground>(tmpPtr);
207 return fc;
210 //! create a new instance of the class, copy the container flags
211 DepthClearBackgroundTransitPtr DepthClearBackgroundBase::createDependent(BitVector bFlags)
213 DepthClearBackgroundTransitPtr fc;
215 if(getClassType().getPrototype() != NULL)
217 FieldContainerTransitPtr tmpPtr =
218 getClassType().getPrototype()-> shallowCopyDependent(bFlags);
220 fc = dynamic_pointer_cast<DepthClearBackground>(tmpPtr);
223 return fc;
226 //! create a new instance of the class
227 DepthClearBackgroundTransitPtr DepthClearBackgroundBase::create(void)
229 DepthClearBackgroundTransitPtr fc;
231 if(getClassType().getPrototype() != NULL)
233 FieldContainerTransitPtr tmpPtr =
234 getClassType().getPrototype()-> shallowCopy();
236 fc = dynamic_pointer_cast<DepthClearBackground>(tmpPtr);
239 return fc;
242 DepthClearBackground *DepthClearBackgroundBase::createEmptyLocal(BitVector bFlags)
244 DepthClearBackground *returnValue;
246 newPtr<DepthClearBackground>(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 DepthClearBackground *DepthClearBackgroundBase::createEmpty(void)
256 DepthClearBackground *returnValue;
258 newPtr<DepthClearBackground>(returnValue, Thread::getCurrentLocalFlags());
260 returnValue->_pFieldFlags->_bNamespaceMask &=
261 ~Thread::getCurrentLocalFlags();
263 return returnValue;
267 FieldContainerTransitPtr DepthClearBackgroundBase::shallowCopyLocal(
268 BitVector bFlags) const
270 DepthClearBackground *tmpPtr;
272 newPtr(tmpPtr, dynamic_cast<const DepthClearBackground *>(this), bFlags);
274 FieldContainerTransitPtr returnValue(tmpPtr);
276 tmpPtr->_pFieldFlags->_bNamespaceMask &= ~bFlags;
278 return returnValue;
281 FieldContainerTransitPtr DepthClearBackgroundBase::shallowCopyDependent(
282 BitVector bFlags) const
284 DepthClearBackground *tmpPtr;
286 newPtr(tmpPtr, dynamic_cast<const DepthClearBackground *>(this), ~bFlags);
288 FieldContainerTransitPtr returnValue(tmpPtr);
290 tmpPtr->_pFieldFlags->_bNamespaceMask = bFlags;
292 return returnValue;
295 FieldContainerTransitPtr DepthClearBackgroundBase::shallowCopy(void) const
297 DepthClearBackground *tmpPtr;
299 newPtr(tmpPtr,
300 dynamic_cast<const DepthClearBackground *>(this),
301 Thread::getCurrentLocalFlags());
303 tmpPtr->_pFieldFlags->_bNamespaceMask &= ~Thread::getCurrentLocalFlags();
305 FieldContainerTransitPtr returnValue(tmpPtr);
307 return returnValue;
313 /*------------------------- constructors ----------------------------------*/
315 DepthClearBackgroundBase::DepthClearBackgroundBase(void) :
316 Inherited()
320 DepthClearBackgroundBase::DepthClearBackgroundBase(const DepthClearBackgroundBase &source) :
321 Inherited(source)
326 /*-------------------------- destructors ----------------------------------*/
328 DepthClearBackgroundBase::~DepthClearBackgroundBase(void)
334 #ifdef OSG_MT_CPTR_ASPECT
335 void DepthClearBackgroundBase::execSyncV( FieldContainer &oFrom,
336 ConstFieldMaskArg whichField,
337 AspectOffsetStore &oOffsets,
338 ConstFieldMaskArg syncMode,
339 const UInt32 uiSyncInfo)
341 DepthClearBackground *pThis = static_cast<DepthClearBackground *>(this);
343 pThis->execSync(static_cast<DepthClearBackground *>(&oFrom),
344 whichField,
345 oOffsets,
346 syncMode,
347 uiSyncInfo);
349 #endif
352 #ifdef OSG_MT_CPTR_ASPECT
353 FieldContainer *DepthClearBackgroundBase::createAspectCopy(
354 const FieldContainer *pRefAspect) const
356 DepthClearBackground *returnValue;
358 newAspectCopy(returnValue,
359 dynamic_cast<const DepthClearBackground *>(pRefAspect),
360 dynamic_cast<const DepthClearBackground *>(this));
362 return returnValue;
364 #endif
366 void DepthClearBackgroundBase::resolveLinks(void)
368 Inherited::resolveLinks();
374 OSG_END_NAMESPACE