// File: safe_ref_counted_guard.h // Author: Chris Gill // Purpose: header file for copy-safe (reference counted) guard smart pointer #ifndef SAFE_REF_COUNTED_GUARD_H #define SAFE_REF_COUNTED_GUARD_H #include "scope_detector.h" class SafeRefCountedGuard { public: SafeRefCountedGuard (); // default constructor SafeRefCountedGuard (const SafeRefCountedGuard &); // copy constructor ~SafeRefCountedGuard (); // destructor SafeRefCountedGuard & operator= (const SafeRefCountedGuard &); // assignment operator ScopeDetector & operator* (); // dereference operator ScopeDetector * operator-> (); // arrow operator ScopeDetector * ptr() const; // accessor void ptr(ScopeDetector *); // mutator private: ScopeDetector * ptr_; }; #endif /* SAFE_REF_COUNTED_GUARD_H */