void RemoteAspect::receiveChanged(Connection &con, FieldContainerFactoryBase *fcFactory) { UInt32 remoteId = 0; UInt32 localId = 0; BitVector fieldMask = 0; UInt32 len = 0; FieldContainer *fcPtr = NULL; con.getValue(remoteId); con.getValue(fieldMask); con.getValue(len); if(getLocalId(remoteId, localId)) { fcPtr = fcFactory->getContainer(localId); #ifndef OSG_REMOTE_ASPECT_SILENT SLOG << "Receive CHANGED: id (r/l) '" << remoteId << "/" << localId << "' mask '0x" << std::hex << fieldMask << std::dec << "' len '" << len << "' type name '" << (fcPtr != NULL ? fcPtr->getType().getName() : "") << "'\n"; #endif if(fcPtr == NULL) { clearFCMapping(localId, remoteId); char dummy; while(len--) con.get(&dummy, 1); } else { fcPtr->copyFromBin(con, fieldMask); callChanged(fcPtr); } } else { char dummy; SWARNING << "Can not do CHANGED for unknown FC remote id " << remoteId << " skip " << len << " bytes." << std::endl; while(len--) con.get(&dummy, 1); } }
void RemoteAspect::receiveSubRefed(Connection &con, FieldContainerFactoryBase *fcFactory, ChangeList *pChangeList) { UInt32 remoteId = 0; UInt32 localId = 0; FieldContainer *fcPtr = NULL; con.getValue(remoteId); if(getLocalId(remoteId, localId)) { fcPtr = fcFactory->getContainer(localId); #ifndef OSG_REMOTE_ASPECT_SILENT SLOG << "Receive SUBREFED: remote id '" << remoteId << "' local id '" << localId << "' type name '" << (fcPtr != NULL ? fcPtr->getType().getName() : "") << "'\n"; #endif if(fcPtr == NULL) { clearFCMapping(localId, remoteId); } else { pChangeList->addDelayedSubRef<RecordedRefCountPolicy>(fcPtr); } } else { SWARNING << "Can not do SUBREFED for unknown FC remote id " << remoteId << std::endl; } }