1 /*------------------------------------------------------------------------------
 2 Name:      ReferenceCounterBase.h
 3 Project:   xmlBlaster.org
 4 Copyright: xmlBlaster.org, see xmlBlaster-LICENSE file
 5 Comment:   Helper class to be used as a base for classes to be reference counted
 6 Version:   $Id: ReferenceCounterBase.h 12937 2004-11-24 20:15:11Z ruff $
 7 ------------------------------------------------------------------------------*/
 8 
 9 #ifndef _UTIL_REFERENCECOUNTERBASE_H
10 #define _UTIL_REFERENCECOUNTERBASE_H
11 
12 #include <util/XmlBCfg.h>
13 
14 // 
15 
16 namespace org { namespace xmlBlaster { namespace util {
17 
18 /**
19  * Reference counter class to be used as a base class for such classes which you need to
20  * have a reference counter on. It works together with ReferenceHolder.
21  *
22  * @author <a href="mailto:laghi@swissinfo.org">Michele Laghi</a>
23  */
24 
25 class Dll_Export ReferenceCounterBase 
26 {
27 private:
28    mutable int  refCount_;
29 //   bool shareable_;
30 
31 public:
32    ReferenceCounterBase();
33    ReferenceCounterBase(const ReferenceCounterBase& ref);
34    ReferenceCounterBase& operator =(const ReferenceCounterBase& ref);
35    virtual  ~ReferenceCounterBase();
36    void addReference() const;
37    void removeReference();
38 //   void markUnshareable();
39 //   bool isShareable() const;
40 //   bool isShared() const;
41 };
42 
43 
44 }}} // namespace
45 
46 #endif


syntax highlighted by Code2HTML, v. 0.9.1