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

All supported axes attributes for: line, ticks, labels, title, min/max, log, reverse, ...

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

Definition at line 99 of file RAttrAxis.hxx.

Public Member Functions

 RAttrAxis ()=default
 
 RAttrAxis (const RAttrAxis &src)
 
 RAttrAxis (RAttrBase *parent, const char *prefix="axis")
 
 RAttrAxis (RDrawable *drawable, const char *prefix="axis")
 
void Clear () override
 Clear all respective values from drawable. Only defaults can be used.
 
RAttrAxis & ClearMinMax ()
 
void ClearTimeDisplay ()
 
RAttrAxis & ClearZoom ()
 
std::string GetTitle () const
 
bool IsLn () const
 
bool IsLog10 () const
 
bool IsLog2 () const
 
bool IsLogScale () const
 
RAttrAxis & operator= (const RAttrAxis &src)
 
RAttrAxis & SetMinMax (double _min, double _max)
 
RAttrAxis & SetTimeDisplay (const std::string &fmt="", double offset=-1)
 
RAttrAxis & SetTitle (const std::string &_title)
 
RAttrAxis & SetZoom (double _zoomMin, double _zoomMax)
 

Public Attributes

RAttrLineEnding ending {this, "ending"}
 ! ending attributes
 
RAttrAxisLabels labels {this, "labels"}
 ! labels attributes
 
RAttrLine line {this, "line"}
 ! line attributes
 
RAttrValue< double > log {this, "log", 0}
 ! log scale, <1 off, 1 - base10, 2 - base 2, 2.71 - exp, 3, 4, ...
 
RAttrValue< double > max {this, "max", 0.}
 ! axis max
 
RAttrValue< double > min {this, "min", 0.}
 ! axis min
 
RAttrValue< bool > reverse {this, "reverse", false}
 ! reverse scale
 
RAttrValue< double > symlog {this, "symlog", 0}
 ! symlog scale constant, 0 - off
 
RAttrAxisTicks ticks {this, "ticks"}
 ! ticks attributes
 
RAttrValue< bool > time {this, "time", false}
 ! time scale
 
RAttrValue< std::string > timeFormat {this, "timeFormat", ""}
 ! time format
 
RAttrValue< double > timeOffset {this, "timeOffset", 0}
 ! offset for time axis values
 
RAttrAxisTitle title {this, "title"}
 ! title attributes
 
RAttrValue< double > zoomMax {this, "zoomMax", 0.}
 ! axis zoom max
 
RAttrValue< double > zoomMin {this, "zoomMin", 0.}
 ! axis zoom min
 

Protected Member Functions

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.
 
RAttrMap CollectDefaults () const override
 Collect all attributes in derived class Works only if such class has dictionary.
 
void CopyTo (RAttrAggregation &tgt, bool use_style=true) const
 Copy attributes into target object.
 
bool CopyValue (const std::string &name, const RAttrMap::Value_t &value, bool check_type=true)
 Copy attributes from other object.
 
Rec_t EnsureAttr (const std::string &name)
 Ensure attribute with give name exists - creates container for attributes if required.
 
const RAttrMap & GetDefaults () const override
 Return default values for attributes, empty for base class.
 
RDrawable * GetDrawable () const
 
RAttrMap * GetOwnAttr () const
 
RAttrBase * GetParent () const
 
const char * GetPrefix () const
 
bool IsAggregation () const final
 
bool IsSame (const RAttrAggregation &src, bool use_style=true) const
 Check if all values which are evaluated in this object are exactly the same as in tgt object.
 
bool IsValueEqual (const std::string &name, const RAttrMap::Value_t &value, bool use_style=false) const
 Check if provided value equal to attribute in the map.
 
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
 

#include <ROOT/RAttrAxis.hxx>

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

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
privateinherited
Enumerator
kDrawable 
kParent 
kOwnAttr 

Definition at line 37 of file RAttrBase.hxx.

Constructor & Destructor Documentation

◆ RAttrAxis() [1/4]

ROOT::Experimental::RAttrAxis::RAttrAxis ( )
default

◆ RAttrAxis() [2/4]

ROOT::Experimental::RAttrAxis::RAttrAxis ( RDrawable * drawable,
const char * prefix = "axis" )
inline

Definition at line 101 of file RAttrAxis.hxx.

◆ RAttrAxis() [3/4]

ROOT::Experimental::RAttrAxis::RAttrAxis ( RAttrBase * parent,
const char * prefix = "axis" )
inline

Definition at line 101 of file RAttrAxis.hxx.

◆ RAttrAxis() [4/4]

ROOT::Experimental::RAttrAxis::RAttrAxis ( const RAttrAxis & src)
inline

Definition at line 101 of file RAttrAxis.hxx.

Member Function Documentation

◆ AccessAttr()

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

