staticMasterCM.h

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 #ifndef EQNET_STATICMASTERCM_H
00019 #define EQNET_STATICMASTERCM_H
00020 
00021 #include <eq/net/objectCM.h> // base class
00022 #include <eq/net/object.h>   // nested enum (Object::Version)
00023 #include <eq/base/idPool.h>  // for EQ_ID_INVALID
00024 
00025 #include <deque>
00026 
00027 namespace eq
00028 {
00029 namespace net
00030 {
00031     class Node;
00032 
00037     class StaticMasterCM : public ObjectCM
00038     {
00039     public:
00040         StaticMasterCM( Object* object );
00041         virtual ~StaticMasterCM();
00042 
00043         virtual void makeThreadSafe(){}
00044 
00049         virtual uint32_t commitNB() { EQDONTCALL; return EQ_ID_INVALID; }
00050         virtual uint32_t commitSync( const uint32_t commitID )
00051             { EQDONTCALL; return Object::VERSION_NONE; }
00052 
00053         virtual void obsolete( const uint32_t version ) { EQDONTCALL; }
00054 
00055         virtual void setAutoObsolete( const uint32_t count, 
00056                                       const uint32_t flags ) { EQDONTCALL; }
00057         
00058         virtual uint32_t getAutoObsoleteCount() const
00059             { EQDONTCALL; return 0; }
00060 
00061         virtual uint32_t sync( const uint32_t version )
00062             { EQDONTCALL; return Object::VERSION_NONE; }
00063 
00064         virtual uint32_t getHeadVersion() const { return Object::VERSION_NONE; }
00065         virtual uint32_t getVersion() const     { return Object::VERSION_NONE; }
00066         virtual uint32_t getOldestVersion() const {return Object::VERSION_NONE;}
00068 
00069         virtual bool isMaster() const { return true; }
00070         virtual uint32_t getMasterInstanceID() const
00071             { EQDONTCALL; return EQ_ID_INVALID; }
00072         virtual void addSlave( NodePtr node, const uint32_t instanceID,
00073                                const uint32_t version );
00074         virtual void removeSlave( NodePtr node ) {}
00075         virtual void addOldMaster( NodePtr node, const uint32_t instanceID )
00076             { EQDONTCALL }
00077 
00078         virtual void applyMapData() { EQDONTCALL; }
00079 
00080     private:
00082         Object* _object;
00083     };
00084 }
00085 }
00086 
00087 #endif // EQNET_STATICMASTERCM_H
Generated on Mon Aug 10 18:58:41 2009 for Equalizer 0.9 by  doxygen 1.5.8