changed: gcc8 base update
[opensg.git] / Source / Contrib / ComplexSceneManager / Passive / OSGCSMPassiveWinClearOpBase.cpp
blob017f76b0ded70d33f3a9c68e62a0cd2aba7776ef
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 CSMPassiveWinClearOp!
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 "OSGCSMPassiveWinClearOpBase.h"
67 #include "OSGCSMPassiveWinClearOp.h"
69 #include <boost/bind.hpp>
71 OSG_BEGIN_NAMESPACE
73 /***************************************************************************\
74 * Description *
75 \***************************************************************************/
77 /*! \class OSG::CSMPassiveWinClearOp
81 /***************************************************************************\
82 * Field Documentation *
83 \***************************************************************************/
85 /*! \var bool CSMPassiveWinClearOpBase::_sfEnabled
90 /***************************************************************************\
91 * FieldType/FieldTrait Instantiation *
92 \***************************************************************************/
94 #if !defined(OSG_DO_DOC) || defined(OSG_DOC_DEV)
95 PointerType FieldTraits<CSMPassiveWinClearOp *, nsOSG>::_type(
96 "CSMPassiveWinClearOpPtr",
97 "AttachmentContainerPtr",
98 CSMPassiveWinClearOp::getClassType(),
99 nsOSG);
100 #endif
102 OSG_FIELDTRAITS_GETTYPE_NS(CSMPassiveWinClearOp *, nsOSG)
104 OSG_EXPORT_PTR_SFIELD_FULL(PointerSField,
105 CSMPassiveWinClearOp *,
106 nsOSG)
108 OSG_EXPORT_PTR_MFIELD_FULL(PointerMField,
109 CSMPassiveWinClearOp *,
110 nsOSG)
112 /***************************************************************************\
113 * Field Description *
114 \***************************************************************************/
116 void CSMPassiveWinClearOpBase::classDescInserter(TypeObject &oType)
118 FieldDescriptionBase *pDesc = NULL;
121 pDesc = new SFBool::Description(
122 SFBool::getClassType(),
123 "enabled",
125 EnabledFieldId, EnabledFieldMask,
126 false,
127 (Field::SFDefaultFlags | Field::FStdAccess),
128 static_cast<FieldEditMethodSig>(&CSMPassiveWinClearOp::editHandleEnabled),
129 static_cast<FieldGetMethodSig >(&CSMPassiveWinClearOp::getHandleEnabled));
131 oType.addInitialDesc(pDesc);
135 CSMPassiveWinClearOpBase::TypeObject CSMPassiveWinClearOpBase::_type(
136 CSMPassiveWinClearOpBase::getClassname(),
137 Inherited::getClassname(),
138 "NULL",
139 nsOSG, //Namespace
140 reinterpret_cast<PrototypeCreateF>(&CSMPassiveWinClearOpBase::createEmptyLocal),
141 reinterpret_cast<InitContainerF>(&CSMPassiveWinClearOp::initMethod),
142 reinterpret_cast<ExitContainerF>(&CSMPassiveWinClearOp::exitMethod),
143 reinterpret_cast<InitalInsertDescFunc>(
144 reinterpret_cast<void *>(&CSMPassiveWinClearOp::classDescInserter)),
145 false,
147 "<?xml version=\"1.0\"?>\n"
148 "\n"
149 "<FieldContainer\n"
150 " name=\"CSMPassiveWinClearOp\"\n"
151 " parent=\"AttachmentContainer\"\n"
152 " library=\"ContribCSM\"\n"
153 " pointerfieldtypes=\"both\"\n"
154 " structure=\"concrete\"\n"
155 " systemcomponent=\"true\"\n"
156 " parentsystemcomponent=\"true\"\n"
157 " decoratable=\"false\"\n"
158 " useLocalIncludes=\"false\"\n"
159 " isNodeCore=\"false\"\n"
160 " isBundle=\"true\"\n"
161 " >\n"
162 " <Field\n"
163 "\t name=\"enabled\"\n"
164 "\t type=\"bool\"\n"
165 "\t cardinality=\"single\"\n"
166 "\t visibility=\"external\"\n"
167 " defaultValue=\"true\"\n"
168 "\t >\n"
169 " </Field>\n"
170 "</FieldContainer>\n",
174 /*------------------------------ get -----------------------------------*/
176 FieldContainerType &CSMPassiveWinClearOpBase::getType(void)
178 return _type;
181 const FieldContainerType &CSMPassiveWinClearOpBase::getType(void) const
183 return _type;
186 UInt32 CSMPassiveWinClearOpBase::getContainerSize(void) const
188 return sizeof(CSMPassiveWinClearOp);
191 /*------------------------- decorator get ------------------------------*/
194 SFBool *CSMPassiveWinClearOpBase::editSFEnabled(void)
196 editSField(EnabledFieldMask);
198 return &_sfEnabled;
201 const SFBool *CSMPassiveWinClearOpBase::getSFEnabled(void) const
203 return &_sfEnabled;
211 /*------------------------------ access -----------------------------------*/
213 SizeT CSMPassiveWinClearOpBase::getBinSize(ConstFieldMaskArg whichField)
215 SizeT returnValue = Inherited::getBinSize(whichField);
217 if(FieldBits::NoField != (EnabledFieldMask & whichField))
219 returnValue += _sfEnabled.getBinSize();
222 return returnValue;
225 void CSMPassiveWinClearOpBase::copyToBin(BinaryDataHandler &pMem,
226 ConstFieldMaskArg whichField)
228 Inherited::copyToBin(pMem, whichField);
230 if(FieldBits::NoField != (EnabledFieldMask & whichField))
232 _sfEnabled.copyToBin(pMem);
236 void CSMPassiveWinClearOpBase::copyFromBin(BinaryDataHandler &pMem,
237 ConstFieldMaskArg whichField)
239 Inherited::copyFromBin(pMem, whichField);
241 if(FieldBits::NoField != (EnabledFieldMask & whichField))
243 editSField(EnabledFieldMask);
244 _sfEnabled.copyFromBin(pMem);
248 //! create a new instance of the class
249 CSMPassiveWinClearOpTransitPtr CSMPassiveWinClearOpBase::createLocal(BitVector bFlags)
251 CSMPassiveWinClearOpTransitPtr fc;
253 if(getClassType().getPrototype() != NULL)
255 FieldContainerTransitPtr tmpPtr =
256 getClassType().getPrototype()-> shallowCopyLocal(bFlags);
258 fc = dynamic_pointer_cast<CSMPassiveWinClearOp>(tmpPtr);
261 return fc;
264 //! create a new instance of the class, copy the container flags
265 CSMPassiveWinClearOpTransitPtr CSMPassiveWinClearOpBase::createDependent(BitVector bFlags)
267 CSMPassiveWinClearOpTransitPtr fc;
269 if(getClassType().getPrototype() != NULL)
271 FieldContainerTransitPtr tmpPtr =
272 getClassType().getPrototype()-> shallowCopyDependent(bFlags);
274 fc = dynamic_pointer_cast<CSMPassiveWinClearOp>(tmpPtr);
277 return fc;
280 //! create a new instance of the class
281 CSMPassiveWinClearOpTransitPtr CSMPassiveWinClearOpBase::create(void)
283 return createLocal();
286 CSMPassiveWinClearOp *CSMPassiveWinClearOpBase::createEmptyLocal(BitVector bFlags)
288 CSMPassiveWinClearOp *returnValue;
290 newPtr<CSMPassiveWinClearOp>(returnValue, bFlags);
292 returnValue->_pFieldFlags->_bNamespaceMask &= ~bFlags;
294 return returnValue;
297 //! create an empty new instance of the class, do not copy the prototype
298 CSMPassiveWinClearOp *CSMPassiveWinClearOpBase::createEmpty(void)
300 return createEmptyLocal();
304 FieldContainerTransitPtr CSMPassiveWinClearOpBase::shallowCopyLocal(
305 BitVector bFlags) const
307 CSMPassiveWinClearOp *tmpPtr;
309 newPtr(tmpPtr, dynamic_cast<const CSMPassiveWinClearOp *>(this), bFlags);
311 FieldContainerTransitPtr returnValue(tmpPtr);
313 tmpPtr->_pFieldFlags->_bNamespaceMask &= ~bFlags;
315 return returnValue;
318 FieldContainerTransitPtr CSMPassiveWinClearOpBase::shallowCopyDependent(
319 BitVector bFlags) const
321 CSMPassiveWinClearOp *tmpPtr;
323 newPtr(tmpPtr, dynamic_cast<const CSMPassiveWinClearOp *>(this), ~bFlags);
325 FieldContainerTransitPtr returnValue(tmpPtr);
327 tmpPtr->_pFieldFlags->_bNamespaceMask = bFlags;
329 return returnValue;
332 FieldContainerTransitPtr CSMPassiveWinClearOpBase::shallowCopy(void) const
334 return shallowCopyLocal();
340 /*------------------------- constructors ----------------------------------*/
342 CSMPassiveWinClearOpBase::CSMPassiveWinClearOpBase(void) :
343 Inherited(),
344 _sfEnabled (bool(true))
348 CSMPassiveWinClearOpBase::CSMPassiveWinClearOpBase(const CSMPassiveWinClearOpBase &source) :
349 Inherited(source),
350 _sfEnabled (source._sfEnabled )
355 /*-------------------------- destructors ----------------------------------*/
357 CSMPassiveWinClearOpBase::~CSMPassiveWinClearOpBase(void)
362 GetFieldHandlePtr CSMPassiveWinClearOpBase::getHandleEnabled (void) const
364 SFBool::GetHandlePtr returnValue(
365 new SFBool::GetHandle(
366 &_sfEnabled,
367 this->getType().getFieldDesc(EnabledFieldId),
368 const_cast<CSMPassiveWinClearOpBase *>(this)));
370 return returnValue;
373 EditFieldHandlePtr CSMPassiveWinClearOpBase::editHandleEnabled (void)
375 SFBool::EditHandlePtr returnValue(
376 new SFBool::EditHandle(
377 &_sfEnabled,
378 this->getType().getFieldDesc(EnabledFieldId),
379 this));
382 editSField(EnabledFieldMask);
384 return returnValue;
388 #ifdef OSG_MT_CPTR_ASPECT
389 void CSMPassiveWinClearOpBase::execSyncV( FieldContainer &oFrom,
390 ConstFieldMaskArg whichField,
391 AspectOffsetStore &oOffsets,
392 ConstFieldMaskArg syncMode,
393 const UInt32 uiSyncInfo)
395 CSMPassiveWinClearOp *pThis = static_cast<CSMPassiveWinClearOp *>(this);
397 pThis->execSync(static_cast<CSMPassiveWinClearOp *>(&oFrom),
398 whichField,
399 oOffsets,
400 syncMode,
401 uiSyncInfo);
403 #endif
406 #ifdef OSG_MT_CPTR_ASPECT
407 FieldContainer *CSMPassiveWinClearOpBase::createAspectCopy(
408 const FieldContainer *pRefAspect) const
410 CSMPassiveWinClearOp *returnValue;
412 newAspectCopy(returnValue,
413 dynamic_cast<const CSMPassiveWinClearOp *>(pRefAspect),
414 dynamic_cast<const CSMPassiveWinClearOp *>(this));
416 return returnValue;
418 #endif
420 void CSMPassiveWinClearOpBase::resolveLinks(void)
422 Inherited::resolveLinks();
428 OSG_END_NAMESPACE