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 CSMNativeWindow!
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 "OSGCSMNativeWindowBase.h"
67 #include "OSGCSMNativeWindow.h"
69 #include <boost/bind.hpp>
73 /***************************************************************************\
75 \***************************************************************************/
77 /*! \class OSG::CSMNativeWindow
81 /***************************************************************************\
82 * Field Documentation *
83 \***************************************************************************/
86 /***************************************************************************\
87 * FieldType/FieldTrait Instantiation *
88 \***************************************************************************/
90 #if !defined(OSG_DO_DOC) || defined(OSG_DOC_DEV)
91 PointerType FieldTraits
<CSMNativeWindow
*, nsOSG
>::_type(
94 CSMNativeWindow::getClassType(),
98 OSG_FIELDTRAITS_GETTYPE_NS(CSMNativeWindow
*, nsOSG
)
100 OSG_EXPORT_PTR_SFIELD_FULL(PointerSField
,
104 OSG_EXPORT_PTR_MFIELD_FULL(PointerMField
,
108 /***************************************************************************\
109 * Field Description *
110 \***************************************************************************/
112 void CSMNativeWindowBase::classDescInserter(TypeObject
&oType
)
117 CSMNativeWindowBase::TypeObject
CSMNativeWindowBase::_type(
118 CSMNativeWindowBase::getClassname(),
119 Inherited::getClassname(),
122 reinterpret_cast<PrototypeCreateF
>(&CSMNativeWindowBase::createEmptyLocal
),
123 reinterpret_cast<InitContainerF
>(&CSMNativeWindow::initMethod
),
124 reinterpret_cast<ExitContainerF
>(&CSMNativeWindow::exitMethod
),
125 reinterpret_cast<InitalInsertDescFunc
>(
126 reinterpret_cast<void *>(&CSMNativeWindow::classDescInserter
)),
129 "<?xml version=\"1.0\"?>\n"
132 " name=\"CSMNativeWindow\"\n"
133 " parent=\"CSMWindow\"\n"
134 " library=\"ContribCSM\"\n"
135 " pointerfieldtypes=\"both\"\n"
136 " structure=\"concrete\"\n"
137 " systemcomponent=\"true\"\n"
138 " parentsystemcomponent=\"true\"\n"
139 " decoratable=\"false\"\n"
140 " useLocalIncludes=\"false\"\n"
141 " isNodeCore=\"false\"\n"
142 " isBundle=\"true\"\n"
144 "</FieldContainer>\n",
148 /*------------------------------ get -----------------------------------*/
150 FieldContainerType
&CSMNativeWindowBase::getType(void)
155 const FieldContainerType
&CSMNativeWindowBase::getType(void) const
160 UInt32
CSMNativeWindowBase::getContainerSize(void) const
162 return sizeof(CSMNativeWindow
);
165 /*------------------------- decorator get ------------------------------*/
172 /*------------------------------ access -----------------------------------*/
174 SizeT
CSMNativeWindowBase::getBinSize(ConstFieldMaskArg whichField
)
176 SizeT returnValue
= Inherited::getBinSize(whichField
);
182 void CSMNativeWindowBase::copyToBin(BinaryDataHandler
&pMem
,
183 ConstFieldMaskArg whichField
)
185 Inherited::copyToBin(pMem
, whichField
);
189 void CSMNativeWindowBase::copyFromBin(BinaryDataHandler
&pMem
,
190 ConstFieldMaskArg whichField
)
192 Inherited::copyFromBin(pMem
, whichField
);
196 //! create a new instance of the class
197 CSMNativeWindowTransitPtr
CSMNativeWindowBase::createLocal(BitVector bFlags
)
199 CSMNativeWindowTransitPtr fc
;
201 if(getClassType().getPrototype() != NULL
)
203 FieldContainerTransitPtr tmpPtr
=
204 getClassType().getPrototype()-> shallowCopyLocal(bFlags
);
206 fc
= dynamic_pointer_cast
<CSMNativeWindow
>(tmpPtr
);
212 //! create a new instance of the class, copy the container flags
213 CSMNativeWindowTransitPtr
CSMNativeWindowBase::createDependent(BitVector bFlags
)
215 CSMNativeWindowTransitPtr fc
;
217 if(getClassType().getPrototype() != NULL
)
219 FieldContainerTransitPtr tmpPtr
=
220 getClassType().getPrototype()-> shallowCopyDependent(bFlags
);
222 fc
= dynamic_pointer_cast
<CSMNativeWindow
>(tmpPtr
);
228 //! create a new instance of the class
229 CSMNativeWindowTransitPtr
CSMNativeWindowBase::create(void)
231 return createLocal();
234 CSMNativeWindow
*CSMNativeWindowBase::createEmptyLocal(BitVector bFlags
)
236 CSMNativeWindow
*returnValue
;
238 newPtr
<CSMNativeWindow
>(returnValue
, bFlags
);
240 returnValue
->_pFieldFlags
->_bNamespaceMask
&= ~bFlags
;
245 //! create an empty new instance of the class, do not copy the prototype
246 CSMNativeWindow
*CSMNativeWindowBase::createEmpty(void)
248 return createEmptyLocal();
252 FieldContainerTransitPtr
CSMNativeWindowBase::shallowCopyLocal(
253 BitVector bFlags
) const
255 CSMNativeWindow
*tmpPtr
;
257 newPtr(tmpPtr
, dynamic_cast<const CSMNativeWindow
*>(this), bFlags
);
259 FieldContainerTransitPtr
returnValue(tmpPtr
);
261 tmpPtr
->_pFieldFlags
->_bNamespaceMask
&= ~bFlags
;
266 FieldContainerTransitPtr
CSMNativeWindowBase::shallowCopyDependent(
267 BitVector bFlags
) const
269 CSMNativeWindow
*tmpPtr
;
271 newPtr(tmpPtr
, dynamic_cast<const CSMNativeWindow
*>(this), ~bFlags
);
273 FieldContainerTransitPtr
returnValue(tmpPtr
);
275 tmpPtr
->_pFieldFlags
->_bNamespaceMask
= bFlags
;
280 FieldContainerTransitPtr
CSMNativeWindowBase::shallowCopy(void) const
282 return shallowCopyLocal();
288 /*------------------------- constructors ----------------------------------*/
290 CSMNativeWindowBase::CSMNativeWindowBase(void) :
295 CSMNativeWindowBase::CSMNativeWindowBase(const CSMNativeWindowBase
&source
) :
301 /*-------------------------- destructors ----------------------------------*/
303 CSMNativeWindowBase::~CSMNativeWindowBase(void)
309 #ifdef OSG_MT_CPTR_ASPECT
310 void CSMNativeWindowBase::execSyncV( FieldContainer
&oFrom
,
311 ConstFieldMaskArg whichField
,
312 AspectOffsetStore
&oOffsets
,
313 ConstFieldMaskArg syncMode
,
314 const UInt32 uiSyncInfo
)
316 CSMNativeWindow
*pThis
= static_cast<CSMNativeWindow
*>(this);
318 pThis
->execSync(static_cast<CSMNativeWindow
*>(&oFrom
),
327 #ifdef OSG_MT_CPTR_ASPECT
328 FieldContainer
*CSMNativeWindowBase::createAspectCopy(
329 const FieldContainer
*pRefAspect
) const
331 CSMNativeWindow
*returnValue
;
333 newAspectCopy(returnValue
,
334 dynamic_cast<const CSMNativeWindow
*>(pRefAspect
),
335 dynamic_cast<const CSMNativeWindow
*>(this));
341 void CSMNativeWindowBase::resolveLinks(void)
343 Inherited::resolveLinks();