1 #ifndef __XIOS_REGISTRY_HPP__
2 #define __XIOS_REGISTRY_HPP__
10 #include <boost/utility/enable_if.hpp>
11 #include <boost/type_traits.hpp>
35 template<
typename T>
typename boost::enable_if_c<!boost::is_convertible<T&, CBaseType&>::value>
::type
43 template<
typename T>
typename boost::enable_if_c<!boost::is_convertible<T&, CBaseType&>::value>
::type
48 bool foundKey(
const std::string& key)
const ;
57 void toFile(
const string& filename) ;
60 void fromFile(
const string& filename) ;
88 size_t size(
void)
const ;
119 std::map<std::string,std::pair<size_t,char*> >
registry ;
bool toBuffer(CBufferOut &buffer) const
void gatherRegistry(void)
boost::enable_if_c<!boost::is_convertible< T &, CBaseType & >::value >::type getKey(const std::string &key, T &value)
void setPath(const string &str)
void getKey(const std::string &key, CBaseType &value)
void fromFile(const string &filename)
string toString(void) const
CRegistry * clone(void) const
void setKey(const std::string &key, const CBaseType &value)
void mergeRegistry(const CRegistry &inRegistry)
void getKey_(const std::string &key, CBaseType &value)
CBufferOut & operator<<(CBufferOut &buffer, const CArray< T_numtype, N_rank > &array)
void toFile(const string &filename)
std::map< std::string, std::pair< size_t, char * > > registry
This class is a registry database which store key with an associated value.
void setKey_(const std::string &key, const CBaseType &value)
CMessage & push(const CBaseType &type)
CRegistry(const MPI_Comm &comm=MPI_COMM_WORLD)
void fromString(const string &str)
bool foundKey(const std::string &key) const
bool fromBuffer(CBufferIn &buffer)
void hierarchicalGatherRegistry(void)
boost::enable_if_c<!boost::is_convertible< T &, CBaseType & >::value >::type setKey(const std::string &key, const T &value)