Jpp 19.3.0-rc.1
the software that should make you happy
Loading...
Searching...
No Matches
JROOT::JROOTClassSelector Struct Reference

Auxiliary class to select ROOT class based on class name. More...

#include <JROOTClassSelector.hh>

Inheritance diagram for JROOT::JROOTClassSelector:
JLANG::JEquals< JFirst_t, JSecond_t >

Public Member Functions

 JROOTClassSelector ()
 Default contructor.
 
 JROOTClassSelector (const char *const type_name)
 Contructor.
 
 JROOTClassSelector (const std::string &type_name)
 Contructor.
 
template<class T >
 JROOTClassSelector (const JType< T > &type, const bool option)
 Contructor.
 
bool equals (const JROOTClassSelector &selector) const
 Equals method.
 
bool equals (const char *const selector) const
 Equals method.
 
template<class T >
bool operator() (const JType< T > &type) const
 Get status of given data type.
 

Detailed Description

Auxiliary class to select ROOT class based on class name.

Definition at line 35 of file JROOTClassSelector.hh.

Constructor & Destructor Documentation

◆ JROOTClassSelector() [1/4]

JROOT::JROOTClassSelector::JROOTClassSelector ( )
inline

Default contructor.

Definition at line 42 of file JROOTClassSelector.hh.

42 :
43 std::string()
44 {}

◆ JROOTClassSelector() [2/4]

JROOT::JROOTClassSelector::JROOTClassSelector ( const char *const type_name)
inline

Contructor.

Parameters
type_nametype_name

Definition at line 52 of file JROOTClassSelector.hh.

52 :
53 std::string(type_name)
54 {}

◆ JROOTClassSelector() [3/4]

JROOT::JROOTClassSelector::JROOTClassSelector ( const std::string & type_name)
inline

Contructor.

Parameters
type_nametype_name

Definition at line 62 of file JROOTClassSelector.hh.

62 :
63 std::string(type_name)
64 {}

◆ JROOTClassSelector() [4/4]

template<class T >
JROOT::JROOTClassSelector::JROOTClassSelector ( const JType< T > & type,
const bool option )
inline

Contructor.

Parameters
typedata type
optioninclude namespace

Definition at line 74 of file JROOTClassSelector.hh.

74 :
75 std::string(option ? getName(type) : getClassname(getName(type)))
76 {}
const char * getName()
Get ROOT name of given data type.

Member Function Documentation

◆ equals() [1/2]

bool JROOT::JROOTClassSelector::equals ( const JROOTClassSelector & selector) const
inline

Equals method.

Note that if one of the selectors has an empty name space, the equality is evaluated by class name only else by class name and name space.

Parameters
selectorselector
Returns
true if this selector equals given selector; else false

Definition at line 88 of file JROOTClassSelector.hh.

89 {
90 if (getNamespace(*this) == "" || getNamespace(selector) == "")
91 return (getClassname(*this) == getClassname(selector));
92 else
93 return (getNamespace(*this) == getNamespace(selector) &&
94 getClassname(*this) == getClassname(selector));
95 }

◆ equals() [2/2]

bool JROOT::JROOTClassSelector::equals ( const char *const selector) const
inline

Equals method.

Parameters
selectorselector
Returns
true if this selector equals given selector; else false

Definition at line 104 of file JROOTClassSelector.hh.

105 {
106 return equals(JROOTClassSelector(selector));
107 }
JROOTClassSelector()
Default contructor.
bool equals(const JROOTClassSelector &selector) const
Equals method.

◆ operator()()

template<class T >
bool JROOT::JROOTClassSelector::operator() ( const JType< T > & type) const
inline

Get status of given data type.

Parameters
typedata type
Returns
true if valid class name; else false

Definition at line 117 of file JROOTClassSelector.hh.

118 {
119 return equals(JROOTClassSelector(type, true));
120 }

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