Belle II Software development
ConstantMapping< T > Class Template Reference

Realizing a mapping returning a constant attribute value regardless of object or position. More...

#include <Mapping.h>

Inheritance diagram for ConstantMapping< T >:
Mapping< T >

Public Member Functions

 ConstantMapping (const std::string &value)
 Constructor receiving the constant value.
 
std::string map (int index, T &t) override
 Return the constant value.
 
std::string info () override
 Informal string summarizing the translation from the object to the attribute value.
 

Private Attributes

std::string m_value
 Memory for the returned attribute value.
 

Detailed Description

template<class T>
class Belle2::TrackFindingCDC::ConstantMapping< T >

Realizing a mapping returning a constant attribute value regardless of object or position.

Definition at line 45 of file Mapping.h.

Constructor & Destructor Documentation

◆ ConstantMapping()

ConstantMapping ( const std::string &  value)
inlineexplicit

Constructor receiving the constant value.

Definition at line 49 of file Mapping.h.

50 : m_value(value)
51 {
52 }
std::string m_value
Memory for the returned attribute value.
Definition: Mapping.h:68

Member Function Documentation

◆ info()

std::string info ( )
inlineoverridevirtual

Informal string summarizing the translation from the object to the attribute value.

Reimplemented from Mapping< T >.

Definition at line 61 of file Mapping.h.

62 {
63 return "always " + m_value + "\n";
64 }

◆ map()

std::string map ( int  index,
T &  t 
)
inlineoverridevirtual

Return the constant value.

Reimplemented from Mapping< T >.

Definition at line 55 of file Mapping.h.

56 {
57 return m_value;
58 }

Member Data Documentation

◆ m_value

std::string m_value
private

Memory for the returned attribute value.

Definition at line 68 of file Mapping.h.


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