Logo ROOT   master
Reference Guide
ROOT::Experimental::RAttrMap Class Reference

Authors
Axel Naumann axel@.nosp@m.cern.nosp@m..ch Sergey Linev s.lin.nosp@m.ev@g.nosp@m.si.de
Date
2017-09-26
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 RAttrMap.hxx.

Classes

class  BoolValue_t
 
class  DoubleValue_t
 
class  IntValue_t
 
class  NoValue_t
 
class  StringValue_t
 
class  Value_t
 

Public Types

enum  EValuesKind {
  kNoValue, kBool, kInt, kDouble,
  kString
}
 

Public Member Functions

 RAttrMap ()=default
 JSON_asbase - store as map object. More...
 
 RAttrMap (const RAttrMap &src)
 
RAttrMapAdd (const std::string &name, std::unique_ptr< Value_t > &&value)
 
RAttrMapAddBool (const std::string &name, bool value)
 
RAttrMapAddDefaults (const RAttrBase &vis)
 Add defaults values form sub attribute. More...
 
RAttrMapAddDouble (const std::string &name, double value)
 
RAttrMapAddInt (const std::string &name, int value)
 
RAttrMapAddNoValue (const std::string &name)
 
RAttrMapAddString (const std::string &name, const std::string &value)
 
auto begin () const
 
void Clear (const std::string &name)
 
auto end () const
 
const Value_tFind (const std::string &name) const
 
RAttrMapoperator= (const RAttrMap &src)
 

Private Member Functions

void AddBestMatch (const std::string &name, const std::string &value)
 Add attribute, converting to best possible type Tested boolean, int, double. More...
 

Private Attributes

std::unordered_map< std::string, std::unique_ptr< Value_t > > m
 JSON_object. More...
 

Friends

class RAttrBase
 
class RStyle
 

#include <ROOT/RAttrMap.hxx>

Member Enumeration Documentation

◆ EValuesKind

Enumerator
kNoValue 
kBool 
kInt 
kDouble 
kString 

Definition at line 38 of file RAttrMap.hxx.

Constructor & Destructor Documentation

◆ RAttrMap() [1/2]

ROOT::Experimental::RAttrMap::RAttrMap ( )
default

JSON_asbase - store as map object.

◆ RAttrMap() [2/2]

ROOT::Experimental::RAttrMap::RAttrMap ( const RAttrMap src)
inline

Definition at line 147 of file RAttrMap.hxx.

Member Function Documentation

◆ Add()

RAttrMap& ROOT::Experimental::RAttrMap::Add ( const std::string &  name,
std::unique_ptr< Value_t > &&  value 
)
inline

Definition at line 139 of file RAttrMap.hxx.

◆ AddBestMatch()

void RAttrMap::AddBestMatch ( const std::string &  name,
const std::string &  value 
)
private

Add attribute, converting to best possible type Tested boolean, int, double.

If none works - store as a string

Definition at line 57 of file RAttrMap.cxx.

◆ AddBool()

RAttrMap& ROOT::Experimental::RAttrMap::AddBool ( const std::string &  name,
bool  value 
)
inline

Definition at line 141 of file RAttrMap.hxx.

◆ AddDefaults()

RAttrMap & RAttrMap::AddDefaults ( const RAttrBase vis)

Add defaults values form sub attribute.

Definition at line 43 of file RAttrMap.cxx.

◆ AddDouble()

RAttrMap& ROOT::Experimental::RAttrMap::AddDouble ( const std::string &  name,
double  value 
)
inline

Definition at line 143 of file RAttrMap.hxx.

◆ AddInt()

RAttrMap& ROOT::Experimental::RAttrMap::AddInt ( const std::string &  name,
int  value 
)
inline

Definition at line 142 of file RAttrMap.hxx.

◆ AddNoValue()

RAttrMap& ROOT::Experimental::RAttrMap::AddNoValue ( const std::string &  name)
inline

Definition at line 140 of file RAttrMap.hxx.

◆ AddString()

RAttrMap& ROOT::Experimental::RAttrMap::AddString ( const std::string &  name,
const std::string &  value 
)
inline

Definition at line 144 of file RAttrMap.hxx.

◆ begin()

auto ROOT::Experimental::RAttrMap::begin ( ) const
inline

Definition at line 174 of file RAttrMap.hxx.

◆ Clear()

void ROOT::Experimental::RAttrMap::Clear ( const std::string &  name)
inline

Definition at line 167 of file RAttrMap.hxx.

◆ end()

auto ROOT::Experimental::RAttrMap::end ( ) const
inline

Definition at line 175 of file RAttrMap.hxx.

◆ Find()

const Value_t* ROOT::Experimental::RAttrMap::Find ( const std::string &  name) const
inline

Definition at line 161 of file RAttrMap.hxx.

◆ operator=()

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

Definition at line 153 of file RAttrMap.hxx.

Friends And Related Function Documentation

◆ RAttrBase

friend class RAttrBase
friend

Definition at line 33 of file RAttrMap.hxx.

◆ RStyle

friend class RStyle
friend

Definition at line 34 of file RAttrMap.hxx.

Member Data Documentation

◆ m

std::unordered_map<std::string, std::unique_ptr<Value_t> > ROOT::Experimental::RAttrMap::m
private

JSON_object.

Definition at line 131 of file RAttrMap.hxx.


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