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 SepiaComposer!
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 "OSGSepiaComposerBase.h"
67 #include "OSGSepiaComposer.h"
69 #include <boost/bind.hpp>
73 /***************************************************************************\
75 \***************************************************************************/
77 /*! \class OSG::SepiaComposer
81 /***************************************************************************\
82 * Field Documentation *
83 \***************************************************************************/
86 /***************************************************************************\
87 * FieldType/FieldTrait Instantiation *
88 \***************************************************************************/
90 #if !defined(OSG_DO_DOC) || defined(OSG_DOC_DEV)
91 PointerType FieldTraits
<SepiaComposer
*, nsOSG
>::_type(
94 SepiaComposer::getClassType(),
98 OSG_FIELDTRAITS_GETTYPE_NS(SepiaComposer
*, nsOSG
)
100 /***************************************************************************\
101 * Field Description *
102 \***************************************************************************/
104 void SepiaComposerBase::classDescInserter(TypeObject
&oType
)
109 SepiaComposerBase::TypeObject
SepiaComposerBase::_type(
110 SepiaComposerBase::getClassname(),
111 Inherited::getClassname(),
114 reinterpret_cast<PrototypeCreateF
>(&SepiaComposerBase::createEmptyLocal
),
115 reinterpret_cast<InitContainerF
>(&SepiaComposer::initMethod
),
116 reinterpret_cast<ExitContainerF
>(&SepiaComposer::exitMethod
),
117 reinterpret_cast<InitalInsertDescFunc
>(
118 reinterpret_cast<void *>(&SepiaComposer::classDescInserter
)),
121 "<?xml version=\"1.0\"?>\n"
124 " name=\"SepiaComposer\"\n"
125 " parent=\"ImageComposer\"\n"
126 " library=\"Cluster\"\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=\"GrpClusterWindow\"\n"
135 "</FieldContainer>\n",
139 /*------------------------------ get -----------------------------------*/
141 FieldContainerType
&SepiaComposerBase::getType(void)
146 const FieldContainerType
&SepiaComposerBase::getType(void) const
151 UInt32
SepiaComposerBase::getContainerSize(void) const
153 return sizeof(SepiaComposer
);
156 /*------------------------- decorator get ------------------------------*/
163 /*------------------------------ access -----------------------------------*/
165 SizeT
SepiaComposerBase::getBinSize(ConstFieldMaskArg whichField
)
167 SizeT returnValue
= Inherited::getBinSize(whichField
);
173 void SepiaComposerBase::copyToBin(BinaryDataHandler
&pMem
,
174 ConstFieldMaskArg whichField
)
176 Inherited::copyToBin(pMem
, whichField
);
180 void SepiaComposerBase::copyFromBin(BinaryDataHandler
&pMem
,
181 ConstFieldMaskArg whichField
)
183 Inherited::copyFromBin(pMem
, whichField
);
187 //! create a new instance of the class
188 SepiaComposerTransitPtr
SepiaComposerBase::createLocal(BitVector bFlags
)
190 SepiaComposerTransitPtr fc
;
192 if(getClassType().getPrototype() != NULL
)
194 FieldContainerTransitPtr tmpPtr
=
195 getClassType().getPrototype()-> shallowCopyLocal(bFlags
);
197 fc
= dynamic_pointer_cast
<SepiaComposer
>(tmpPtr
);
203 //! create a new instance of the class, copy the container flags
204 SepiaComposerTransitPtr
SepiaComposerBase::createDependent(BitVector bFlags
)
206 SepiaComposerTransitPtr fc
;
208 if(getClassType().getPrototype() != NULL
)
210 FieldContainerTransitPtr tmpPtr
=
211 getClassType().getPrototype()-> shallowCopyDependent(bFlags
);
213 fc
= dynamic_pointer_cast
<SepiaComposer
>(tmpPtr
);
219 //! create a new instance of the class
220 SepiaComposerTransitPtr
SepiaComposerBase::create(void)
222 SepiaComposerTransitPtr fc
;
224 if(getClassType().getPrototype() != NULL
)
226 FieldContainerTransitPtr tmpPtr
=
227 getClassType().getPrototype()-> shallowCopy();
229 fc
= dynamic_pointer_cast
<SepiaComposer
>(tmpPtr
);
235 SepiaComposer
*SepiaComposerBase::createEmptyLocal(BitVector bFlags
)
237 SepiaComposer
*returnValue
;
239 newPtr
<SepiaComposer
>(returnValue
, bFlags
);
241 returnValue
->_pFieldFlags
->_bNamespaceMask
&= ~bFlags
;
246 //! create an empty new instance of the class, do not copy the prototype
247 SepiaComposer
*SepiaComposerBase::createEmpty(void)
249 SepiaComposer
*returnValue
;
251 newPtr
<SepiaComposer
>(returnValue
, Thread::getCurrentLocalFlags());
253 returnValue
->_pFieldFlags
->_bNamespaceMask
&=
254 ~Thread::getCurrentLocalFlags();
260 FieldContainerTransitPtr
SepiaComposerBase::shallowCopyLocal(
261 BitVector bFlags
) const
263 SepiaComposer
*tmpPtr
;
265 newPtr(tmpPtr
, dynamic_cast<const SepiaComposer
*>(this), bFlags
);
267 FieldContainerTransitPtr
returnValue(tmpPtr
);
269 tmpPtr
->_pFieldFlags
->_bNamespaceMask
&= ~bFlags
;
274 FieldContainerTransitPtr
SepiaComposerBase::shallowCopyDependent(
275 BitVector bFlags
) const
277 SepiaComposer
*tmpPtr
;
279 newPtr(tmpPtr
, dynamic_cast<const SepiaComposer
*>(this), ~bFlags
);
281 FieldContainerTransitPtr
returnValue(tmpPtr
);
283 tmpPtr
->_pFieldFlags
->_bNamespaceMask
= bFlags
;
288 FieldContainerTransitPtr
SepiaComposerBase::shallowCopy(void) const
290 SepiaComposer
*tmpPtr
;
293 dynamic_cast<const SepiaComposer
*>(this),
294 Thread::getCurrentLocalFlags());
296 tmpPtr
->_pFieldFlags
->_bNamespaceMask
&= ~Thread::getCurrentLocalFlags();
298 FieldContainerTransitPtr
returnValue(tmpPtr
);
306 /*------------------------- constructors ----------------------------------*/
308 SepiaComposerBase::SepiaComposerBase(void) :
313 SepiaComposerBase::SepiaComposerBase(const SepiaComposerBase
&source
) :
319 /*-------------------------- destructors ----------------------------------*/
321 SepiaComposerBase::~SepiaComposerBase(void)
327 #ifdef OSG_MT_CPTR_ASPECT
328 void SepiaComposerBase::execSyncV( FieldContainer
&oFrom
,
329 ConstFieldMaskArg whichField
,
330 AspectOffsetStore
&oOffsets
,
331 ConstFieldMaskArg syncMode
,
332 const UInt32 uiSyncInfo
)
334 SepiaComposer
*pThis
= static_cast<SepiaComposer
*>(this);
336 pThis
->execSync(static_cast<SepiaComposer
*>(&oFrom
),
345 #ifdef OSG_MT_CPTR_ASPECT
346 FieldContainer
*SepiaComposerBase::createAspectCopy(
347 const FieldContainer
*pRefAspect
) const
349 SepiaComposer
*returnValue
;
351 newAspectCopy(returnValue
,
352 dynamic_cast<const SepiaComposer
*>(pRefAspect
),
353 dynamic_cast<const SepiaComposer
*>(this));
359 void SepiaComposerBase::resolveLinks(void)
361 Inherited::resolveLinks();