changed: gcc8 base update
[opensg.git] / Source / Base / FieldContainer / Connector / OSGConnectorAttachmentBase.cpp
blobcea3df79bd09e66078a4f63a868560724cfe464f
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 ConnectorAttachment!
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 "OSGConnectorAttachmentBase.h"
67 #include "OSGConnectorAttachment.h"
69 #include <boost/bind.hpp>
71 OSG_BEGIN_NAMESPACE
73 /***************************************************************************\
74 * Description *
75 \***************************************************************************/
77 /*! \class OSG::ConnectorAttachment
81 /***************************************************************************\
82 * Field Documentation *
83 \***************************************************************************/
86 /***************************************************************************\
87 * FieldType/FieldTrait Instantiation *
88 \***************************************************************************/
90 #if !defined(OSG_DO_DOC) || defined(OSG_DOC_DEV)
91 PointerType FieldTraits<ConnectorAttachment *, nsOSG>::_type(
92 "ConnectorAttachmentPtr",
93 "AttachmentPtr",
94 ConnectorAttachment::getClassType(),
95 nsOSG);
96 #endif
98 OSG_FIELDTRAITS_GETTYPE_NS(ConnectorAttachment *, nsOSG)
100 OSG_EXPORT_PTR_SFIELD_FULL(PointerSField,
101 ConnectorAttachment *,
102 nsOSG)
104 OSG_EXPORT_PTR_MFIELD_FULL(PointerMField,
105 ConnectorAttachment *,
106 nsOSG)
108 /***************************************************************************\
109 * Field Description *
110 \***************************************************************************/
112 void ConnectorAttachmentBase::classDescInserter(TypeObject &oType)
117 ConnectorAttachmentBase::TypeObject ConnectorAttachmentBase::_type(
118 ConnectorAttachmentBase::getClassname(),
119 Inherited::getClassname(),
120 "ConnectorAttachment",
121 nsOSG, //Namespace
122 reinterpret_cast<PrototypeCreateF>(&ConnectorAttachmentBase::createEmptyLocal),
123 reinterpret_cast<InitContainerF>(&ConnectorAttachment::initMethod),
124 reinterpret_cast<ExitContainerF>(&ConnectorAttachment::exitMethod),
125 reinterpret_cast<InitalInsertDescFunc>(
126 reinterpret_cast<void *>(&ConnectorAttachment::classDescInserter)),
127 false,
129 "<?xml version=\"1.0\"?>\n"
130 "\n"
131 "<FieldContainer\n"
132 " name=\"ConnectorAttachment\"\n"
133 " parent=\"Attachment\"\n"
134 " library=\"Base\"\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"
143 " docGroupBase=\"GrpBaseFieldContainer\"\n"
144 ">\n"
145 "</FieldContainer>\n",
149 /*------------------------------ get -----------------------------------*/
151 FieldContainerType &ConnectorAttachmentBase::getType(void)
153 return _type;
156 const FieldContainerType &ConnectorAttachmentBase::getType(void) const
158 return _type;
161 UInt32 ConnectorAttachmentBase::getContainerSize(void) const
163 return sizeof(ConnectorAttachment);
166 /*------------------------- decorator get ------------------------------*/
173 /*------------------------------ access -----------------------------------*/
175 SizeT ConnectorAttachmentBase::getBinSize(ConstFieldMaskArg whichField)
177 SizeT returnValue = Inherited::getBinSize(whichField);
180 return returnValue;
183 void ConnectorAttachmentBase::copyToBin(BinaryDataHandler &pMem,
184 ConstFieldMaskArg whichField)
186 Inherited::copyToBin(pMem, whichField);
190 void ConnectorAttachmentBase::copyFromBin(BinaryDataHandler &pMem,
191 ConstFieldMaskArg whichField)
193 Inherited::copyFromBin(pMem, whichField);
197 //! create a new instance of the class
198 ConnectorAttachmentTransitPtr ConnectorAttachmentBase::createLocal(BitVector bFlags)
200 ConnectorAttachmentTransitPtr fc;
202 if(getClassType().getPrototype() != NULL)
204 FieldContainerTransitPtr tmpPtr =
205 getClassType().getPrototype()-> shallowCopyLocal(bFlags);
207 fc = dynamic_pointer_cast<ConnectorAttachment>(tmpPtr);
210 return fc;
213 //! create a new instance of the class, copy the container flags
214 ConnectorAttachmentTransitPtr ConnectorAttachmentBase::createDependent(BitVector bFlags)
216 ConnectorAttachmentTransitPtr fc;
218 if(getClassType().getPrototype() != NULL)
220 FieldContainerTransitPtr tmpPtr =
221 getClassType().getPrototype()-> shallowCopyDependent(bFlags);
223 fc = dynamic_pointer_cast<ConnectorAttachment>(tmpPtr);
226 return fc;
229 //! create a new instance of the class
230 ConnectorAttachmentTransitPtr ConnectorAttachmentBase::create(void)
232 return createLocal();
235 ConnectorAttachment *ConnectorAttachmentBase::createEmptyLocal(BitVector bFlags)
237 ConnectorAttachment *returnValue;
239 newPtr<ConnectorAttachment>(returnValue, bFlags);
241 returnValue->_pFieldFlags->_bNamespaceMask &= ~bFlags;
243 return returnValue;
246 //! create an empty new instance of the class, do not copy the prototype
247 ConnectorAttachment *ConnectorAttachmentBase::createEmpty(void)
249 return createEmptyLocal();
253 FieldContainerTransitPtr ConnectorAttachmentBase::shallowCopyLocal(
254 BitVector bFlags) const
256 ConnectorAttachment *tmpPtr;
258 newPtr(tmpPtr, dynamic_cast<const ConnectorAttachment *>(this), bFlags);
260 FieldContainerTransitPtr returnValue(tmpPtr);
262 tmpPtr->_pFieldFlags->_bNamespaceMask &= ~bFlags;
264 return returnValue;
267 FieldContainerTransitPtr ConnectorAttachmentBase::shallowCopyDependent(
268 BitVector bFlags) const
270 ConnectorAttachment *tmpPtr;
272 newPtr(tmpPtr, dynamic_cast<const ConnectorAttachment *>(this), ~bFlags);
274 FieldContainerTransitPtr returnValue(tmpPtr);
276 tmpPtr->_pFieldFlags->_bNamespaceMask = bFlags;
278 return returnValue;
281 FieldContainerTransitPtr ConnectorAttachmentBase::shallowCopy(void) const
283 return shallowCopyLocal();
289 /*------------------------- constructors ----------------------------------*/
291 ConnectorAttachmentBase::ConnectorAttachmentBase(void) :
292 Inherited()
296 ConnectorAttachmentBase::ConnectorAttachmentBase(const ConnectorAttachmentBase &source) :
297 Inherited(source)
302 /*-------------------------- destructors ----------------------------------*/
304 ConnectorAttachmentBase::~ConnectorAttachmentBase(void)
310 #ifdef OSG_MT_CPTR_ASPECT
311 void ConnectorAttachmentBase::execSyncV( FieldContainer &oFrom,
312 ConstFieldMaskArg whichField,
313 AspectOffsetStore &oOffsets,
314 ConstFieldMaskArg syncMode,
315 const UInt32 uiSyncInfo)
317 ConnectorAttachment *pThis = static_cast<ConnectorAttachment *>(this);
319 pThis->execSync(static_cast<ConnectorAttachment *>(&oFrom),
320 whichField,
321 oOffsets,
322 syncMode,
323 uiSyncInfo);
325 #endif
328 #ifdef OSG_MT_CPTR_ASPECT
329 FieldContainer *ConnectorAttachmentBase::createAspectCopy(
330 const FieldContainer *pRefAspect) const
332 ConnectorAttachment *returnValue;
334 newAspectCopy(returnValue,
335 dynamic_cast<const ConnectorAttachment *>(pRefAspect),
336 dynamic_cast<const ConnectorAttachment *>(this));
338 return returnValue;
340 #endif
342 void ConnectorAttachmentBase::resolveLinks(void)
344 Inherited::resolveLinks();
350 OSG_END_NAMESPACE