Belle II Software development
Named< T > Class Template Reference

A mixin class to attach a name to an object. Based on class with same name in CDC package. More...

#include <Named.h>

Public Member Functions

 Named (const std::string &name, T value)
 Constructor taking the name and the desired value.
 
std::string getName () const
 get name of the object
 
void setName (const std::string &name)
 set name of the object
 
getValue ()
 get the object
 

Protected Attributes

std::string m_name
 name associated with object m_value
 
m_value
 object to be associated with name
 

Detailed Description

template<typename T>
class Belle2::Named< T >

A mixin class to attach a name to an object. Based on class with same name in CDC package.

Definition at line 21 of file Named.h.

Constructor & Destructor Documentation

◆ Named()

Named ( const std::string &  name,
value 
)
inline

Constructor taking the name and the desired value.

Definition at line 24 of file Named.h.

24 :
25 m_name(name), m_value(value)
26 {};
std::string m_name
name associated with object m_value
Definition: Named.h:45
T m_value
object to be associated with name
Definition: Named.h:47

Member Function Documentation

◆ getName()

std::string getName ( ) const
inline

get name of the object

Definition at line 29 of file Named.h.

29{return m_name;}

◆ getValue()

T getValue ( )
inline

get the object

Definition at line 38 of file Named.h.

39 {
40 return m_value;
41 }

◆ setName()

void setName ( const std::string &  name)
inline

set name of the object

Definition at line 32 of file Named.h.

33 {
34 m_name = name;
35 }

Member Data Documentation

◆ m_name

std::string m_name
protected

name associated with object m_value

Definition at line 45 of file Named.h.

◆ m_value

T m_value
protected

object to be associated with name

Definition at line 47 of file Named.h.


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