Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
ROOT::Experimental::RAttrBase Class Referenceabstract

Base class for all attributes, used with RDrawable.

Author
Sergey Linev s.lin.nosp@m.ev@g.nosp@m.si.de
Date
2019-09-17
Warning
This is part of the ROOT 7 prototype! It will change without notice. It might trigger earthquakes. Feedback is welcome!

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.
 
RDrawableGetDrawable () const
 
RAttrMapGetOwnAttr () const
 
RAttrBaseGetParent () 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.
 
RAttrMapCreateOwnAttr ()
 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>

Inheritance diagram for ROOT::Experimental::RAttrBase:
[legend]

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
private
Enumerator
kDrawable 
kParent 
kOwnAttr 

Definition at line 35 of file RAttrBase.hxx.

Constructor & Destructor Documentation

◆ RAttrBase() [1/4]

ROOT::Experimental::RAttrBase::RAttrBase ( const char *  prefix)
inlineprotected

Definition at line 128 of file RAttrBase.hxx.

◆ RAttrBase() [2/4]

ROOT::Experimental::RAttrBase::RAttrBase ( RDrawable drawable,
const char *  prefix = nullptr 
)
inlineprotected

Definition at line 135 of file RAttrBase.hxx.

◆ RAttrBase() [3/4]

ROOT::Experimental::RAttrBase::RAttrBase ( RAttrBase parent,
const char *  prefix = nullptr 
)
inlineprotected

Definition at line 142 of file RAttrBase.hxx.

◆ RAttrBase() [4/4]

ROOT::Experimental::RAttrBase::RAttrBase ( )
default

◆ ~RAttrBase()

virtual ROOT::Experimental::RAttrBase::~RAttrBase ( )
inlinevirtual

Definition at line 160 of file RAttrBase.hxx.

Member Function Documentation

◆ AccessAttr()

const Rec_t ROOT::Experimental::RAttrBase::AccessAttr ( const std::string &  name) const
inlineprotected

Find attributes container and full-qualified name for value.

Definition at line 68 of file RAttrBase.hxx.

◆ AccessValue()

const Val_t ROOT::Experimental::RAttrBase::AccessValue ( const std::string &  name,
bool  use_style = true 
) const
inlineprotected

Search value with given name in attributes.

Definition at line 93 of file RAttrBase.hxx.

◆ Clear()

◆ ClearData()

void RAttrBase::ClearData ( )
private

Clear internal data.

Definition at line 26 of file RAttrBase.cxx.

◆ ClearValue()

void RAttrBase::ClearValue ( const std::string &  name)
protected

Clear value if any with specified name.

Definition at line 54 of file RAttrBase.cxx.

◆ CollectDefaults()

◆ CreateOwnAttr()

RAttrMap * RAttrBase::CreateOwnAttr ( )
private

Creates own attribute - only if no drawable and no parent are assigned.

Definition at line 37 of file RAttrBase.cxx.

◆ EnsureAttr()

Rec_t ROOT::Experimental::RAttrBase::EnsureAttr ( const std::string &  name)
inlineprotected

Ensure attribute with give name exists - creates container for attributes if required.

Definition at line 110 of file RAttrBase.hxx.

◆ GetDrawable()

RDrawable * ROOT::Experimental::RAttrBase::GetDrawable ( ) const
inlineprotected

Definition at line 50 of file RAttrBase.hxx.

◆ GetOwnAttr()

RAttrMap * ROOT::Experimental::RAttrBase::GetOwnAttr ( ) const
inlineprotected

Definition at line 52 of file RAttrBase.hxx.

◆ GetParent()

RAttrBase * ROOT::Experimental::RAttrBase::GetParent ( ) const
inlineprotected

Definition at line 51 of file RAttrBase.hxx.

◆ GetPrefix()

const char * ROOT::Experimental::RAttrBase::GetPrefix ( ) const
inlineprotected

Definition at line 151 of file RAttrBase.hxx.

◆ IsAggregation()

virtual bool ROOT::Experimental::RAttrBase::IsAggregation ( ) const
inlineprotectedvirtual

Reimplemented in ROOT::Experimental::RAttrAggregation.

Definition at line 56 of file RAttrBase.hxx.

◆ MoveTo()

void RAttrBase::MoveTo ( RAttrBase tgt)
protected

Move all fields into target object.

Definition at line 73 of file RAttrBase.cxx.

◆ SetNoValue()

void RAttrBase::SetNoValue ( const std::string &  name)
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.

Friends And Related Symbol Documentation

◆ RAttrMap

friend class RAttrMap
friend

Definition at line 33 of file RAttrBase.hxx.

Member Data Documentation

◆ drawable

RDrawable* ROOT::Experimental::RAttrBase::drawable

Definition at line 38 of file RAttrBase.hxx.

◆ fPrefix

const char* ROOT::Experimental::RAttrBase::fPrefix {nullptr}
private

! name prefix for all attributes values

Definition at line 43 of file RAttrBase.hxx.

◆ []

enum { ... } ROOT::Experimental::RAttrBase::kDrawable

! kind of data

◆ [union]

union { ... } ROOT::Experimental::RAttrBase::nullptr

! data

◆ ownattr

RAttrMap* ROOT::Experimental::RAttrBase::ownattr

Definition at line 40 of file RAttrBase.hxx.

◆ parent

RAttrBase* ROOT::Experimental::RAttrBase::parent

Definition at line 39 of file RAttrBase.hxx.

Libraries for ROOT::Experimental::RAttrBase:

The documentation for this class was generated from the following files: