1 /*---------------------------------------------------------------------------*\
5 * Copyright (C) 2000-2002 by the OpenSG Forum *
9 * contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de *
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 \*---------------------------------------------------------------------------*/
42 #include "OSGConfig.h"
43 #include "OSGClusterException.h"
44 #include "OSGFieldDescriptionBase.h"
45 #include "OSGRemoteAspect.h"
47 #include "OSGWindow.h"
48 #include "OSGMaterial.h"
49 #include "OSGConnection.h"
50 #include "OSGStatCollector.h"
54 #define OSG_REMOTE_ASPECT_SILENT 1
58 /** \class OSG::RemoteAspect
59 * \ingroup GrpSystemCluster
60 * \brief Remote aspect controll class
62 * The RemoteAspecet is used to synchronize changes of FieldContainers
63 * with remote hosts. All changes stored in the current change list
64 * are send to a Connection.
66 * It is possible to send changes in both directions.
70 RemoteAspect::FieldFilter
RemoteAspect::_fieldFilter
;
72 StatElemDesc
<StatTimeElem
> RemoteAspect::statSyncTime
73 ("remoteSyncTime", "time for scenegraph distribution");
75 /*-------------------------------------------------------------------------*/
76 /* constructor destructor */
81 RemoteAspect::RemoteAspect(UInt32 aspectId
) :
104 RemoteAspect::~RemoteAspect(void)
106 FieldContainerFactoryBase
*pFactory
= FieldContainerFactory::the();
109 FieldContainer
*fcPtr
= NULL
;
111 // subRef received field container
112 for(i
= _receivedFC
.begin(); i
!= _receivedFC
.end(); i
++)
114 fcPtr
= pFactory
->getContainer(*i
);
118 callDestroyed(fcPtr
);
120 fcPtr
->resolveLinks();
124 // subRef received field container
125 for(i
= _receivedFC
.begin(); i
!= _receivedFC
.end(); i
++)
127 fcPtr
= pFactory
->getContainer(*i
);
133 fcPtr
->subReferenceUnresolved();
134 fcPtr
= pFactory
->getContainer(*i
);
136 } while(fcPtr
!= NULL
);
141 /*-------------------------------------------------------------------------*/
142 /* Remote aspect functionaliy */
144 /*! \e receiveSync reads changes from the given connection and
145 * applies them to the current thread aspect.
146 * Functors for registered types are called, if they occur in the
149 * \see registerCreated registerChanged registerDeleted
152 void RemoteAspect::receiveSync(Connection
&connection
, bool applyToChangelist
)
156 FieldContainerFactoryBase
*fcFactory
= FieldContainerFactory::the();
157 FieldContainerVector newContainers
;
158 RemoteAspectFieldContainerMapper mapper
;
159 ChangeList
*pChangeList
=
160 Thread::getCurrentChangeList();
164 _statistics
->getElem(statSyncTime
)->start();
167 connection
.selectChannel();
168 connection
.getValue(_remoteAspectId
);
170 // register mapper into factory
171 mapper
._remoteAspect
= this;
173 fcFactory
->setMapper(&mapper
);
177 connection
.getValue(cmd
);
185 #ifndef OSG_REMOTE_ASPECT_SILENT
186 SLOG
<< "Receive SYNCENDED\n";
193 receiveNewType(connection
, fcFactory
);
199 receiveCreated(connection
, fcFactory
, newContainers
);
205 receiveChanged(connection
, fcFactory
);
211 receiveAddRefed(connection
, fcFactory
, pChangeList
);
217 receiveSubRefed(connection
, fcFactory
, pChangeList
);
223 receiveIdMapping(connection
);
229 SFATAL
<< "Unknown tag:" << Int32(cmd
) << std::endl
;
230 throw RemoteSyncError();
236 #ifndef OSG_REMOTE_ASPECT_SILENT
240 pChangeList
->commitDelayedSubRefs();
243 FieldContainerVector::const_iterator fcIt
= newContainers
.begin();
244 FieldContainerVector::const_iterator fcEnd
= newContainers
.end ();
246 for(; fcIt
!= fcEnd
; ++fcIt
)
248 if((*fcIt
)->getRefCount() <= 1)
250 SWARNING
<< "New container type '" << (*fcIt
)->getType().getName()
251 << "' local id '" << (*fcIt
)->getId()
253 << static_cast<UInt32
>(_remoteFC
[(*fcIt
)->getId()])
254 << "' dies because of missing ref counts."
260 if(applyToChangelist
)
262 Thread::getCurrentChangeList()->commitChanges(ChangedOrigin::Sync
);
266 Thread::getCurrentChangeList()->commitChangesAndClear(ChangedOrigin::Sync
);
269 // unregister mapper into factory
270 fcFactory
->setMapper(NULL
);
274 _statistics
->getElem(statSyncTime
)->stop();
278 /*! All changes from changeList are send to the connecteion except
279 * the fields which are filtered. Filters are used to avoid transmission
280 * of local states. e.g. GL variables.
283 void RemoteAspect::sendSync(Connection
&connection
, ChangeList
*changeList
)
285 FieldContainerFactoryBase
*fcFactory
= FieldContainerFactory::the();
289 _statistics
->getElem(statSyncTime
)->start();
294 changeList
= OSG::Thread::getCurrentChangeList();
298 connection
.putValue(_aspectId
);
300 sendIdMapping(connection
);
302 ChangeList::ChangedStoreConstIt changedIt
= changeList
->beginCreated();
303 ChangeList::ChangedStoreConstIt changedEnd
= changeList
->endCreated ();
305 for(; changedIt
!= changedEnd
; ++changedIt
)
307 UInt32 localId
= (*changedIt
)->uiContainerId
;
308 FieldContainer
*fcPtr
= fcFactory
->getContainer(localId
);
310 // fcPtr might be locally destroyed already or
311 // cluster local, no need to transmit it
312 if((fcPtr
== NULL
) ||
313 (0x0000 == (fcPtr
->getFieldFlags()->_bNamespaceMask
&
314 FCLocal::Cluster
)) )
319 if((*changedIt
)->uiEntryDesc
== ContainerChangeEntry::Create
)
321 sendCreated(connection
, fcPtr
);
325 changedIt
= changeList
->begin();
326 changedEnd
= changeList
->end ();
328 for(; changedIt
!= changedEnd
; ++changedIt
)
330 UInt32 localId
= (*changedIt
)->uiContainerId
;
331 FieldContainer
*fcPtr
= fcFactory
->getContainer(localId
);
333 // fcPtr might be cluster local, no need to transmit it.
334 // but we need to transmit subrefs for locally destroyed container
335 // so this test is different from the one above!
336 if((fcPtr
!= NULL
) &&
337 (0x0000 == (fcPtr
->getFieldFlags()->_bNamespaceMask
&
338 FCLocal::Cluster
)) )
343 if((*changedIt
)->uiEntryDesc
== ContainerChangeEntry::AddReference
)
345 sendAddRefed(connection
, fcPtr
, localId
);
347 else if((*changedIt
)->uiEntryDesc
== ContainerChangeEntry::SubReference
)
349 sendSubRefed(connection
, fcPtr
, localId
);
351 else if((*changedIt
)->uiEntryDesc
== ContainerChangeEntry::Change
&&
354 sendChanged(connection
, fcPtr
, (*changedIt
)->whichField
);
358 UInt8 cmd
= SYNCENDED
;
359 connection
.putValue(cmd
);
361 #ifndef OSG_REMOTE_ASPECT_SILENT
362 SLOG
<< "Send SYNCENDED" << std::endl
;
370 _statistics
->getElem(statSyncTime
)->stop();
374 /*! The given functor is called when a create of the specified type
380 void RemoteAspect::registerCreated(const FieldContainerType
&type
,
383 while(type
.getId() >= _createdFunctors
.size())
385 _createdFunctors
.push_back(&_defaultCreatedFunction
);
388 _createdFunctors
[type
.getId()] = func
;
391 /*! The given functor is called when a destroy of the specified type
397 void RemoteAspect::registerDestroyed(const FieldContainerType
&type
,
400 while(type
.getId() >= _destroyedFunctors
.size())
402 _destroyedFunctors
.push_back(&_defaultDestroyedFunction
);
405 _destroyedFunctors
[type
.getId()] = func
;
408 /*! The given functor is called when a change of the specified type
414 void RemoteAspect::registerChanged(const FieldContainerType
&type
,
417 while(type
.getId() >= _changedFunctors
.size())
419 _changedFunctors
.push_back(&_defaultChangedFunction
);
422 _changedFunctors
[type
.getId()] = func
;
425 /*! add a new field filter. The given fieldmaks will not be transfered
428 /*-------------------------------------------------------------------------*/
431 /*! add a new field filter. The given fieldmaks will not be transfered
433 void RemoteAspect::addFieldFilter(UInt32 typeId
, BitVector mask
)
435 _fieldFilter
[typeId
] |= mask
;
438 /*! remove the filter for the given type and mask
440 void RemoteAspect::subFieldFilter(UInt32 typeId
, BitVector mask
)
442 _fieldFilter
[typeId
] &= ~mask
;
445 /*! Set statistics collector
448 void RemoteAspect::setStatistics(StatCollector
*statistics
)
450 OSG::setRefd(_statistics
, statistics
);
453 /*-------------------------------------------------------------------------*/
454 /* protected helpers */
456 /*! Call created functor for a given FieldContainer
458 * \see registerCreated
461 bool RemoteAspect::callCreated(FieldContainer
* const fcp
)
464 UInt32 uiFunctorIndex
= fcp
->getType().getId();
466 if(uiFunctorIndex
< _createdFunctors
.size())
468 result
= _createdFunctors
[uiFunctorIndex
](fcp
, this);
472 result
= _defaultCreatedFunction(fcp
, this);
478 /*! Call destroyed functor for a given FieldContainer
480 * \see registerDestroyed
483 bool RemoteAspect::callDestroyed(FieldContainer
* const fcp
)
486 UInt32 uiFunctorIndex
= fcp
->getType().getId();
488 if(uiFunctorIndex
< _destroyedFunctors
.size())
490 result
= _destroyedFunctors
[uiFunctorIndex
](fcp
, this);
494 result
= _defaultDestroyedFunction(fcp
, this);
500 /*! Call changed functor for a given FieldContainer
502 * \see registerChanged
505 bool RemoteAspect::callChanged(FieldContainer
* const fcp
)
508 UInt32 uiFunctorIndex
= fcp
->getType().getId();
510 if(uiFunctorIndex
< _changedFunctors
.size())
512 result
= _changedFunctors
[uiFunctorIndex
](fcp
, this);
516 result
= _defaultChangedFunction(fcp
, this);
522 /*-------------------------------------------------------------------------*/
523 /* Receive Helper Functions */
525 void RemoteAspect::receiveNewType(Connection
&con
,
526 FieldContainerFactoryBase
*fcFactory
)
528 UInt32 remoteTypeId
= 0;
529 UInt32 localTypeId
= 0;
530 std::string typeName
;
532 con
.getValue(remoteTypeId
);
533 con
.getValue(typeName
);
535 FieldContainerType
*fcType
= fcFactory
->findType(typeName
.c_str());
539 localTypeId
= fcType
->getId();
541 _localType
[remoteTypeId
] = localTypeId
;
545 SWARNING
<< "Unrecognized remote type '" << typeName
546 << "' remote type id '" << remoteTypeId
547 << "'." << std::endl
;
550 #ifndef OSG_REMOTE_ASPECT_SILENT
551 SLOG
<< "Receive NEWTYPE: type name '" << typeName
552 << "' type id (r/l) '" << remoteTypeId
553 << "/" << localTypeId
<< "'\n";
557 void RemoteAspect::receiveCreated(Connection
&con
,
558 FieldContainerFactoryBase
*fcFactory
,
559 FieldContainerVector
&newContainers
)
561 UInt32 remoteTypeId
= 0;
562 UInt32 localTypeId
= 0;
565 con
.getValue(remoteTypeId
);
566 con
.getValue(remoteId
);
568 LocalTypeMapT::const_iterator localTypeIt
= _localType
.find(remoteTypeId
);
569 FieldContainerType
*fcType
= NULL
;
570 FieldContainerUnrecPtr fcPtr
= NULL
;
572 if(localTypeIt
!= _localType
.end())
574 UInt64 fullRemoteId
= getFullRemoteId(remoteId
);
576 if(_localFC
.find(fullRemoteId
) == _localFC
.end())
578 localTypeId
= localTypeIt
->second
;
579 fcType
= fcFactory
->findType(localTypeId
);
580 fcPtr
= fcType
->createContainer();
582 // remove this node, when aspect is removed
583 _receivedFC
.insert(fcPtr
->getId());
585 // local <-> remote mapping
586 _localFC
[fullRemoteId
] = fcPtr
->getId();
587 _remoteFC
[fcPtr
->getId()] = fullRemoteId
;
591 newContainers
.push_back(fcPtr
);
593 #ifndef OSG_REMOTE_ASPECT_SILENT
594 SLOG
<< "Receive CREATED: type (r/l) '" << remoteTypeId
595 << "/" << localTypeId
596 << "' id (r/l) '" << remoteId
<< "/"
597 << (fcPtr
!= NULL
? fcPtr
->getId() : 0)
599 << (fcType
!= NULL
? fcType
->getName() : "")
605 SWARNING
<< "Already created a local container ("
606 << _localFC
[fullRemoteId
] << ") for "
607 << "remote container id '" << remoteId
613 SWARNING
<< "Unknown (remote) type id '" << remoteTypeId
614 << "' for (remote) container id '" << remoteId
619 void RemoteAspect::receiveChanged(Connection
&con
,
620 FieldContainerFactoryBase
*fcFactory
)
624 BitVector fieldMask
= 0;
626 FieldContainer
*fcPtr
= NULL
;
628 con
.getValue(remoteId
);
629 con
.getValue(fieldMask
);
632 if(getLocalId(remoteId
, localId
))
634 fcPtr
= fcFactory
->getContainer(localId
);
636 #ifndef OSG_REMOTE_ASPECT_SILENT
637 SLOG
<< "Receive CHANGED: id (r/l) '" << remoteId
640 << std::hex
<< fieldMask
<< std::dec
643 << (fcPtr
!= NULL
? fcPtr
->getType().getName() : "")
649 clearFCMapping(localId
, remoteId
);
658 fcPtr
->copyFromBin(con
, fieldMask
);
667 SWARNING
<< "Can not do CHANGED for unknown FC remote id "
679 void RemoteAspect::receiveAddRefed(Connection
&con
,
680 FieldContainerFactoryBase
*fcFactory
,
681 ChangeList
*pChangeList
)
685 FieldContainer
*fcPtr
= NULL
;
687 con
.getValue(remoteId
);
689 if(getLocalId(remoteId
, localId
))
691 fcPtr
= fcFactory
->getContainer(localId
);
693 #ifndef OSG_REMOTE_ASPECT_SILENT
694 SLOG
<< "Receive ADDREFED: id (r/l) '" << remoteId
695 << "/" << localId
<< "' type name '"
696 << (fcPtr
!= NULL
? fcPtr
->getType().getName() : "")
702 clearFCMapping(localId
, remoteId
);
706 RecordedRefCountPolicy::addRef(fcPtr
);
711 SWARNING
<< "Can not do ADDREFED for unknown FC remote id "
712 << remoteId
<< std::endl
;
716 void RemoteAspect::receiveSubRefed(Connection
&con
,
717 FieldContainerFactoryBase
*fcFactory
,
718 ChangeList
*pChangeList
)
722 FieldContainer
*fcPtr
= NULL
;
724 con
.getValue(remoteId
);
726 if(getLocalId(remoteId
, localId
))
728 fcPtr
= fcFactory
->getContainer(localId
);
730 #ifndef OSG_REMOTE_ASPECT_SILENT
731 SLOG
<< "Receive SUBREFED: id (r/l) '" << remoteId
732 << "/" << localId
<< "' type name '"
733 << (fcPtr
!= NULL
? fcPtr
->getType().getName() : "")
739 clearFCMapping(localId
, remoteId
);
743 pChangeList
->addDelayedSubRef
<RecordedRefCountPolicy
>(fcPtr
);
748 SWARNING
<< "Can not do SUBREFED for unknown FC remote id "
749 << remoteId
<< std::endl
;
753 void RemoteAspect::receiveIdMapping(Connection
&con
)
757 UInt32 localAspect
= 0;
759 con
.getValue(remoteId
);
760 con
.getValue(localAspect
);
761 con
.getValue(localId
);
763 #ifndef OSG_REMOTE_ASPECT_SILENT
764 SLOG
<< "Receive IDMAPPING: id (r/l) '" << remoteId
766 << "' local aspect '" << localAspect
770 if(localAspect
!= _aspectId
)
772 SFATAL
<< "ID mapping for wrong aspect" << std::endl
;
775 // local <-> remote mapping
776 UInt64 fullRemoteId
= getFullRemoteId(remoteId
);
777 _localFC
[fullRemoteId
] = localId
;
780 /*-------------------------------------------------------------------------*/
781 /* Send Helper Functions */
783 void RemoteAspect::sendCreated(Connection
&con
,
784 FieldContainer
*fcPtr
)
787 UInt32 localTypeId
= fcPtr
->getTypeId();
788 UInt32 localId
= fcPtr
->getId();
790 if(_mappedType
.count(localTypeId
) == 0)
792 _mappedType
.insert(localTypeId
);
794 const std::string
&typeName
= fcPtr
->getType().getName();
796 #ifndef OSG_REMOTE_ASPECT_SILENT
797 SLOG
<< "Send NEWTYPE: type name '" << typeName
798 << "' type id '" << localTypeId
804 con
.putValue(localTypeId
);
805 con
.putValue(typeName
);
808 #ifndef OSG_REMOTE_ASPECT_SILENT
809 SLOG
<< "Send CREATED: type name '" << fcPtr
->getType().getName()
810 << "' type id '" << localTypeId
811 << "' id '" << localId
817 con
.putValue(localTypeId
);
818 con
.putValue(localId
);
820 // sent container to create
821 _sentFC
.insert(localId
);
823 // fc is known by remote
824 _mappedFC
.insert(localId
);
827 void RemoteAspect::sendChanged(Connection
&con
,
828 FieldContainer
*fcPtr
,
829 BitVector changedMask
)
831 UInt32 localId
= fcPtr
->getId();
833 if(_mappedFC
.count(localId
) == 0)
835 #ifndef OSG_REMOTE_ASPECT_SILENT
836 SLOG
<< "Container id '" << localId
837 << "' type '" << fcPtr
->getType().getName()
838 << "' is not transmitted, dropping 'CHANGED'"
844 BitVector fieldMask
=
845 changedMask
& fcPtr
->getFieldFlags()->_bClusterLocalFlags
;
847 // apply field filter
848 FieldFilter::const_iterator filterI
=
849 _fieldFilter
.find(fcPtr
->getType().getId());
851 if(filterI
!= _fieldFilter
.end())
853 fieldMask
&= TypeTraits
<BitVector
>::BitsSet
^ filterI
->second
;
859 UInt32 len
= UInt32(fcPtr
->getBinSize(fieldMask
));
861 #ifndef OSG_REMOTE_ASPECT_SILENT
862 SLOG
<< "Send CHANGED: type name '" << fcPtr
->getType().getName()
863 << "' type id '" << fcPtr
->getType().getId()
864 << "' id '" << localId
865 << "' mask '0x" << std::hex
<< fieldMask
<< std::dec
871 con
.putValue(localId
); // id
872 con
.putValue(fieldMask
); // mask
875 fcPtr
->copyToBin(con
, fieldMask
);
879 void RemoteAspect::sendAddRefed(Connection
&con
,
880 FieldContainer
*fcPtr
,
883 if(_mappedFC
.count(localId
) == 0)
885 #ifndef OSG_REMOTE_ASPECT_SILENT
886 SLOG
<< "Container type '"
887 << (fcPtr
!= NULL
? fcPtr
->getType().getName() : "")
888 << "' id '" << localId
889 << "' is not transmitted, dropping 'ADDREF'"
895 #ifndef OSG_REMOTE_ASPECT_SILENT
896 SLOG
<< "Send ADDREFD: type name '"
897 << (fcPtr
!= NULL
? fcPtr
->getType().getName() : "")
898 << "' id '" << localId
<< "'\n";
901 UInt8 cmd
= ADDREFED
;
903 con
.putValue(localId
);
906 void RemoteAspect::sendSubRefed(Connection
&con
,
907 FieldContainer
*fcPtr
,
910 if(_mappedFC
.count(localId
) == 0)
912 #ifndef OSG_REMOTE_ASPECT_SILENT
913 SLOG
<< "Container type '"
914 << (fcPtr
!= NULL
? fcPtr
->getType().getName() : "")
915 << "' id '" << localId
916 << "' is not transmitted, dropping 'SUBREF'"
922 #ifndef OSG_REMOTE_ASPECT_SILENT
923 SLOG
<< "Send SUBREFD: type name '"
924 << (fcPtr
!= NULL
? fcPtr
->getType().getName() : "")
925 << "' id '" << localId
<< "'\n";
928 UInt8 cmd
= SUBREFED
;
930 con
.putValue(localId
);
933 /*! This is called if a fc was edited that was created by another
936 void RemoteAspect::sendIdMapping(Connection
&con
)
938 UInt8 cmd
= IDMAPPING
;
941 RemoteFCMapT::const_iterator remoteFCIt
= _remoteFC
.begin();
942 RemoteFCMapT::const_iterator remoteFCEnd
= _remoteFC
.end ();
944 for(; remoteFCIt
!= remoteFCEnd
; ++remoteFCIt
)
946 remoteId
= UInt32(remoteFCIt
->second
);
947 remoteAspect
= UInt32(remoteFCIt
->second
>> 32);
949 #ifndef OSG_REMOTE_ASPECT_SILENT
950 SLOG
<< "Send IDMAPPING: localId '" << remoteFCIt
->first
951 << "' remoteAspect '" << remoteAspect
952 << "' remoteId '" << remoteId
957 con
.putValue(remoteFCIt
->first
);
958 con
.putValue(remoteAspect
);
959 con
.putValue(remoteId
);
961 _mappedFC
.insert(remoteFCIt
->first
);
967 /*-------------------------------------------------------------------------*/
968 /* Helper Functions */
970 /*! clear maps from local id
973 void RemoteAspect::clearFCMapping(UInt32 localId
,UInt32 remoteId
)
975 _mappedFC
.erase(localId
);
976 _sentFC
.erase(localId
);
978 _receivedFC
.erase(localId
);
982 RemoteFCMapT::iterator remoteFCI
=_remoteFC
.find(localId
);
984 if(remoteFCI
!= _remoteFC
.end())
985 remoteId
=static_cast<UInt32
>(remoteFCI
->second
);
988 RemoteFCMapT::iterator remoteFCI
=_remoteFC
.find(localId
);
990 if(remoteFCI
!= _remoteFC
.end())
991 _remoteFC
.erase(remoteFCI
);
993 LocalFCMapT::iterator localFCI
=_localFC
.find(remoteId
);
995 if(localFCI
!= _localFC
.end())
996 _localFC
.erase(localFCI
);
999 /*! get local id mapped from remote id
1002 bool RemoteAspect::getLocalId(UInt32 remoteId
,
1005 UInt64 fullRemoteId
= getFullRemoteId(remoteId
);
1006 LocalFCMapT::iterator localFCI
= _localFC
.find(fullRemoteId
);
1008 if( localFCI
!= _localFC
.end() )
1010 localId
=localFCI
->second
;
1019 UInt64
RemoteAspect::getFullRemoteId(UInt32 fcId
)
1021 UInt64 remoteId
=_remoteAspectId
;
1029 /*-------------------------------------------------------------------------*\
1031 \*-------------------------------------------------------------------------*/
1034 /* fcp is used only if the FDEBUG macro is not removed by the
1035 proprocessor. Switch off error for unused fcp parameter. */
1036 #pragma set woff 3201
1039 /*! Default create functor
1042 bool RemoteAspect::_defaultCreatedFunction(FieldContainer
* const fcp
,
1045 FDEBUG(("Created:%s %d\n",
1046 fcp
->getType().getCName(),
1052 /*! Default destroyed functor
1055 bool RemoteAspect::_defaultDestroyedFunction(FieldContainer
* const fcp
,
1058 FDEBUG(("Destroyed:%s %d\n",
1059 fcp
->getType().getCName(),
1065 /*! Default changed functor
1068 bool RemoteAspect::_defaultChangedFunction(FieldContainer
* const fcp
,
1071 FDEBUG(("Changed:%s %d\n",
1072 fcp
->getType().getCName(),
1079 #pragma reset woff 3201
1082 /*! Field container id mapper. This mapper maps remote field
1083 * container id to local ids.
1086 UInt32
RemoteAspectFieldContainerMapper::map(UInt32 uiId
) const
1089 RemoteAspect::LocalFCMapT::const_iterator i
;
1091 i
= _remoteAspect
->_localFC
.find(_remoteAspect
->getFullRemoteId(uiId
));
1093 if(i
== _remoteAspect
->_localFC
.end())
1095 SWARNING
<< "Can't find container id:" << uiId
<< std::endl
;
1100 mappedId
= i
->second
;
1103 FDEBUG(("Map: %d to %d\n", uiId
, mappedId
))