Base class for all attributes, used with RDrawable.
Definition at line 31 of file RAttrBase.hxx.
Classes | |
struct | Rec_t |
struct | Val_t |
Public Member Functions | |
RAttrBase ()=default | |
virtual | ~RAttrBase () |
virtual void | Clear ()=0 |
Protected Member Functions | |
RAttrBase (const char *prefix) | |
RAttrBase (RAttrBase *parent, const char *prefix=nullptr) | |
RAttrBase (RDrawable *drawable, const char *prefix=nullptr) | |
const Rec_t | AccessAttr (const std::string &name) const |
Find attributes container and full-qualified name for value. | |
const Val_t | AccessValue (const std::string &name, bool use_style=true) const |
Search value with given name in attributes. | |
void | ClearValue (const std::string &name) |
Clear value if any with specified name. | |
virtual RAttrMap | CollectDefaults () const =0 |
Rec_t | EnsureAttr (const std::string &name) |
Ensure attribute with give name exists - creates container for attributes if required. | |
RDrawable * | GetDrawable () const |
RAttrMap * | GetOwnAttr () const |
RAttrBase * | GetParent () const |
const char * | GetPrefix () const |
virtual bool | IsAggregation () const |
void | MoveTo (RAttrBase &tgt) |
Move all fields into target object. | |
void | SetNoValue (const std::string &name) |
Set <NoValue> for attribute. | |
Private Types | |
enum | { kDrawable , kParent , kOwnAttr } |
Private Member Functions | |
void | ClearData () |
Clear internal data. | |
RAttrMap * | CreateOwnAttr () |
Creates own attribute - only if no drawable and no parent are assigned. | |
Private Attributes | ||
const char * | fPrefix {nullptr} | |
! name prefix for all attributes values | ||
enum ROOT::Experimental::RAttrBase:: { ... } | kDrawable | |
! kind of data | ||
union { | ||
RDrawable * drawable | ||
RAttrMap * ownattr | ||
RAttrBase * parent | ||
} | nullptr | |
! data | ||
Friends | |
class | RAttrMap |
#include <ROOT/RAttrBase.hxx>
|
private |
Enumerator | |
---|---|
kDrawable | |
kParent | |
kOwnAttr |
Definition at line 35 of file RAttrBase.hxx.
|
inlineprotected |
Definition at line 128 of file RAttrBase.hxx.
|
inlineprotected |
Definition at line 135 of file RAttrBase.hxx.
|
inlineprotected |
Definition at line 142 of file RAttrBase.hxx.
|
default |
|
inlinevirtual |
Definition at line 160 of file RAttrBase.hxx.
|
inlineprotected |
Find attributes container and full-qualified name for value.
Definition at line 68 of file RAttrBase.hxx.
|
inlineprotected |
Search value with given name in attributes.
Definition at line 93 of file RAttrBase.hxx.
|
pure virtual |
Implemented in ROOT::Experimental::RAttrAggregation, ROOT::Experimental::RAttrValue< T >, ROOT::Experimental::RAttrValue< bool >, ROOT::Experimental::RAttrValue< double >, ROOT::Experimental::RAttrValue< EAlign >, ROOT::Experimental::RAttrValue< ECorner >, ROOT::Experimental::RAttrValue< EStyle >, ROOT::Experimental::RAttrValue< int >, ROOT::Experimental::RAttrValue< ROOT::Experimental::RColor >, and ROOT::Experimental::RAttrValue< ROOT::Experimental::RPadLength >.
|
private |
Clear internal data.
Definition at line 26 of file RAttrBase.cxx.
|
protected |
Clear value if any with specified name.
Definition at line 54 of file RAttrBase.cxx.
|
protectedpure virtual |
Implemented in ROOT::Experimental::RAttrAggregation, ROOT::Experimental::RAttrValue< T >, ROOT::Experimental::RAttrValue< bool >, ROOT::Experimental::RAttrValue< double >, ROOT::Experimental::RAttrValue< EAlign >, ROOT::Experimental::RAttrValue< ECorner >, ROOT::Experimental::RAttrValue< EStyle >, ROOT::Experimental::RAttrValue< int >, ROOT::Experimental::RAttrValue< ROOT::Experimental::RColor >, and ROOT::Experimental::RAttrValue< ROOT::Experimental::RPadLength >.
|
private |
Creates own attribute - only if no drawable and no parent are assigned.
Definition at line 37 of file RAttrBase.cxx.
|
inlineprotected |
Ensure attribute with give name exists - creates container for attributes if required.
Definition at line 110 of file RAttrBase.hxx.
|
inlineprotected |
Definition at line 50 of file RAttrBase.hxx.
|
inlineprotected |
Definition at line 52 of file RAttrBase.hxx.
|
inlineprotected |
Definition at line 51 of file RAttrBase.hxx.
|
inlineprotected |
Definition at line 151 of file RAttrBase.hxx.
|
inlineprotectedvirtual |
Reimplemented in ROOT::Experimental::RAttrAggregation.
Definition at line 56 of file RAttrBase.hxx.
Move all fields into target object.
Definition at line 73 of file RAttrBase.cxx.
|
protected |
Set <NoValue> for attribute.
Ensure that value can not be configured via style - defaults will be used Equivalent to css syntax { attrname:; }
Definition at line 64 of file RAttrBase.cxx.
|
friend |
Definition at line 33 of file RAttrBase.hxx.
RDrawable* ROOT::Experimental::RAttrBase::drawable |
Definition at line 38 of file RAttrBase.hxx.
|
private |
! name prefix for all attributes values
Definition at line 43 of file RAttrBase.hxx.
enum { ... } ROOT::Experimental::RAttrBase::kDrawable |
! kind of data
union { ... } ROOT::Experimental::RAttrBase::nullptr |
! data
RAttrMap* ROOT::Experimental::RAttrBase::ownattr |
Definition at line 40 of file RAttrBase.hxx.
RAttrBase* ROOT::Experimental::RAttrBase::parent |
Definition at line 39 of file RAttrBase.hxx.