staticMasterCM.cpp
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #include "staticMasterCM.h"
00019
00020 #include "command.h"
00021 #include "commands.h"
00022 #include "log.h"
00023 #include "node.h"
00024 #include "object.h"
00025 #include "packets.h"
00026 #include "objectInstanceDataOStream.h"
00027
00028 using namespace eq::base;
00029 using namespace std;
00030
00031 namespace eq
00032 {
00033 namespace net
00034 {
00035 StaticMasterCM::StaticMasterCM( Object* object )
00036 : _object( object )
00037 {}
00038
00039 StaticMasterCM::~StaticMasterCM()
00040 {}
00041
00042 void StaticMasterCM::addSlave( NodePtr node, const uint32_t instanceID,
00043 const uint32_t version )
00044 {
00045 EQASSERT( version == Object::VERSION_OLDEST );
00046 ObjectInstanceDataOStream os( _object );
00047 os.setInstanceID( instanceID );
00048
00049 os.enable( node );
00050 _object->getInstanceData( os );
00051 os.disable();
00052 }
00053 }
00054 }