nullCM.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_NULLCM_H
00019 #define EQNET_NULLCM_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 namespace eq
00026 {
00027 namespace net
00028 {
00029     class Node;
00030 
00035     class NullCM : public ObjectCM
00036     {
00037     public:
00038         NullCM() {}
00039         virtual ~NullCM() {}
00040 
00041         virtual void makeThreadSafe() {}
00042 
00047         virtual uint32_t commitNB() { EQDONTCALL; return EQ_ID_INVALID; }
00048         virtual uint32_t commitSync( const uint32_t commitID )
00049             { EQDONTCALL; return Object::VERSION_NONE; }
00050 
00051         virtual void obsolete( const uint32_t version ) { EQDONTCALL; }
00052 
00053         virtual void setAutoObsolete( const uint32_t count,
00054                                       const uint32_t flags ) { EQDONTCALL; }
00055         virtual uint32_t getAutoObsoleteCount() const
00056             { EQDONTCALL; return 0; }
00057 
00058         virtual uint32_t sync( const uint32_t version )
00059             { EQDONTCALL; return Object::VERSION_NONE; }
00060 
00061         virtual uint32_t getHeadVersion() const { return Object::VERSION_NONE; }
00062         virtual uint32_t getVersion() const     { return Object::VERSION_NONE; }
00063         virtual uint32_t getOldestVersion() const {return Object::VERSION_NONE;}
00065 
00066         virtual bool isMaster() const { return false; }
00067         virtual uint32_t getMasterInstanceID() const
00068             { EQDONTCALL; return EQ_ID_INVALID; }
00069 
00070         virtual void addSlave( NodePtr slave, const uint32_t instanceID,
00071                                const uint32_t version ) { EQDONTCALL; }
00072         virtual void removeSlave( NodePtr node ) { EQDONTCALL; }
00073         virtual void addOldMaster( NodePtr node, const uint32_t instanceID )
00074             { EQDONTCALL }
00075 
00076         virtual void applyMapData() { EQDONTCALL; }
00077 
00078     private:
00079     };
00080 }
00081 }
00082 
00083 #endif // EQNET_NULLCM_H
Generated on Mon Aug 10 18:58:40 2009 for Equalizer 0.9 by  doxygen 1.5.8