 |
Belle II Software
release-05-02-19
|
12 #include <tracking/trackFindingCDC/utilities/StringManipulation.h>
21 namespace TrackFindingCDC {
32 virtual std::string
map(
int index __attribute__((unused)),
33 T& t __attribute__((unused)))
39 virtual std::string
info()
41 return "(no info available)\n";
57 std::string
map(
int index __attribute__((unused)), T& t __attribute__((unused)))
override
63 std::string
info()
override
79 explicit CycleMapping(
const std::vector<std::string>& values)
85 std::string
map(
int index, T& t __attribute__((unused)))
override
92 std::string
info()
override
94 return "Cycle through " + bracketed(join(
", ",
m_values)) +
"\n";
Realizing a mapping from a pool of values to be cycled from the index.
virtual std::string info()
Informal string summarizing the translation from the object to the attribute value.
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.
std::vector< std::string > m_values
Memory for the attribute values to be cycled.
std::string info() override
Informal string summarizing the translation from the object to the attribute value.
std::string map(int index, T &t __attribute__((unused))) override
Return the a value from the cycle value according to the given inded.
Abstract base class for different kinds of events.
Realizing a mapping returning a constant attribute value regardless of object or position.
virtual ~Mapping()=default
Destructor of interfaces should be virtual.
std::string map(int index __attribute__((unused)), T &t __attribute__((unused))) override
Return the constant value.
ConstantMapping(const std::string &value)
Constructor receiving the constant value.
std::string m_value
Memory for the returned attribute value.
CycleMapping(const std::vector< std::string > &values)
Constructor receiving the values to be cycled.
virtual std::string map(int index __attribute__((unused)), T &t __attribute__((unused)))
Main function returning an attribute value for an object at the given index.