10#include <tracking/trackFindingCDC/utilities/StringManipulation.h> 
   19  namespace TrackFindingCDC {
 
   30      virtual std::string 
map(
int index __attribute__((unused)),
 
   31                              T& t __attribute__((unused)))
 
   39        return "(no info available)\n";
 
   55      std::string 
map(
int index __attribute__((unused)), T& t __attribute__((unused)))
 override 
   61      std::string 
info()
 override 
   63        return "always " + 
m_value + 
"\n";
 
   83      std::string 
map(
int index, T& t __attribute__((unused)))
 override 
   90      std::string 
info()
 override 
   92        return "Cycle through " + bracketed(join(
", ", 
m_values)) + 
"\n";
 
Realizing a mapping returning a constant attribute value regardless of object or position.
ConstantMapping(const std::string &value)
Constructor receiving the constant value.
std::string map(int index, T &t) override
Return the constant value.
std::string m_value
Memory for the returned attribute value.
std::string info() override
Informal string summarizing the translation from the object to the attribute value.
Realizing a mapping from a pool of values to be cycled from the index.
std::vector< std::string > m_values
Memory for the attribute values to be cycled.
CycleMapping(const std::vector< std::string > &values)
Constructor receiving the values to be cycled.
std::string map(int index, T &t) override
Return the a value from the cycle value according to the given inded.
std::string info() override
Informal string summarizing the translation from the object to the attribute value.
Interface defining a mapping of objects to attribute values e.g. a color.
virtual ~Mapping()=default
Destructor of interfaces should be virtual.
virtual std::string map(int index, T &t)
Main function returning an attribute value for an object at the given index.
virtual std::string info()
Informal string summarizing the translation from the object to the attribute value.
Abstract base class for different kinds of events.