45 #ifndef CLIPPER_MEMORY 46 #define CLIPPER_MEMORY 49 #include "clipper_thread.h" 69 explicit Property(
const T& val ) { val_ = val; }
72 const T&
value()
const {
return val_; }
103 bool set_property(
const std::string& label,
const Property_base& property);
106 const Property_base& get_property(
const std::string& label )
const;
107 bool exists_property(
const std::string& label)
const;
108 bool delete_property(
const std::string& label);
110 std::vector<std::pair<std::string,Property_base*> > property_;
160 void operator =(
const Reference& other );
161 bool is_null()
const {
return obj_ == NULL; }
162 const T& data()
const {
return obj_->second; }
164 std::pair<int,T>* obj_;
166 Reference( std::pair<int,T>* obj ) { obj_ = obj; obj_->first++; }
171 enum MODE { NORMAL, MINMEM, MAXMEM };
174 void set_mode(
const MODE& mode );
179 Reference cache(
const typename T::Key& key );
181 std::vector<std::pair<int,T>*> cache_;
const T & value() const
return value of contents
Definition: clipper_memory.h:72
Object Cache manager.
Definition: clipper_memory.h:150
ObjectCache reference class.
Definition: clipper_memory.h:154
Property(const T &val)
constructor: takes contents
Definition: clipper_memory.h:69
Template for a property holding an arbitrary type.
Definition: clipper_memory.h:65
Property_base * clone() const
factory copy method
Definition: clipper_memory.h:71
Base class for properties of arbitrary types.
Definition: clipper_memory.h:57
virtual Property_base * clone() const =0
factory copy method
Class for holding a list of labelled properties of arbitrary types.
Definition: clipper_memory.h:95
PropertyManager()
null constructor
Definition: clipper_memory.h:98