A mixin class to attach a name to an object.
More...
#include <Named.h>
|
| Named (const std::string &name, T t) |
| Constructor taking the name and the desired value.
|
|
bool | operator< (const Named< T > &other) const |
| Comparison operator establishing an ordering considering the name and the object.
|
|
std::string | getName () const |
| Getter for the name.
|
|
void | setName (const std::string &name) |
| Setter for the name of the object.
|
|
|
using | Super = ScalarToClass<T> |
| Type of the base class.
|
|
|
std::string | m_name = "" |
| Memory for the name.
|
|
template<class T>
class Belle2::TrackFindingCDC::Named< T >
A mixin class to attach a name to an object.
Definition at line 23 of file Named.h.
◆ Super
template<class T>
using Super = ScalarToClass<T> |
|
private |
Type of the base class.
Definition at line 27 of file Named.h.
◆ Named()
template<class T>
Named |
( |
const std::string & | name, |
|
|
T | t ) |
|
inline |
Constructor taking the name and the desired value.
Definition at line 34 of file Named.h.
35 : Super(std::move(t))
36 , m_name(name)
37 {
38 }
◆ getName()
template<class T>
std::string getName |
( |
| ) |
const |
|
inline |
Getter for the name.
Definition at line 51 of file Named.h.
52 {
53 return m_name;
54 }
◆ operator<()
template<class T>
bool operator< |
( |
const Named< T > & | other | ) |
const |
|
inline |
Comparison operator establishing an ordering considering the name and the object.
Definition at line 41 of file Named.h.
42 {
43
44 const T& t(*this);
45
46 const T& otherT(other);
47 return getName() < other.getName() or (not(other.getName() <
getName()) and t < otherT);
48 }
TString getName(const TObject *obj)
human-readable name (e.g.
◆ setName()
template<class T>
void setName |
( |
const std::string & | name | ) |
|
|
inline |
Setter for the name of the object.
Definition at line 57 of file Named.h.
58 {
59 m_name = name;
60 }
◆ m_name
Memory for the name.
Definition at line 64 of file Named.h.
The documentation for this class was generated from the following file:
- tracking/trackFindingCDC/utilities/include/Named.h