Main Page | Namespace List | Class Hierarchy | Compound List | File List | Namespace Members | Compound Members | File Members | Related Pages

RRefable.hh

Go to the documentation of this file.
00001 #ifndef NO_PTR_RREFABLE_H
00002 #define NO_PTR_RREFABLE_H
00003 
00023 #include "NoPtrFwd.hh"  // use
00024 #include "RRefUsage.hh" // use
00025 
00026 namespace NoPtr 
00027 {
00028     
00029 class RRefable
00030 {
00031     public:
00032         /* Public just to avoid more friends. This is how RRefable 
00033            allows RRef to get data that will allow RRef to know when 
00034            RRefable has been destroyed. 
00035            */
00036         void getRRefUsage(NoPtrImpl::RRefUsageForUser& rrefUsage) const
00037         {
00038             _rrefUsage.create();
00039             rrefUsage.shareFrom(_rrefUsage);
00040         }
00041         
00042     protected:
00043         RRefable() {}
00044        ~RRefable() { _rrefUsage.destroy(); }
00045        
00049         RRefable(const RRefable&) {}
00053         void operator=(const RRefable& rhs) {}
00054        
00055     private:
00057         mutable NoPtrImpl::RRefUsageForOwner _rrefUsage;
00058 };
00059 
00060 } // namespace
00061 
00114 #endif // NO_PTR_RREFABLE_H
00115 

Generated on Mon Aug 4 18:51:23 2003 for NoPtr C++ Library by doxygen 1.3.2