15 #ifndef SERIALBOX_CORE_FRONTEND_STELLA_METAINFOSET_H 16 #define SERIALBOX_CORE_FRONTEND_STELLA_METAINFOSET_H 19 #include <boost/any.hpp> 20 #include <boost/shared_ptr.hpp> 21 #include <boost/type_traits.hpp> 42 explicit MetainfoSet(
const boost::shared_ptr<MetainfoMapImpl>& map);
64 std::vector<std::string>
keys()
const;
69 bool HasKey(
const std::string& key)
const;
78 void AddMetainfo(
const std::string& key,
const int& value);
79 void AddMetainfo(
const std::string& key,
const bool& value);
80 void AddMetainfo(
const std::string& key,
const float& value);
81 void AddMetainfo(
const std::string& key,
const double& value);
82 void AddMetainfo(
const std::string& key,
const std::string& value);
83 void AddMetainfo(
const std::string& key,
const char* value) {
94 const boost::any&
AsAny(
const std::string& key)
const;
105 bool AsBool(
const std::string& key)
const;
118 int AsInt(
const std::string& key)
const;
128 float AsFloat(
const std::string& key)
const;
138 double AsDouble(
const std::string& key)
const;
149 template <
typename RealType>
150 RealType
AsReal(
const std::string& key)
const {
152 (boost::is_same<RealType, float>::value || boost::is_same<RealType, double>::value));
154 if(boost::is_same<RealType, float>::value)
156 else if(boost::is_same<RealType, double>::value)
168 std::string
AsString(
const std::string& key)
const;
178 std::size_t
size()
const;
184 void setImpl(
const boost::shared_ptr<MetainfoMapImpl>& metaInfoMap);
187 boost::shared_ptr<MetainfoMapImpl>&
getImpl();
188 const boost::shared_ptr<MetainfoMapImpl>&
getImpl()
const;
191 boost::shared_ptr<MetainfoMapImpl> mapImpl_;
Namespace of the STELLA frontend.
Namespace of the serialbox library.