![]() |
ROOT 6.18/05 Reference Guide |
A container of (stringified) attributes for which values have been provided.
Definition at line 240 of file RDrawingAttr.hxx.
Public Types | |
using | Map_t = std::unordered_map< std::string, std::string > |
using | Path_t = RDrawingAttrBase::Path |
Public Member Functions | |
RDrawingAttrHolder ()=default | |
RDrawingAttrHolder using only the default style. More... | |
RDrawingAttrHolder (const std::vector< std::string > &styleClasses) | |
RDrawingAttrHolder with an ordered collection of styles taking precedence before the default style. More... | |
std::string & | At (const Path_t &path) |
Get an attribute value as string, given its name path. More... | |
const std::string * | AtIf (const Path_t &path) const |
Get an attribute value as pointer to string, given its name path, or nullptr if the attribute does not exist. More... | |
void | CopyAttributesInPath (const Path_t &targetPath, const RDrawingAttrHolder &source, const Path_t &sourcePath) |
Copy attributes within otherPath into. More... | |
bool | Equal (const RDrawingAttrHolder &other, const Path_t &thisPath, const Path_t &otherPath) |
Equality compare the attributes within path to those of other within otherpath . More... | |
void | EraseAttributesInPath (const Path_t &path) |
Erase all custom set attributes for a given path (including sub-attributes). More... | |
std::string | GetAttrFromStyle (const Path_t &path) |
Get the (stringified) value of the named attribute from the Style. More... | |
std::vector< Map_t::const_iterator > | GetAttributesInPath (const Path_t &path) const |
Extract contained attributes for a given path (including sub-attributes); returns iterators to a subset of fAttrNameVals. More... | |
const std::vector< std::string > & | GetStyleClasses () const |
Get the attribute style classes of these options. More... | |
void | SetStyleClasses (const std::vector< std::string > &styles) |
Set the attribute style classes of these options. More... | |
Private Attributes | |
Map_t | fAttrNameVals |
Map attribute paths to their values. More... | |
std::vector< std::string > | fStyleClasses |
Attribute style classes of these options that will be "summed" in order, e.g. More... | |
#include <ROOT/RDrawingAttr.hxx>
using ROOT::Experimental::RDrawingAttrHolder::Map_t = std::unordered_map<std::string, std::string> |
Definition at line 243 of file RDrawingAttr.hxx.
Definition at line 242 of file RDrawingAttr.hxx.
|
default |
RDrawingAttrHolder using only the default style.
|
inline |
RDrawingAttrHolder with an ordered collection of styles taking precedence before the default style.
Definition at line 259 of file RDrawingAttr.hxx.
|
inline |
Get an attribute value as string, given its name path.
Definition at line 262 of file RDrawingAttr.hxx.
const std::string * ROOT::Experimental::RDrawingAttrHolder::AtIf | ( | const Path_t & | path | ) | const |
Get an attribute value as pointer to string, given its name path, or nullptr
if the attribute does not exist.
Definition at line 124 of file RDrawingAttr.cxx.
void ROOT::Experimental::RDrawingAttrHolder::CopyAttributesInPath | ( | const Path_t & | targetPath, |
const RDrawingAttrHolder & | source, | ||
const Path_t & | sourcePath | ||
) |
Copy attributes within otherPath into.
Definition at line 188 of file RDrawingAttr.cxx.
bool ROOT::Experimental::RDrawingAttrHolder::Equal | ( | const RDrawingAttrHolder & | other, |
const Path_t & | thisPath, | ||
const Path_t & | otherPath | ||
) |
Equality compare the attributes within path
to those of other
within otherpath
.
Takes all sub-attributes contained in the respective paths (i.e. those starting with that path) into account. They compare equal if their set of (sub-)attributes and their respective values are equal.
Definition at line 139 of file RDrawingAttr.cxx.
Erase all custom set attributes for a given path (including sub-attributes).
Definition at line 179 of file RDrawingAttr.cxx.
std::string ROOT::Experimental::RDrawingAttrHolder::GetAttrFromStyle | ( | const Path_t & | path | ) |
Get the (stringified) value of the named attribute from the Style.
Return the empty string if no such value exists - which means that the attribute name is unknown even for the (implicit) default style!
Definition at line 132 of file RDrawingAttr.cxx.
std::vector< ROOT::Experimental::RDrawingAttrHolder::Map_t::const_iterator > ROOT::Experimental::RDrawingAttrHolder::GetAttributesInPath | ( | const Path_t & | path | ) | const |
Extract contained attributes for a given path (including sub-attributes); returns iterators to a subset of fAttrNameVals.
Definition at line 164 of file RDrawingAttr.cxx.
|
inline |
Get the attribute style classes of these options.
Definition at line 289 of file RDrawingAttr.hxx.
|
inline |
Set the attribute style classes of these options.
Definition at line 292 of file RDrawingAttr.hxx.
|
private |
Map attribute paths to their values.
Definition at line 246 of file RDrawingAttr.hxx.
|
private |
Attribute style classes of these options that will be "summed" in order, e.g.
{"trigger", "efficiency"} will look attributes up in the RDrawingAttrHolderBase
base class, if not found using the "trigger" style class, and if not found in the "efficiency" style class. Implicitly and as final resort, the attributes from the "default" style class will be used.
Definition at line 252 of file RDrawingAttr.hxx.