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 DepthClearBackground!
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 "OSGDepthClearBackgroundBase.h"
67 #include "OSGDepthClearBackground.h"
69 #include <boost/bind.hpp>
73 /***************************************************************************\
75 \***************************************************************************/
77 /*! \class OSG::DepthClearBackground
78 A depth-clear background, see \ref PageSystemWindowBackgroundDepthClear for a
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",
95 DepthClearBackground::getClassType(),
99 OSG_FIELDTRAITS_GETTYPE_NS(DepthClearBackground
*, nsOSG
)
101 OSG_EXPORT_PTR_SFIELD_FULL(PointerSField
,
102 DepthClearBackground
*,
106 /***************************************************************************\
107 * Field Description *
108 \***************************************************************************/
110 void DepthClearBackgroundBase::classDescInserter(TypeObject
&oType
)
115 DepthClearBackgroundBase::TypeObject
DepthClearBackgroundBase::_type(
116 DepthClearBackgroundBase::getClassname(),
117 Inherited::getClassname(),
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
)),
127 "<?xml version=\"1.0\" ?>\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"
139 " A depth-clear background, see \\ref PageSystemWindowBackgroundDepthClear for a\n"
141 "</FieldContainer>\n",
142 "A depth-clear background, see \\ref PageSystemWindowBackgroundDepthClear for a\n"
146 /*------------------------------ get -----------------------------------*/
148 FieldContainerType
&DepthClearBackgroundBase::getType(void)
153 const FieldContainerType
&DepthClearBackgroundBase::getType(void) const
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
);
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
);
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
);
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
);
242 DepthClearBackground
*DepthClearBackgroundBase::createEmptyLocal(BitVector bFlags
)
244 DepthClearBackground
*returnValue
;
246 newPtr
<DepthClearBackground
>(returnValue
, bFlags
);
248 returnValue
->_pFieldFlags
->_bNamespaceMask
&= ~bFlags
;
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();
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
;
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
;
295 FieldContainerTransitPtr
DepthClearBackgroundBase::shallowCopy(void) const
297 DepthClearBackground
*tmpPtr
;
300 dynamic_cast<const DepthClearBackground
*>(this),
301 Thread::getCurrentLocalFlags());
303 tmpPtr
->_pFieldFlags
->_bNamespaceMask
&= ~Thread::getCurrentLocalFlags();
305 FieldContainerTransitPtr
returnValue(tmpPtr
);
313 /*------------------------- constructors ----------------------------------*/
315 DepthClearBackgroundBase::DepthClearBackgroundBase(void) :
320 DepthClearBackgroundBase::DepthClearBackgroundBase(const DepthClearBackgroundBase
&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
),
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));
366 void DepthClearBackgroundBase::resolveLinks(void)
368 Inherited::resolveLinks();