util/ReferenceCounterBase.h

Go to the documentation of this file.
00001 /*------------------------------------------------------------------------------
00002 Name:      ReferenceCounterBase.h
00003 Project:   xmlBlaster.org
00004 Copyright: xmlBlaster.org, see xmlBlaster-LICENSE file
00005 Comment:   Helper class to be used as a base for classes to be reference counted
00006 Version:   $Id: ReferenceCounterBase.h 12937 2004-11-24 20:15:11Z ruff $
00007 ------------------------------------------------------------------------------*/
00008 
00009 #ifndef _UTIL_REFERENCECOUNTERBASE_H
00010 #define _UTIL_REFERENCECOUNTERBASE_H
00011 
00012 #include <util/XmlBCfg.h>
00013 
00014 // 
00015 
00016 namespace org { namespace xmlBlaster { namespace util {
00017 
00025 class Dll_Export ReferenceCounterBase 
00026 {
00027 private:
00028    mutable int  refCount_;
00029 //   bool shareable_;
00030 
00031 public:
00032    ReferenceCounterBase();
00033    ReferenceCounterBase(const ReferenceCounterBase& ref);
00034    ReferenceCounterBase& operator =(const ReferenceCounterBase& ref);
00035    virtual  ~ReferenceCounterBase();
00036    void addReference() const;
00037    void removeReference();
00038 //   void markUnshareable();
00039 //   bool isShareable() const;
00040 //   bool isShared() const;
00041 };
00042 
00043 
00044 }}} // namespace
00045 
00046 #endif