8 #ifndef PSYLLID_PERSISTENT_STORE_HH_ 9 #define PSYLLID_PERSISTENT_STORE_HH_ 49 template<
typename x_type >
50 void store(
const std::string& a_label, std::shared_ptr< x_type > an_item );
52 template<
typename x_type >
53 std::shared_ptr< x_type >
retrieve(
const std::string& a_label );
55 void dump(
const std::string& a_label );
57 bool has(
const std::string& a_label )
const;
68 template<
typename x_type >
72 if( t_derived_storable ==
nullptr )
80 template<
typename x_type >
105 typedef std::map< std::string, std::unique_ptr< storable > >
storage_t;
113 template<
typename x_type >
128 template<
typename x_type >
141 std::shared_ptr< x_type > t_item = t_item_it->second->retrieve< x_type >();
std::shared_ptr< x_type > stored_ptr_t
virtual stored_ptr_t _retrieve() const
label_not_found(const std::string &a_label)
bool has(const std::string &a_label) const
virtual ~persistent_store()
void store(const std::string &a_label, std::shared_ptr< x_type > an_item)
std::shared_ptr< x_type > retrieve(const std::string &a_label)
std::map< std::string, std::unique_ptr< storable > > storage_t
storage_t::iterator storage_it_t
void dump(const std::string &a_label)
std::mutex f_storage_mutex
label_in_use(const std::string &a_label)
storage_t::const_iterator storage_cit_t
std::shared_ptr< x_type > retrieve() const
_storable(stored_ptr_t an_item)