fixed: gcc8 compile issues
[opensg.git] / Source / Contrib / ComplexSceneManager / OSGCSMNativeWindowBase.cpp
blobce655ef50bc76cbe0334106da57aee6a60633c7e
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 CSMNativeWindow!
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 "OSGCSMNativeWindowBase.h"
67 #include "OSGCSMNativeWindow.h"
69 #include <boost/bind.hpp>
71 OSG_BEGIN_NAMESPACE
73 /***************************************************************************\
74 * Description *
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(
92 "CSMNativeWindowPtr",
93 "CSMWindowPtr",
94 CSMNativeWindow::getClassType(),
95 nsOSG);
96 #endif
98 OSG_FIELDTRAITS_GETTYPE_NS(CSMNativeWindow *, nsOSG)
100 OSG_EXPORT_PTR_SFIELD_FULL(PointerSField,
101 CSMNativeWindow *,
102 nsOSG)
104 OSG_EXPORT_PTR_MFIELD_FULL(PointerMField,
105 CSMNativeWindow *,
106 nsOSG)
108 /***************************************************************************\
109 * Field Description *
110 \***************************************************************************/
112 void CSMNativeWindowBase::classDescInserter(TypeObject &oType)
117 CSMNativeWindowBase::TypeObject CSMNativeWindowBase::_type(
118 CSMNativeWindowBase::getClassname(),
119 Inherited::getClassname(),
120 "NULL",
121 nsOSG, //Namespace
122 reinterpret_cast<PrototypeCreateF>(&CSMNativeWindowBase::createEmptyLocal),
123 reinterpret_cast<InitContainerF>(&CSMNativeWindow::initMethod),
124 reinterpret_cast<ExitContainerF>(&CSMNativeWindow::exitMethod),
125 reinterpret_cast<InitalInsertDescFunc>(&CSMNativeWindow::classDescInserter),
126 false,
128 "<?xml version=\"1.0\"?>\n"
129 "\n"
130 "<FieldContainer\n"
131 " name=\"CSMNativeWindow\"\n"
132 " parent=\"CSMWindow\"\n"
133 " library=\"ContribCSM\"\n"
134 " pointerfieldtypes=\"both\"\n"
135 " structure=\"concrete\"\n"
136 " systemcomponent=\"true\"\n"
137 " parentsystemcomponent=\"true\"\n"
138 " decoratable=\"false\"\n"
139 " useLocalIncludes=\"false\"\n"
140 " isNodeCore=\"false\"\n"
141 " isBundle=\"true\"\n"
142 ">\n"
143 "</FieldContainer>\n",
147 /*------------------------------ get -----------------------------------*/
149 FieldContainerType &CSMNativeWindowBase::getType(void)
151 return _type;
154 const FieldContainerType &CSMNativeWindowBase::getType(void) const
156 return _type;
159 UInt32 CSMNativeWindowBase::getContainerSize(void) const
161 return sizeof(CSMNativeWindow);
164 /*------------------------- decorator get ------------------------------*/
171 /*------------------------------ access -----------------------------------*/
173 SizeT CSMNativeWindowBase::getBinSize(ConstFieldMaskArg whichField)
175 SizeT returnValue = Inherited::getBinSize(whichField);
178 return returnValue;
181 void CSMNativeWindowBase::copyToBin(BinaryDataHandler &pMem,
182 ConstFieldMaskArg whichField)
184 Inherited::copyToBin(pMem, whichField);
188 void CSMNativeWindowBase::copyFromBin(BinaryDataHandler &pMem,
189 ConstFieldMaskArg whichField)
191 Inherited::copyFromBin(pMem, whichField);
195 //! create a new instance of the class
196 CSMNativeWindowTransitPtr CSMNativeWindowBase::createLocal(BitVector bFlags)
198 CSMNativeWindowTransitPtr fc;
200 if(getClassType().getPrototype() != NULL)
202 FieldContainerTransitPtr tmpPtr =
203 getClassType().getPrototype()-> shallowCopyLocal(bFlags);
205 fc = dynamic_pointer_cast<CSMNativeWindow>(tmpPtr);
208 return fc;
211 //! create a new instance of the class, copy the container flags
212 CSMNativeWindowTransitPtr CSMNativeWindowBase::createDependent(BitVector bFlags)
214 CSMNativeWindowTransitPtr fc;
216 if(getClassType().getPrototype() != NULL)
218 FieldContainerTransitPtr tmpPtr =
219 getClassType().getPrototype()-> shallowCopyDependent(bFlags);
221 fc = dynamic_pointer_cast<CSMNativeWindow>(tmpPtr);
224 return fc;
227 //! create a new instance of the class
228 CSMNativeWindowTransitPtr CSMNativeWindowBase::create(void)
230 return createLocal();
233 CSMNativeWindow *CSMNativeWindowBase::createEmptyLocal(BitVector bFlags)
235 CSMNativeWindow *returnValue;
237 newPtr<CSMNativeWindow>(returnValue, bFlags);
239 returnValue->_pFieldFlags->_bNamespaceMask &= ~bFlags;
241 return returnValue;
244 //! create an empty new instance of the class, do not copy the prototype
245 CSMNativeWindow *CSMNativeWindowBase::createEmpty(void)
247 return createEmptyLocal();
251 FieldContainerTransitPtr CSMNativeWindowBase::shallowCopyLocal(
252 BitVector bFlags) const
254 CSMNativeWindow *tmpPtr;
256 newPtr(tmpPtr, dynamic_cast<const CSMNativeWindow *>(this), bFlags);
258 FieldContainerTransitPtr returnValue(tmpPtr);
260 tmpPtr->_pFieldFlags->_bNamespaceMask &= ~bFlags;
262 return returnValue;
265 FieldContainerTransitPtr CSMNativeWindowBase::shallowCopyDependent(
266 BitVector bFlags) const
268 CSMNativeWindow *tmpPtr;
270 newPtr(tmpPtr, dynamic_cast<const CSMNativeWindow *>(this), ~bFlags);
272 FieldContainerTransitPtr returnValue(tmpPtr);
274 tmpPtr->_pFieldFlags->_bNamespaceMask = bFlags;
276 return returnValue;
279 FieldContainerTransitPtr CSMNativeWindowBase::shallowCopy(void) const
281 return shallowCopyLocal();
287 /*------------------------- constructors ----------------------------------*/
289 CSMNativeWindowBase::CSMNativeWindowBase(void) :
290 Inherited()
294 CSMNativeWindowBase::CSMNativeWindowBase(const CSMNativeWindowBase &source) :
295 Inherited(source)
300 /*-------------------------- destructors ----------------------------------*/
302 CSMNativeWindowBase::~CSMNativeWindowBase(void)
308 #ifdef OSG_MT_CPTR_ASPECT
309 void CSMNativeWindowBase::execSyncV( FieldContainer &oFrom,
310 ConstFieldMaskArg whichField,
311 AspectOffsetStore &oOffsets,
312 ConstFieldMaskArg syncMode,
313 const UInt32 uiSyncInfo)
315 CSMNativeWindow *pThis = static_cast<CSMNativeWindow *>(this);
317 pThis->execSync(static_cast<CSMNativeWindow *>(&oFrom),
318 whichField,
319 oOffsets,
320 syncMode,
321 uiSyncInfo);
323 #endif
326 #ifdef OSG_MT_CPTR_ASPECT
327 FieldContainer *CSMNativeWindowBase::createAspectCopy(
328 const FieldContainer *pRefAspect) const
330 CSMNativeWindow *returnValue;
332 newAspectCopy(returnValue,
333 dynamic_cast<const CSMNativeWindow *>(pRefAspect),
334 dynamic_cast<const CSMNativeWindow *>(this));
336 return returnValue;
338 #endif
340 void CSMNativeWindowBase::resolveLinks(void)
342 Inherited::resolveLinks();
348 OSG_END_NAMESPACE