9#ifndef ROOT7_RAttrValue
10#define ROOT7_RAttrValue
15namespace Experimental {
28 template <typename Q, bool = std::is_enum<Q>::value>
32 return (Q) RAttrMap::Value_t::GetValue<int>(value);
39 return RAttrMap::Value_t::GetValue<Q>(value);
73 access.attr->AddValue(access.fullname,
v);
90 auto res = RAttrMap::Value_t::GetValue<const RAttrMap::Value_t *,T>(
v.value);
101 operator T()
const {
return Get(); }
Base class for all attributes, used with RDrawable.
void ClearValue(const std::string &name)
Clear value if any with specified name.
const Val_t AccessValue(const std::string &name, bool use_style=true) const
Search value with given name in attributes.
const char * GetPrefix() const
Rec_t EnsureAttr(const std::string &name)
Ensure attribute with give name exists - creates container for attributes if required.
RAttrMap & AddValue(const std::string &name, bool value)
Template class to access single value from drawable or other attributes.
friend bool operator!=(const RAttrValue &lhs, const RAttrValue &rhs)
friend bool operator==(const RAttrValue &lhs, const RAttrValue &rhs)
RAttrValue(const T &dflt)
RAttrValue(RAttrBase *parent, const char *name, const T &dflt=T())
friend bool operator!=(const RAttrValue &lhs, const T &rhs)
RAttrValue(RDrawable *drawable, const char *name, const T &dflt=T())
friend bool operator==(const RAttrValue &lhs, const T &rhs)
RAttrMap CollectDefaults() const override
const char * GetName() const
RAttrValue & operator=(const RAttrValue &v)
RAttrValue & operator=(const T &v)
T fDefault
! default value
RAttrValue(const RAttrValue &src)
Base class for drawable entities: objects that can be painted on a RPad.
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...