14template<>
bool ROOT::Experimental::RAttrMap::Value_t::Get<bool>()
const {
return GetBool(); }
15template<>
int ROOT::Experimental::RAttrMap::Value_t::Get<int>()
const {
return GetInt(); }
16template<>
double ROOT::Experimental::RAttrMap::Value_t::Get<double>()
const {
return GetDouble(); }
17template<> std::string ROOT::Experimental::RAttrMap::Value_t::Get<std::string>()
const {
return GetString(); }
19template<>
bool ROOT::Experimental::RAttrMap::Value_t::GetValue<bool,void>(
const Value_t *rec) {
return rec ? rec->
GetBool() :
false; }
20template<>
int ROOT::Experimental::RAttrMap::Value_t::GetValue<int,void>(
const Value_t *rec) {
return rec ? rec->
GetInt() : 0; }
21template<>
double ROOT::Experimental::RAttrMap::Value_t::GetValue<double,void>(
const Value_t *rec) {
return rec ? rec->GetDouble() : 0.; }
22template<> std::string ROOT::Experimental::RAttrMap::Value_t::GetValue<std::string,void>(
const Value_t *rec) {
return rec ? rec->GetString() :
""; }
31using namespace std::string_literals;
38 m[prefix+entry.first] = entry.second->Copy();
Base class for all attributes, used with RDrawable.
const std::string & GetPrefix() const
virtual const RAttrMap & GetDefaults() const
Return default values for attributes, empty for base class.
virtual bool GetBool() const
virtual EValuesKind Kind() const =0
virtual int GetInt() const
RAttrMap & AddDefaults(const RAttrBase &vis)
std::unordered_map< std::string, std::unique_ptr< Value_t > > m
JSON_object.