staticMasterCM.cpp

00001 
00002 /* Copyright (c) 2007-2009, Stefan Eilemann <eile@equalizergraphics.com> 
00003  *
00004  * This library is free software; you can redistribute it and/or modify it under
00005  * the terms of the GNU Lesser General Public License version 2.1 as published
00006  * by the Free Software Foundation.
00007  *  
00008  * This library is distributed in the hope that it will be useful, but WITHOUT
00009  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
00010  * FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more
00011  * details.
00012  * 
00013  * You should have received a copy of the GNU Lesser General Public License
00014  * along with this library; if not, write to the Free Software Foundation, Inc.,
00015  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
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 ); // VERSION_NONE is useless
00046     ObjectInstanceDataOStream os( _object );
00047     os.setInstanceID( instanceID );
00048 
00049     os.enable( node );
00050     _object->getInstanceData( os );
00051     os.disable();
00052 }
00053 }
00054 }
Generated on Mon Aug 10 18:58:41 2009 for Equalizer 0.9 by  doxygen 1.5.8