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_; }
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 };
179 Reference
cache(
const typename T::Key& key );
181 std::vector<std::pair<int,T>*> cache_;