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 CSMClusterWindow!
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"
65 #include "OSGCSMWindow.h" // ClientWindow Class
66 #include "OSGImageComposer.h" // Composer Class
67 #include "OSGCSMClusterWinOptions.h" // Options Class
69 #include "OSGCSMClusterWindowBase.h"
70 #include "OSGCSMClusterWindow.h"
72 #include <boost/bind.hpp>
76 /***************************************************************************\
78 \***************************************************************************/
80 /*! \class OSG::CSMClusterWindow
84 /***************************************************************************\
85 * Field Documentation *
86 \***************************************************************************/
88 /*! \var CSMWindow * CSMClusterWindowBase::_sfClientWindow
92 /*! \var bool CSMClusterWindowBase::_sfRenderClient
96 /*! \var std::string CSMClusterWindowBase::_mfServers
100 /*! \var UInt32 CSMClusterWindowBase::_mfServerIds
104 /*! \var UInt32 CSMClusterWindowBase::_sfServerRows
108 /*! \var std::string CSMClusterWindowBase::_sfConnectionType
112 /*! \var std::string CSMClusterWindowBase::_sfClusterMode
116 /*! \var ImageComposer * CSMClusterWindowBase::_sfComposer
120 /*! \var CSMClusterWinOptions * CSMClusterWindowBase::_sfOptions
125 /***************************************************************************\
126 * FieldType/FieldTrait Instantiation *
127 \***************************************************************************/
129 #if !defined(OSG_DO_DOC) || defined(OSG_DOC_DEV)
130 PointerType FieldTraits
<CSMClusterWindow
*, nsOSG
>::_type(
131 "CSMClusterWindowPtr",
133 CSMClusterWindow::getClassType(),
137 OSG_FIELDTRAITS_GETTYPE_NS(CSMClusterWindow
*, nsOSG
)
139 OSG_EXPORT_PTR_SFIELD_FULL(PointerSField
,
143 OSG_EXPORT_PTR_MFIELD_FULL(PointerMField
,
147 DataType
&FieldTraits
<CSMClusterWindow
*, nsOSG
+ 1 >::getType(void)
149 return FieldTraits
<CSMClusterWindow
*, nsOSG
>::getType();
153 OSG_SFIELDTYPE_INST(ParentPointerSField
,
158 OSG_FIELD_DLLEXPORT_DEF3(ParentPointerSField
,
164 /***************************************************************************\
165 * Field Description *
166 \***************************************************************************/
168 void CSMClusterWindowBase::classDescInserter(TypeObject
&oType
)
170 FieldDescriptionBase
*pDesc
= NULL
;
173 pDesc
= new SFUnrecChildCSMWindowPtr::Description(
174 SFUnrecChildCSMWindowPtr::getClassType(),
177 ClientWindowFieldId
, ClientWindowFieldMask
,
179 (Field::SFDefaultFlags
| Field::FStdAccess
),
180 static_cast<FieldEditMethodSig
>(&CSMClusterWindow::editHandleClientWindow
),
181 static_cast<FieldGetMethodSig
>(&CSMClusterWindow::getHandleClientWindow
));
183 oType
.addInitialDesc(pDesc
);
185 pDesc
= new SFBool::Description(
186 SFBool::getClassType(),
189 RenderClientFieldId
, RenderClientFieldMask
,
191 (Field::SFDefaultFlags
| Field::FStdAccess
),
192 static_cast<FieldEditMethodSig
>(&CSMClusterWindow::editHandleRenderClient
),
193 static_cast<FieldGetMethodSig
>(&CSMClusterWindow::getHandleRenderClient
));
195 oType
.addInitialDesc(pDesc
);
197 pDesc
= new MFString::Description(
198 MFString::getClassType(),
201 ServersFieldId
, ServersFieldMask
,
203 (Field::MFDefaultFlags
| Field::FStdAccess
),
204 static_cast<FieldEditMethodSig
>(&CSMClusterWindow::editHandleServers
),
205 static_cast<FieldGetMethodSig
>(&CSMClusterWindow::getHandleServers
));
207 oType
.addInitialDesc(pDesc
);
209 pDesc
= new MFUInt32::Description(
210 MFUInt32::getClassType(),
213 ServerIdsFieldId
, ServerIdsFieldMask
,
215 (Field::MFDefaultFlags
| Field::FStdAccess
),
216 static_cast<FieldEditMethodSig
>(&CSMClusterWindow::editHandleServerIds
),
217 static_cast<FieldGetMethodSig
>(&CSMClusterWindow::getHandleServerIds
));
219 oType
.addInitialDesc(pDesc
);
221 pDesc
= new SFUInt32::Description(
222 SFUInt32::getClassType(),
225 ServerRowsFieldId
, ServerRowsFieldMask
,
227 (Field::SFDefaultFlags
| Field::FStdAccess
),
228 static_cast<FieldEditMethodSig
>(&CSMClusterWindow::editHandleServerRows
),
229 static_cast<FieldGetMethodSig
>(&CSMClusterWindow::getHandleServerRows
));
231 oType
.addInitialDesc(pDesc
);
233 pDesc
= new SFString::Description(
234 SFString::getClassType(),
237 ConnectionTypeFieldId
, ConnectionTypeFieldMask
,
239 (Field::SFDefaultFlags
| Field::FStdAccess
),
240 static_cast<FieldEditMethodSig
>(&CSMClusterWindow::editHandleConnectionType
),
241 static_cast<FieldGetMethodSig
>(&CSMClusterWindow::getHandleConnectionType
));
243 oType
.addInitialDesc(pDesc
);
245 pDesc
= new SFString::Description(
246 SFString::getClassType(),
249 ClusterModeFieldId
, ClusterModeFieldMask
,
251 (Field::SFDefaultFlags
| Field::FStdAccess
),
252 static_cast<FieldEditMethodSig
>(&CSMClusterWindow::editHandleClusterMode
),
253 static_cast<FieldGetMethodSig
>(&CSMClusterWindow::getHandleClusterMode
));
255 oType
.addInitialDesc(pDesc
);
257 pDesc
= new SFUnrecImageComposerPtr::Description(
258 SFUnrecImageComposerPtr::getClassType(),
261 ComposerFieldId
, ComposerFieldMask
,
263 (Field::SFDefaultFlags
| Field::FStdAccess
),
264 static_cast<FieldEditMethodSig
>(&CSMClusterWindow::editHandleComposer
),
265 static_cast<FieldGetMethodSig
>(&CSMClusterWindow::getHandleComposer
));
267 oType
.addInitialDesc(pDesc
);
269 pDesc
= new SFUnrecChildCSMClusterWinOptionsPtr::Description(
270 SFUnrecChildCSMClusterWinOptionsPtr::getClassType(),
273 OptionsFieldId
, OptionsFieldMask
,
275 (Field::SFDefaultFlags
| Field::FStdAccess
),
276 static_cast<FieldEditMethodSig
>(&CSMClusterWindow::editHandleOptions
),
277 static_cast<FieldGetMethodSig
>(&CSMClusterWindow::getHandleOptions
));
279 oType
.addInitialDesc(pDesc
);
283 CSMClusterWindowBase::TypeObject
CSMClusterWindowBase::_type(
284 CSMClusterWindowBase::getClassname(),
285 Inherited::getClassname(),
288 reinterpret_cast<PrototypeCreateF
>(&CSMClusterWindowBase::createEmptyLocal
),
289 reinterpret_cast<InitContainerF
>(&CSMClusterWindow::initMethod
),
290 reinterpret_cast<ExitContainerF
>(&CSMClusterWindow::exitMethod
),
291 reinterpret_cast<InitalInsertDescFunc
>(
292 reinterpret_cast<void *>(&CSMClusterWindow::classDescInserter
)),
295 "<?xml version=\"1.0\"?>\n"
298 " name=\"CSMClusterWindow\"\n"
299 " parent=\"CSMWindow\"\n"
300 " library=\"ContribCSM\"\n"
301 " pointerfieldtypes=\"both\"\n"
302 " structure=\"concrete\"\n"
303 " systemcomponent=\"true\"\n"
304 " parentsystemcomponent=\"true\"\n"
305 " decoratable=\"false\"\n"
306 " useLocalIncludes=\"false\"\n"
307 " isNodeCore=\"false\"\n"
308 " isBundle=\"true\"\n"
309 " parentFields=\"single\"\n"
312 "\t\tname=\"clientWindow\"\n"
313 "\t\ttype=\"CSMWindow\"\n"
314 "\t\tcardinality=\"single\"\n"
315 "\t\tvisibility=\"external\"\n"
316 "\t\taccess=\"public\"\n"
317 " category=\"childpointer\"\n"
318 " childParentType=\"CSMClusterWindow\"\n"
319 " linkParentField=\"Parent\"\n"
323 " name=\"renderClient\"\n"
325 " cardinality=\"single\"\n"
326 " visibility=\"external\"\n"
327 " access=\"public\"\n"
328 " defaultValue=\"true\"\n"
333 "\t\tname=\"servers\"\n"
334 "\t\ttype=\"std::string\"\n"
335 "\t\tcardinality=\"multi\"\n"
336 "\t\tvisibility=\"internal\"\n"
337 "\t\taccess=\"public\"\n"
341 "\t\tname=\"serverIds\"\n"
342 "\t\ttype=\"UInt32\"\n"
343 "\t\tcardinality=\"multi\"\n"
344 "\t\tvisibility=\"external\"\n"
345 "\t\taccess=\"public\"\n"
349 " name=\"serverRows\"\n"
351 " cardinality=\"single\"\n"
352 " visibility=\"external\"\n"
353 " access=\"public\"\n"
358 "\t\tname=\"connectionType\"\n"
359 "\t\ttype=\"std::string\"\n"
360 "\t\tcardinality=\"single\"\n"
361 "\t\tvisibility=\"internal\"\n"
362 "\t\taccess=\"public\"\n"
366 "\t\tname=\"clusterMode\"\n"
367 "\t\ttype=\"std::string\"\n"
368 "\t\tcardinality=\"single\"\n"
369 "\t\tvisibility=\"internal\"\n"
370 "\t\taccess=\"public\"\n"
376 "\t\tname=\"composer\"\n"
377 "\t\ttype=\"ImageComposer\"\n"
378 "\t\tcardinality=\"single\"\n"
379 "\t\tvisibility=\"external\"\n"
380 "\t\taccess=\"public\"\n"
381 " category=\"pointer\"\n"
385 "\t\tname=\"options\"\n"
386 "\t\ttype=\"CSMClusterWinOptions\"\n"
387 "\t\tcardinality=\"single\"\n"
388 "\t\tvisibility=\"external\"\n"
389 "\t\taccess=\"public\"\n"
390 " category=\"childpointer\"\n"
391 " childParentType=\"CSMClusterWindow\"\n"
392 " linkParentField=\"Parent\"\n"
395 "</FieldContainer>\n",
399 /*------------------------------ get -----------------------------------*/
401 FieldContainerType
&CSMClusterWindowBase::getType(void)
406 const FieldContainerType
&CSMClusterWindowBase::getType(void) const
411 UInt32
CSMClusterWindowBase::getContainerSize(void) const
413 return sizeof(CSMClusterWindow
);
416 /*------------------------- decorator get ------------------------------*/
419 //! Get the CSMClusterWindow::_sfClientWindow field.
420 const SFUnrecChildCSMWindowPtr
*CSMClusterWindowBase::getSFClientWindow(void) const
422 return &_sfClientWindow
;
425 SFUnrecChildCSMWindowPtr
*CSMClusterWindowBase::editSFClientWindow (void)
427 editSField(ClientWindowFieldMask
);
429 return &_sfClientWindow
;
432 //! Get the value of the CSMClusterWindow::_sfClientWindow field.
433 CSMWindow
* CSMClusterWindowBase::getClientWindow(void) const
435 return _sfClientWindow
.getValue();
438 //! Set the value of the CSMClusterWindow::_sfClientWindow field.
439 void CSMClusterWindowBase::setClientWindow(CSMWindow
* const value
)
441 editSField(ClientWindowFieldMask
);
443 _sfClientWindow
.setValue(value
);
447 SFBool
*CSMClusterWindowBase::editSFRenderClient(void)
449 editSField(RenderClientFieldMask
);
451 return &_sfRenderClient
;
454 const SFBool
*CSMClusterWindowBase::getSFRenderClient(void) const
456 return &_sfRenderClient
;
460 MFString
*CSMClusterWindowBase::editMFServers(void)
462 editMField(ServersFieldMask
, _mfServers
);
467 const MFString
*CSMClusterWindowBase::getMFServers(void) const
473 MFUInt32
*CSMClusterWindowBase::editMFServerIds(void)
475 editMField(ServerIdsFieldMask
, _mfServerIds
);
477 return &_mfServerIds
;
480 const MFUInt32
*CSMClusterWindowBase::getMFServerIds(void) const
482 return &_mfServerIds
;
486 SFUInt32
*CSMClusterWindowBase::editSFServerRows(void)
488 editSField(ServerRowsFieldMask
);
490 return &_sfServerRows
;
493 const SFUInt32
*CSMClusterWindowBase::getSFServerRows(void) const
495 return &_sfServerRows
;
499 SFString
*CSMClusterWindowBase::editSFConnectionType(void)
501 editSField(ConnectionTypeFieldMask
);
503 return &_sfConnectionType
;
506 const SFString
*CSMClusterWindowBase::getSFConnectionType(void) const
508 return &_sfConnectionType
;
512 SFString
*CSMClusterWindowBase::editSFClusterMode(void)
514 editSField(ClusterModeFieldMask
);
516 return &_sfClusterMode
;
519 const SFString
*CSMClusterWindowBase::getSFClusterMode(void) const
521 return &_sfClusterMode
;
525 //! Get the CSMClusterWindow::_sfComposer field.
526 const SFUnrecImageComposerPtr
*CSMClusterWindowBase::getSFComposer(void) const
531 SFUnrecImageComposerPtr
*CSMClusterWindowBase::editSFComposer (void)
533 editSField(ComposerFieldMask
);
538 //! Get the value of the CSMClusterWindow::_sfComposer field.
539 ImageComposer
* CSMClusterWindowBase::getComposer(void) const
541 return _sfComposer
.getValue();
544 //! Set the value of the CSMClusterWindow::_sfComposer field.
545 void CSMClusterWindowBase::setComposer(ImageComposer
* const value
)
547 editSField(ComposerFieldMask
);
549 _sfComposer
.setValue(value
);
553 //! Get the CSMClusterWindow::_sfOptions field.
554 const SFUnrecChildCSMClusterWinOptionsPtr
*CSMClusterWindowBase::getSFOptions(void) const
559 SFUnrecChildCSMClusterWinOptionsPtr
*CSMClusterWindowBase::editSFOptions (void)
561 editSField(OptionsFieldMask
);
566 //! Get the value of the CSMClusterWindow::_sfOptions field.
567 CSMClusterWinOptions
* CSMClusterWindowBase::getOptions(void) const
569 return _sfOptions
.getValue();
572 //! Set the value of the CSMClusterWindow::_sfOptions field.
573 void CSMClusterWindowBase::setOptions(CSMClusterWinOptions
* const value
)
575 editSField(OptionsFieldMask
);
577 _sfOptions
.setValue(value
);
585 /*------------------------------ access -----------------------------------*/
587 SizeT
CSMClusterWindowBase::getBinSize(ConstFieldMaskArg whichField
)
589 SizeT returnValue
= Inherited::getBinSize(whichField
);
591 if(FieldBits::NoField
!= (ClientWindowFieldMask
& whichField
))
593 returnValue
+= _sfClientWindow
.getBinSize();
595 if(FieldBits::NoField
!= (RenderClientFieldMask
& whichField
))
597 returnValue
+= _sfRenderClient
.getBinSize();
599 if(FieldBits::NoField
!= (ServersFieldMask
& whichField
))
601 returnValue
+= _mfServers
.getBinSize();
603 if(FieldBits::NoField
!= (ServerIdsFieldMask
& whichField
))
605 returnValue
+= _mfServerIds
.getBinSize();
607 if(FieldBits::NoField
!= (ServerRowsFieldMask
& whichField
))
609 returnValue
+= _sfServerRows
.getBinSize();
611 if(FieldBits::NoField
!= (ConnectionTypeFieldMask
& whichField
))
613 returnValue
+= _sfConnectionType
.getBinSize();
615 if(FieldBits::NoField
!= (ClusterModeFieldMask
& whichField
))
617 returnValue
+= _sfClusterMode
.getBinSize();
619 if(FieldBits::NoField
!= (ComposerFieldMask
& whichField
))
621 returnValue
+= _sfComposer
.getBinSize();
623 if(FieldBits::NoField
!= (OptionsFieldMask
& whichField
))
625 returnValue
+= _sfOptions
.getBinSize();
631 void CSMClusterWindowBase::copyToBin(BinaryDataHandler
&pMem
,
632 ConstFieldMaskArg whichField
)
634 Inherited::copyToBin(pMem
, whichField
);
636 if(FieldBits::NoField
!= (ClientWindowFieldMask
& whichField
))
638 _sfClientWindow
.copyToBin(pMem
);
640 if(FieldBits::NoField
!= (RenderClientFieldMask
& whichField
))
642 _sfRenderClient
.copyToBin(pMem
);
644 if(FieldBits::NoField
!= (ServersFieldMask
& whichField
))
646 _mfServers
.copyToBin(pMem
);
648 if(FieldBits::NoField
!= (ServerIdsFieldMask
& whichField
))
650 _mfServerIds
.copyToBin(pMem
);
652 if(FieldBits::NoField
!= (ServerRowsFieldMask
& whichField
))
654 _sfServerRows
.copyToBin(pMem
);
656 if(FieldBits::NoField
!= (ConnectionTypeFieldMask
& whichField
))
658 _sfConnectionType
.copyToBin(pMem
);
660 if(FieldBits::NoField
!= (ClusterModeFieldMask
& whichField
))
662 _sfClusterMode
.copyToBin(pMem
);
664 if(FieldBits::NoField
!= (ComposerFieldMask
& whichField
))
666 _sfComposer
.copyToBin(pMem
);
668 if(FieldBits::NoField
!= (OptionsFieldMask
& whichField
))
670 _sfOptions
.copyToBin(pMem
);
674 void CSMClusterWindowBase::copyFromBin(BinaryDataHandler
&pMem
,
675 ConstFieldMaskArg whichField
)
677 Inherited::copyFromBin(pMem
, whichField
);
679 if(FieldBits::NoField
!= (ClientWindowFieldMask
& whichField
))
681 editSField(ClientWindowFieldMask
);
682 _sfClientWindow
.copyFromBin(pMem
);
684 if(FieldBits::NoField
!= (RenderClientFieldMask
& whichField
))
686 editSField(RenderClientFieldMask
);
687 _sfRenderClient
.copyFromBin(pMem
);
689 if(FieldBits::NoField
!= (ServersFieldMask
& whichField
))
691 editMField(ServersFieldMask
, _mfServers
);
692 _mfServers
.copyFromBin(pMem
);
694 if(FieldBits::NoField
!= (ServerIdsFieldMask
& whichField
))
696 editMField(ServerIdsFieldMask
, _mfServerIds
);
697 _mfServerIds
.copyFromBin(pMem
);
699 if(FieldBits::NoField
!= (ServerRowsFieldMask
& whichField
))
701 editSField(ServerRowsFieldMask
);
702 _sfServerRows
.copyFromBin(pMem
);
704 if(FieldBits::NoField
!= (ConnectionTypeFieldMask
& whichField
))
706 editSField(ConnectionTypeFieldMask
);
707 _sfConnectionType
.copyFromBin(pMem
);
709 if(FieldBits::NoField
!= (ClusterModeFieldMask
& whichField
))
711 editSField(ClusterModeFieldMask
);
712 _sfClusterMode
.copyFromBin(pMem
);
714 if(FieldBits::NoField
!= (ComposerFieldMask
& whichField
))
716 editSField(ComposerFieldMask
);
717 _sfComposer
.copyFromBin(pMem
);
719 if(FieldBits::NoField
!= (OptionsFieldMask
& whichField
))
721 editSField(OptionsFieldMask
);
722 _sfOptions
.copyFromBin(pMem
);
726 //! create a new instance of the class
727 CSMClusterWindowTransitPtr
CSMClusterWindowBase::createLocal(BitVector bFlags
)
729 CSMClusterWindowTransitPtr fc
;
731 if(getClassType().getPrototype() != NULL
)
733 FieldContainerTransitPtr tmpPtr
=
734 getClassType().getPrototype()-> shallowCopyLocal(bFlags
);
736 fc
= dynamic_pointer_cast
<CSMClusterWindow
>(tmpPtr
);
742 //! create a new instance of the class, copy the container flags
743 CSMClusterWindowTransitPtr
CSMClusterWindowBase::createDependent(BitVector bFlags
)
745 CSMClusterWindowTransitPtr fc
;
747 if(getClassType().getPrototype() != NULL
)
749 FieldContainerTransitPtr tmpPtr
=
750 getClassType().getPrototype()-> shallowCopyDependent(bFlags
);
752 fc
= dynamic_pointer_cast
<CSMClusterWindow
>(tmpPtr
);
758 //! create a new instance of the class
759 CSMClusterWindowTransitPtr
CSMClusterWindowBase::create(void)
761 return createLocal();
764 CSMClusterWindow
*CSMClusterWindowBase::createEmptyLocal(BitVector bFlags
)
766 CSMClusterWindow
*returnValue
;
768 newPtr
<CSMClusterWindow
>(returnValue
, bFlags
);
770 returnValue
->_pFieldFlags
->_bNamespaceMask
&= ~bFlags
;
775 //! create an empty new instance of the class, do not copy the prototype
776 CSMClusterWindow
*CSMClusterWindowBase::createEmpty(void)
778 return createEmptyLocal();
782 FieldContainerTransitPtr
CSMClusterWindowBase::shallowCopyLocal(
783 BitVector bFlags
) const
785 CSMClusterWindow
*tmpPtr
;
787 newPtr(tmpPtr
, dynamic_cast<const CSMClusterWindow
*>(this), bFlags
);
789 FieldContainerTransitPtr
returnValue(tmpPtr
);
791 tmpPtr
->_pFieldFlags
->_bNamespaceMask
&= ~bFlags
;
796 FieldContainerTransitPtr
CSMClusterWindowBase::shallowCopyDependent(
797 BitVector bFlags
) const
799 CSMClusterWindow
*tmpPtr
;
801 newPtr(tmpPtr
, dynamic_cast<const CSMClusterWindow
*>(this), ~bFlags
);
803 FieldContainerTransitPtr
returnValue(tmpPtr
);
805 tmpPtr
->_pFieldFlags
->_bNamespaceMask
= bFlags
;
810 FieldContainerTransitPtr
CSMClusterWindowBase::shallowCopy(void) const
812 return shallowCopyLocal();
818 /*------------------------- constructors ----------------------------------*/
820 CSMClusterWindowBase::CSMClusterWindowBase(void) :
822 _sfClientWindow (this,
824 CSMWindow::ParentFieldId
),
825 _sfRenderClient (bool(true)),
829 _sfConnectionType (),
834 CSMClusterWinOptions::ParentFieldId
)
838 CSMClusterWindowBase::CSMClusterWindowBase(const CSMClusterWindowBase
&source
) :
840 _sfClientWindow (this,
842 CSMWindow::ParentFieldId
),
843 _sfRenderClient (source
._sfRenderClient
),
844 _mfServers (source
._mfServers
),
845 _mfServerIds (source
._mfServerIds
),
846 _sfServerRows (source
._sfServerRows
),
847 _sfConnectionType (source
._sfConnectionType
),
848 _sfClusterMode (source
._sfClusterMode
),
852 CSMClusterWinOptions::ParentFieldId
)
857 /*-------------------------- destructors ----------------------------------*/
859 CSMClusterWindowBase::~CSMClusterWindowBase(void)
863 /*-------------------------------------------------------------------------*/
866 bool CSMClusterWindowBase::unlinkChild(
867 FieldContainer
* const pChild
,
868 UInt16
const childFieldId
)
870 if(childFieldId
== ClientWindowFieldId
)
872 CSMWindow
* pTypedChild
=
873 dynamic_cast<CSMWindow
*>(pChild
);
875 if(pTypedChild
!= NULL
)
877 if(_sfClientWindow
.getValue() == pTypedChild
)
879 editSField(ClientWindowFieldMask
);
881 _sfClientWindow
.setValue(NULL
);
886 SWARNING
<< "Parent ([" << this
887 << "] id [" << this->getId()
888 << "] type [" << this->getType().getCName()
889 << "] childFieldId [" << childFieldId
890 << "]) - Child ([" << pChild
891 << "] id [" << pChild
->getId()
892 << "] type [" << pChild
->getType().getCName()
893 << "]): link inconsistent!"
902 if(childFieldId
== OptionsFieldId
)
904 CSMClusterWinOptions
* pTypedChild
=
905 dynamic_cast<CSMClusterWinOptions
*>(pChild
);
907 if(pTypedChild
!= NULL
)
909 if(_sfOptions
.getValue() == pTypedChild
)
911 editSField(OptionsFieldMask
);
913 _sfOptions
.setValue(NULL
);
918 SWARNING
<< "Parent ([" << this
919 << "] id [" << this->getId()
920 << "] type [" << this->getType().getCName()
921 << "] childFieldId [" << childFieldId
922 << "]) - Child ([" << pChild
923 << "] id [" << pChild
->getId()
924 << "] type [" << pChild
->getType().getCName()
925 << "]): link inconsistent!"
935 return Inherited::unlinkChild(pChild
, childFieldId
);
938 void CSMClusterWindowBase::onCreate(const CSMClusterWindow
*source
)
940 Inherited::onCreate(source
);
944 CSMClusterWindow
*pThis
= static_cast<CSMClusterWindow
*>(this);
946 pThis
->setClientWindow(source
->getClientWindow());
948 pThis
->setComposer(source
->getComposer());
950 pThis
->setOptions(source
->getOptions());
954 GetFieldHandlePtr
CSMClusterWindowBase::getHandleClientWindow (void) const
956 SFUnrecChildCSMWindowPtr::GetHandlePtr
returnValue(
957 new SFUnrecChildCSMWindowPtr::GetHandle(
959 this->getType().getFieldDesc(ClientWindowFieldId
),
960 const_cast<CSMClusterWindowBase
*>(this)));
965 EditFieldHandlePtr
CSMClusterWindowBase::editHandleClientWindow (void)
967 SFUnrecChildCSMWindowPtr::EditHandlePtr
returnValue(
968 new SFUnrecChildCSMWindowPtr::EditHandle(
970 this->getType().getFieldDesc(ClientWindowFieldId
),
973 returnValue
->setSetMethod(
974 boost::bind(&CSMClusterWindow::setClientWindow
,
975 static_cast<CSMClusterWindow
*>(this), _1
));
977 editSField(ClientWindowFieldMask
);
982 GetFieldHandlePtr
CSMClusterWindowBase::getHandleRenderClient (void) const
984 SFBool::GetHandlePtr
returnValue(
985 new SFBool::GetHandle(
987 this->getType().getFieldDesc(RenderClientFieldId
),
988 const_cast<CSMClusterWindowBase
*>(this)));
993 EditFieldHandlePtr
CSMClusterWindowBase::editHandleRenderClient (void)
995 SFBool::EditHandlePtr
returnValue(
996 new SFBool::EditHandle(
998 this->getType().getFieldDesc(RenderClientFieldId
),
1002 editSField(RenderClientFieldMask
);
1007 GetFieldHandlePtr
CSMClusterWindowBase::getHandleServers (void) const
1009 MFString::GetHandlePtr
returnValue(
1010 new MFString::GetHandle(
1012 this->getType().getFieldDesc(ServersFieldId
),
1013 const_cast<CSMClusterWindowBase
*>(this)));
1018 EditFieldHandlePtr
CSMClusterWindowBase::editHandleServers (void)
1020 MFString::EditHandlePtr
returnValue(
1021 new MFString::EditHandle(
1023 this->getType().getFieldDesc(ServersFieldId
),
1027 editMField(ServersFieldMask
, _mfServers
);
1032 GetFieldHandlePtr
CSMClusterWindowBase::getHandleServerIds (void) const
1034 MFUInt32::GetHandlePtr
returnValue(
1035 new MFUInt32::GetHandle(
1037 this->getType().getFieldDesc(ServerIdsFieldId
),
1038 const_cast<CSMClusterWindowBase
*>(this)));
1043 EditFieldHandlePtr
CSMClusterWindowBase::editHandleServerIds (void)
1045 MFUInt32::EditHandlePtr
returnValue(
1046 new MFUInt32::EditHandle(
1048 this->getType().getFieldDesc(ServerIdsFieldId
),
1052 editMField(ServerIdsFieldMask
, _mfServerIds
);
1057 GetFieldHandlePtr
CSMClusterWindowBase::getHandleServerRows (void) const
1059 SFUInt32::GetHandlePtr
returnValue(
1060 new SFUInt32::GetHandle(
1062 this->getType().getFieldDesc(ServerRowsFieldId
),
1063 const_cast<CSMClusterWindowBase
*>(this)));
1068 EditFieldHandlePtr
CSMClusterWindowBase::editHandleServerRows (void)
1070 SFUInt32::EditHandlePtr
returnValue(
1071 new SFUInt32::EditHandle(
1073 this->getType().getFieldDesc(ServerRowsFieldId
),
1077 editSField(ServerRowsFieldMask
);
1082 GetFieldHandlePtr
CSMClusterWindowBase::getHandleConnectionType (void) const
1084 SFString::GetHandlePtr
returnValue(
1085 new SFString::GetHandle(
1087 this->getType().getFieldDesc(ConnectionTypeFieldId
),
1088 const_cast<CSMClusterWindowBase
*>(this)));
1093 EditFieldHandlePtr
CSMClusterWindowBase::editHandleConnectionType (void)
1095 SFString::EditHandlePtr
returnValue(
1096 new SFString::EditHandle(
1098 this->getType().getFieldDesc(ConnectionTypeFieldId
),
1102 editSField(ConnectionTypeFieldMask
);
1107 GetFieldHandlePtr
CSMClusterWindowBase::getHandleClusterMode (void) const
1109 SFString::GetHandlePtr
returnValue(
1110 new SFString::GetHandle(
1112 this->getType().getFieldDesc(ClusterModeFieldId
),
1113 const_cast<CSMClusterWindowBase
*>(this)));
1118 EditFieldHandlePtr
CSMClusterWindowBase::editHandleClusterMode (void)
1120 SFString::EditHandlePtr
returnValue(
1121 new SFString::EditHandle(
1123 this->getType().getFieldDesc(ClusterModeFieldId
),
1127 editSField(ClusterModeFieldMask
);
1132 GetFieldHandlePtr
CSMClusterWindowBase::getHandleComposer (void) const
1134 SFUnrecImageComposerPtr::GetHandlePtr
returnValue(
1135 new SFUnrecImageComposerPtr::GetHandle(
1137 this->getType().getFieldDesc(ComposerFieldId
),
1138 const_cast<CSMClusterWindowBase
*>(this)));
1143 EditFieldHandlePtr
CSMClusterWindowBase::editHandleComposer (void)
1145 SFUnrecImageComposerPtr::EditHandlePtr
returnValue(
1146 new SFUnrecImageComposerPtr::EditHandle(
1148 this->getType().getFieldDesc(ComposerFieldId
),
1151 returnValue
->setSetMethod(
1152 boost::bind(&CSMClusterWindow::setComposer
,
1153 static_cast<CSMClusterWindow
*>(this), _1
));
1155 editSField(ComposerFieldMask
);
1160 GetFieldHandlePtr
CSMClusterWindowBase::getHandleOptions (void) const
1162 SFUnrecChildCSMClusterWinOptionsPtr::GetHandlePtr
returnValue(
1163 new SFUnrecChildCSMClusterWinOptionsPtr::GetHandle(
1165 this->getType().getFieldDesc(OptionsFieldId
),
1166 const_cast<CSMClusterWindowBase
*>(this)));
1171 EditFieldHandlePtr
CSMClusterWindowBase::editHandleOptions (void)
1173 SFUnrecChildCSMClusterWinOptionsPtr::EditHandlePtr
returnValue(
1174 new SFUnrecChildCSMClusterWinOptionsPtr::EditHandle(
1176 this->getType().getFieldDesc(OptionsFieldId
),
1179 returnValue
->setSetMethod(
1180 boost::bind(&CSMClusterWindow::setOptions
,
1181 static_cast<CSMClusterWindow
*>(this), _1
));
1183 editSField(OptionsFieldMask
);
1189 #ifdef OSG_MT_CPTR_ASPECT
1190 void CSMClusterWindowBase::execSyncV( FieldContainer
&oFrom
,
1191 ConstFieldMaskArg whichField
,
1192 AspectOffsetStore
&oOffsets
,
1193 ConstFieldMaskArg syncMode
,
1194 const UInt32 uiSyncInfo
)
1196 CSMClusterWindow
*pThis
= static_cast<CSMClusterWindow
*>(this);
1198 pThis
->execSync(static_cast<CSMClusterWindow
*>(&oFrom
),
1207 #ifdef OSG_MT_CPTR_ASPECT
1208 FieldContainer
*CSMClusterWindowBase::createAspectCopy(
1209 const FieldContainer
*pRefAspect
) const
1211 CSMClusterWindow
*returnValue
;
1213 newAspectCopy(returnValue
,
1214 dynamic_cast<const CSMClusterWindow
*>(pRefAspect
),
1215 dynamic_cast<const CSMClusterWindow
*>(this));
1221 void CSMClusterWindowBase::resolveLinks(void)
1223 Inherited::resolveLinks();
1225 static_cast<CSMClusterWindow
*>(this)->setClientWindow(NULL
);
1227 static_cast<CSMClusterWindow
*>(this)->setComposer(NULL
);
1229 static_cast<CSMClusterWindow
*>(this)->setOptions(NULL
);
1231 #ifdef OSG_MT_CPTR_ASPECT
1232 AspectOffsetStore oOffsets
;
1234 _pAspectStore
->fillOffsetArray(oOffsets
, this);
1237 #ifdef OSG_MT_CPTR_ASPECT
1238 _mfServers
.terminateShare(Thread::getCurrentAspect(),
1241 #ifdef OSG_MT_CPTR_ASPECT
1242 _mfServerIds
.terminateShare(Thread::getCurrentAspect(),