Find attributes container and full-qualified name for value.

Definition at line 70 of file RAttrBase.hxx.

◆ AccessValue()

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

Search value with given name in attributes.

Definition at line 95 of file RAttrBase.hxx.

◆ Clear()

void RAttrAggregation::Clear ( )
overridevirtualinherited

Clear all respective values from drawable. Only defaults can be used.

Implements ROOT::Experimental::RAttrBase.

Definition at line 118 of file RAttrAggregation.cxx.

◆ ClearData()

void RAttrBase::ClearData ( )
privateinherited

Clear internal data.

Definition at line 26 of file RAttrBase.cxx.

◆ ClearMinMax()

RAttrAxis & ROOT::Experimental::RAttrAxis::ClearMinMax ( )
inline

Definition at line 122 of file RAttrAxis.hxx.

◆ ClearTimeDisplay()

void ROOT::Experimental::RAttrAxis::ClearTimeDisplay ( )
inline

Definition at line 146 of file RAttrAxis.hxx.

◆ ClearValue()

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

Clear value if any with specified name.

Definition at line 54 of file RAttrBase.cxx.

◆ ClearZoom()

RAttrAxis & ROOT::Experimental::RAttrAxis::ClearZoom ( )
inline

Definition at line 125 of file RAttrAxis.hxx.

◆ CollectDefaults()

RAttrMap RAttrAggregation::CollectDefaults ( ) const
overrideprotectedvirtualinherited

Collect all attributes in derived class Works only if such class has dictionary.

In special cases one has to provide special implementation directly

Implements ROOT::Experimental::RAttrBase.

Definition at line 37 of file RAttrAggregation.cxx.

◆ CopyTo()

void RAttrAggregation::CopyTo ( RAttrAggregation & tgt,
bool use_style = true ) const
protectedinherited

Copy attributes into target object.

Definition at line 60 of file RAttrAggregation.cxx.

◆ CopyValue()

bool RAttrAggregation::CopyValue ( const std::string & name,
const RAttrMap::Value_t & value,
bool check_type = true )
protectedinherited

Copy attributes from other object.

Definition at line 71 of file RAttrAggregation.cxx.

◆ CreateOwnAttr()

RAttrMap * RAttrBase::CreateOwnAttr ( )
privateinherited

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)
inlineprotectedinherited

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

Definition at line 112 of file RAttrBase.hxx.

◆ GetDefaults()

const RAttrMap & ROOT::Experimental::RAttrAxis::GetDefaults ( ) const
inlineoverrideprotectedvirtual

Return default values for attributes, empty for base class.

Reimplemented from ROOT::Experimental::RAttrAggregation.

Definition at line 101 of file RAttrAxis.hxx.

◆ GetDrawable()

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

Definition at line 52 of file RAttrBase.hxx.

◆ GetOwnAttr()

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

Definition at line 54 of file RAttrBase.hxx.

◆ GetParent()

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

Definition at line 53 of file RAttrBase.hxx.

◆ GetPrefix()

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

Definition at line 153 of file RAttrBase.hxx.

◆ GetTitle()

std::string ROOT::Experimental::RAttrAxis::GetTitle ( ) const
inline

Definition at line 154 of file RAttrAxis.hxx.

◆ IsAggregation()

bool ROOT::Experimental::RAttrAggregation::IsAggregation ( ) const
inlinefinalprotectedvirtualinherited

Reimplemented from ROOT::Experimental::RAttrBase.

Definition at line 33 of file RAttrAggregation.hxx.

◆ IsLn()

bool ROOT::Experimental::RAttrAxis::IsLn ( ) const
inline

Definition at line 130 of file RAttrAxis.hxx.

◆ IsLog10()

bool ROOT::Experimental::RAttrAxis::IsLog10 ( ) const
inline

Definition at line 128 of file RAttrAxis.hxx.

◆ IsLog2()

bool ROOT::Experimental::RAttrAxis::IsLog2 ( ) const
inline

Definition at line 129 of file RAttrAxis.hxx.

◆ IsLogScale()

bool ROOT::Experimental::RAttrAxis::IsLogScale ( ) const
inline

Definition at line 127 of file RAttrAxis.hxx.

◆ IsSame()

bool RAttrAggregation::IsSame ( const RAttrAggregation & src,
bool use_style = true ) const
protectedinherited

Check if all values which are evaluated in this object are exactly the same as in tgt object.

Definition at line 103 of file RAttrAggregation.cxx.

◆ IsValueEqual()

bool RAttrAggregation::IsValueEqual ( const std::string & name,
const RAttrMap::Value_t & value,
bool use_style = false ) const
protectedinherited

Check if provided value equal to attribute in the map.

Definition at line 91 of file RAttrAggregation.cxx.

◆ MoveTo()

void RAttrBase::MoveTo ( RAttrBase & tgt)
protectedinherited

