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 ConnectorAttachment!
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 "OSGConnectorAttachmentBase.h"
67 #include "OSGConnectorAttachment.h"
69 #include <boost/bind.hpp>
73 /***************************************************************************\
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",
94 ConnectorAttachment::getClassType(),
98 OSG_FIELDTRAITS_GETTYPE_NS(ConnectorAttachment
*, nsOSG
)
100 OSG_EXPORT_PTR_SFIELD_FULL(PointerSField
,
101 ConnectorAttachment
*,
104 OSG_EXPORT_PTR_MFIELD_FULL(PointerMField
,
105 ConnectorAttachment
*,
108 /***************************************************************************\
109 * Field Description *
110 \***************************************************************************/
112 void ConnectorAttachmentBase::classDescInserter(TypeObject
&oType
)
117 ConnectorAttachmentBase::TypeObject
ConnectorAttachmentBase::_type(
118 ConnectorAttachmentBase::getClassname(),
119 Inherited::getClassname(),
120 "ConnectorAttachment",
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
)),
129 "<?xml version=\"1.0\"?>\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"
145 "</FieldContainer>\n",
149 /*------------------------------ get -----------------------------------*/
151 FieldContainerType
&ConnectorAttachmentBase::getType(void)
156 const FieldContainerType
&ConnectorAttachmentBase::getType(void) const
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
);
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
);
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
);
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
;
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
;
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
;
281 FieldContainerTransitPtr
ConnectorAttachmentBase::shallowCopy(void) const
283 return shallowCopyLocal();
289 /*------------------------- constructors ----------------------------------*/
291 ConnectorAttachmentBase::ConnectorAttachmentBase(void) :
296 ConnectorAttachmentBase::ConnectorAttachmentBase(const ConnectorAttachmentBase
&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
),
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));
342 void ConnectorAttachmentBase::resolveLinks(void)
344 Inherited::resolveLinks();