irods
4.2.8
About: iRODS (the integrated Rule Oriented Data System) is a distributed data-management system for creating data grids, digital libraries, persistent archives, and real-time data systems. Fossies Dox: irods-4.2.8.tar.gz ("unofficial" and yet experimental doxygen-generated source code documentation) 
|
Go to the documentation of this file. 1 #ifndef PLUGIN_TABLE_HPP
2 #define PLUGIN_TABLE_HPP
6 #include <boost/any.hpp>
21 template <
typename ValueType,
22 typename KeyType = std::string,
23 typename HashType = irods_string_hash >
31 typedef typename irods_hash_map::iterator
iterator;
71 error get(
const std::string& _key, ValueType& _val ) {
83 error set(
const std::string& _key,
const ValueType& _val ) {
95 template<
typename KeyType,
typename HashType >
102 typedef typename irods_hash_map::iterator
iterator;
115 return table_.erase( _k );
136 template<
typename T >
140 if ( _key.empty() ) {
145 std::stringstream msg;
146 msg <<
"failed to find key [";
148 msg <<
"] in table.";
156 _val = boost::any_cast< T >(
table_[ _key ] );
159 catch (
const boost::bad_any_cast& ) {
160 std::stringstream msg;
161 msg <<
"type and property key [";
175 template<
typename T >
176 error set(
const std::string& _key,
const T& _val ) {
179 if ( _key.empty() ) {
197 #endif // PLUGIN_TABLE_HPP
error get(const std::string &_key, T &_val)
boost::any & operator[](KeyType _k)
irods_hash_map::iterator iterator
error get(const std::string &_key, ValueType &_val)
iterator find(KeyType _k)
ValueType & operator[](KeyType _k)
lookup_table< boost::any > plugin_property_map
boost::unordered_map< KeyType, ValueType, HashType > irods_hash_map
iterator find(KeyType _k)
irods_hash_map::iterator iterator
bool has_entry(KeyType _k) const
error set(const std::string &_key, const T &_val)
boost::unordered_map< KeyType, boost::any, HashType > irods_hash_map
#define ERROR(code_, message_)
error set(const std::string &_key, const ValueType &_val)
bool has_entry(KeyType _k)
irods_hash_map::const_iterator const_iterator