Move all fields into target object.

Definition at line 73 of file RAttrBase.cxx.

◆ operator=()

RAttrAxis & ROOT::Experimental::RAttrAxis::operator= ( const RAttrAxis & src)
inline

Definition at line 101 of file RAttrAxis.hxx.

◆ SetMinMax()

RAttrAxis & ROOT::Experimental::RAttrAxis::SetMinMax ( double _min,
double _max )
inline

Definition at line 121 of file RAttrAxis.hxx.

◆ SetNoValue()

void RAttrBase::SetNoValue ( const std::string & name)
protectedinherited

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.

◆ SetTimeDisplay()

RAttrAxis & ROOT::Experimental::RAttrAxis::SetTimeDisplay ( const std::string & fmt = "",
double offset = -1 )
inline

Definition at line 132 of file RAttrAxis.hxx.

◆ SetTitle()

RAttrAxis & ROOT::Experimental::RAttrAxis::SetTitle ( const std::string & _title)
inline

Definition at line 153 of file RAttrAxis.hxx.

◆ SetZoom()

RAttrAxis & ROOT::Experimental::RAttrAxis::SetZoom ( double _zoomMin,
double _zoomMax )
inline

Definition at line 124 of file RAttrAxis.hxx.

Member Data Documentation

◆ drawable

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

Definition at line 40 of file RAttrBase.hxx.

◆ ending

RAttrLineEnding ROOT::Experimental::RAttrAxis::ending {this, "ending"}

! ending attributes

Definition at line 106 of file RAttrAxis.hxx.

◆ fPrefix

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

! name prefix for all attributes values

Definition at line 45 of file RAttrBase.hxx.

◆ []

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

! kind of data

◆ labels

RAttrAxisLabels ROOT::Experimental::RAttrAxis::labels {this, "labels"}

! labels attributes

Definition at line 107 of file RAttrAxis.hxx.

◆ line

RAttrLine ROOT::Experimental::RAttrAxis::line {this, "line"}

! line attributes

Definition at line 105 of file RAttrAxis.hxx.

◆ log

RAttrValue<double> ROOT::Experimental::RAttrAxis::log {this, "log", 0}

! log scale, <1 off, 1 - base10, 2 - base 2, 2.71 - exp, 3, 4, ...

Definition at line 114 of file RAttrAxis.hxx.

◆ max

RAttrValue<double> ROOT::Experimental::RAttrAxis::max {this, "max", 0.}

! axis max

Definition at line 111 of file RAttrAxis.hxx.

◆ min

RAttrValue<double> ROOT::Experimental::RAttrAxis::min {this, "min", 0.}

! axis min

Definition at line 110 of file RAttrAxis.hxx.

◆ [union]

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

! data

◆ ownattr

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

Definition at line 42 of file RAttrBase.hxx.

◆ parent

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

Definition at line 41 of file RAttrBase.hxx.

◆ reverse

RAttrValue<bool> ROOT::Experimental::RAttrAxis::reverse {this, "reverse", false}

! reverse scale

Definition at line 116 of file RAttrAxis.hxx.

◆ symlog

RAttrValue<double> ROOT::Experimental::RAttrAxis::symlog {this, "symlog", 0}

! symlog scale constant, 0 - off

Definition at line 115 of file RAttrAxis.hxx.

◆ ticks

RAttrAxisTicks ROOT::Experimental::RAttrAxis::ticks {this, "ticks"}

! ticks attributes

Definition at line 109 of file RAttrAxis.hxx.

◆ time

RAttrValue<bool> ROOT::Experimental::RAttrAxis::time {this, "time", false}

! time scale

Definition at line 117 of file RAttrAxis.hxx.

◆ timeFormat

RAttrValue<std::string> ROOT::Experimental::RAttrAxis::timeFormat {this, "timeFormat", ""}

! time format

Definition at line 119 of file RAttrAxis.hxx.

◆ timeOffset

RAttrValue<double> ROOT::Experimental::RAttrAxis::timeOffset {this, "timeOffset", 0}

! offset for time axis values

Definition at line 118 of file RAttrAxis.hxx.

◆ title

RAttrAxisTitle ROOT::Experimental::RAttrAxis::title {this, "title"}

! title attributes

Definition at line 108 of file RAttrAxis.hxx.

◆ zoomMax

RAttrValue<double> ROOT::Experimental::RAttrAxis::zoomMax {this, "zoomMax", 0.}

! axis zoom max

Definition at line 113 of file RAttrAxis.hxx.

◆ zoomMin

RAttrValue<double> ROOT::Experimental::RAttrAxis::zoomMin {this, "zoomMin", 0.}

! axis zoom min

Definition at line 112 of file RAttrAxis.hxx.

Libraries for ROOT::Experimental::RAttrAxis:

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