00001
00002 #ifndef header_slot_generic
00003 #define header_slot_generic
00004
00005 class CL_Slot_Generic
00006 {
00007
00008 public:
00009 CL_Slot_Generic() : ref_count(0) { return; }
00010
00011 virtual ~CL_Slot_Generic() { return; }
00012
00013
00014 public:
00015 int get_ref() const { return ref_count; }
00016
00017
00018 public:
00019 void add_ref() { ref_count++; }
00020
00021 void release_ref() { ref_count--; if (ref_count == 0) delete this; }
00022
00023
00024 private:
00025 int ref_count;
00026 };
00027
00028 #endif