changed: gcc8 base update
[opensg.git] / Source / Base / FieldContainer / Threading / OSGHardwareContextBase.cpp
blobecc881f3e8a9811cf1b997cfd43a84ea173e06d1
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 HardwareContext!
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 "OSGHardwareContextBase.h"
67 #include "OSGHardwareContext.h"
69 #include <boost/bind.hpp>
71 OSG_BEGIN_NAMESPACE
73 /***************************************************************************\
74 * Description *
75 \***************************************************************************/
77 /*! \class OSG::HardwareContext
81 /***************************************************************************\
82 * Field Documentation *
83 \***************************************************************************/
86 /***************************************************************************\
87 * FieldType/FieldTrait Instantiation *
88 \***************************************************************************/
90 #if !defined(OSG_DO_DOC) || defined(OSG_DOC_DEV)
91 PointerType FieldTraits<HardwareContext *, nsOSG>::_type(
92 "HardwareContextPtr",
93 "AttachmentContainerPtr",
94 HardwareContext::getClassType(),
95 nsOSG);
96 #endif
98 OSG_FIELDTRAITS_GETTYPE_NS(HardwareContext *, nsOSG)
100 OSG_EXPORT_PTR_SFIELD_FULL(PointerSField,
101 HardwareContext *,
102 nsOSG)
104 OSG_EXPORT_PTR_MFIELD_FULL(PointerMField,
105 HardwareContext *,
106 nsOSG)
108 DataType &FieldTraits< HardwareContext *, nsOSG + 1 >::getType(void)
110 return FieldTraits<HardwareContext *, nsOSG>::getType();
114 OSG_EXPORT_PTR_SFIELD(ChildPointerSField,
115 HardwareContext *,
116 UnrecordedRefCountPolicy,
117 nsOSG + 1)
120 OSG_EXPORT_PTR_MFIELD(ChildPointerMField,
121 HardwareContext *,
122 UnrecordedRefCountPolicy,
123 nsOSG + 1)
126 DataType &FieldTraits<HardwareContext *, nsOSG + 2 >::getType(void)
128 return FieldTraits<HardwareContext *, nsOSG>::getType();
132 OSG_SFIELDTYPE_INST(ParentPointerSField,
133 HardwareContext *,
134 NoRefCountPolicy,
135 nsOSG + 2);
137 OSG_FIELD_DLLEXPORT_DEF3(ParentPointerSField,
138 HardwareContext *,
139 NoRefCountPolicy,
140 nsOSG + 2)
143 OSG_MFIELDTYPE_INST(ParentPointerMField,
144 HardwareContext *,
145 NoRefCountPolicy,
148 OSG_FIELD_DLLEXPORT_DEF3(ParentPointerMField,
149 HardwareContext *,
150 NoRefCountPolicy,
154 /***************************************************************************\
155 * Field Description *
156 \***************************************************************************/
158 void HardwareContextBase::classDescInserter(TypeObject &oType)
160 Inherited::classDescInserter(oType);
165 HardwareContextBase::TypeObject HardwareContextBase::_type(
166 HardwareContextBase::getClassname(),
167 Inherited::getClassname(),
168 "NULL",
169 nsOSG, //Namespace
170 NULL,
171 reinterpret_cast<InitContainerF>(&HardwareContext::initMethod),
172 reinterpret_cast<ExitContainerF>(&HardwareContext::exitMethod),
173 reinterpret_cast<InitalInsertDescFunc>(
174 reinterpret_cast<void *>(&HardwareContext::classDescInserter)),
175 false,
177 "<?xml version=\"1.0\" ?>\n"
178 "\n"
179 "<FieldContainer\n"
180 " name=\"HardwareContext\"\n"
181 " parent=\"AttachmentContainer\"\n"
182 " mixinparent=\"HardwareContextParent\"\n"
183 " library=\"Base\"\n"
184 " structure=\"abstract\"\n"
185 " pointerfieldtypes=\"both\"\n"
186 " parentFields=\"both\"\n"
187 " childFields=\"both\"\n"
188 " systemcomponent=\"true\"\n"
189 " parentsystemcomponent=\"true\"\n"
190 " isNodeCore=\"false\"\n"
191 " docGroupBase=\"GrpBaseHardwareContext\"\n"
192 " >\n"
193 "</FieldContainer>\n",
197 /*------------------------------ get -----------------------------------*/
199 FieldContainerType &HardwareContextBase::getType(void)
201 return _type;
204 const FieldContainerType &HardwareContextBase::getType(void) const
206 return _type;
209 UInt32 HardwareContextBase::getContainerSize(void) const
211 return sizeof(HardwareContext);
214 /*------------------------- decorator get ------------------------------*/
221 /*------------------------------ access -----------------------------------*/
223 SizeT HardwareContextBase::getBinSize(ConstFieldMaskArg whichField)
225 SizeT returnValue = Inherited::getBinSize(whichField);
228 return returnValue;
231 void HardwareContextBase::copyToBin(BinaryDataHandler &pMem,
232 ConstFieldMaskArg whichField)
234 Inherited::copyToBin(pMem, whichField);
238 void HardwareContextBase::copyFromBin(BinaryDataHandler &pMem,
239 ConstFieldMaskArg whichField)
241 Inherited::copyFromBin(pMem, whichField);
248 /*------------------------- constructors ----------------------------------*/
250 HardwareContextBase::HardwareContextBase(void) :
251 Inherited()
255 HardwareContextBase::HardwareContextBase(const HardwareContextBase &source) :
256 Inherited(source)
261 /*-------------------------- destructors ----------------------------------*/
263 HardwareContextBase::~HardwareContextBase(void)
269 #ifdef OSG_MT_CPTR_ASPECT
270 void HardwareContextBase::execSyncV( FieldContainer &oFrom,
271 ConstFieldMaskArg whichField,
272 AspectOffsetStore &oOffsets,
273 ConstFieldMaskArg syncMode,
274 const UInt32 uiSyncInfo)
276 HardwareContext *pThis = static_cast<HardwareContext *>(this);
278 pThis->execSync(static_cast<HardwareContext *>(&oFrom),
279 whichField,
280 oOffsets,
281 syncMode,
282 uiSyncInfo);
284 #endif
288 void HardwareContextBase::resolveLinks(void)
290 Inherited::resolveLinks();
296 OSG_END_NAMESPACE