Belle II Software development
DefaultColorCycleMapping< AObject > Class Template Reference

Class template for coloring objects in different Colors. More...

#include <ColorMapping.h>

Inheritance diagram for DefaultColorCycleMapping< AObject >:
CycleMapping< AObject > Mapping< AObject >

Public Member Functions

 DefaultColorCycleMapping ()
 Constructor.
 
std::string map (int index, AObject &t) override
 Return a value from the cycle value according to the given index.
 
std::string map (int index, AObject &t) override
 Return a value from the cycle value according to the given index.
 
std::string info () override
 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.
 

Private Types

using Super = CycleMapping<AObject>
 Type of the base class.
 

Private Attributes

std::vector< std::string > m_values
 Memory for the attribute values to be cycled.
 
std::vector< std::string > m_values
 Memory for the attribute values to be cycled.
 

Detailed Description

template<class AObject>
class Belle2::TrackFindingCDC::DefaultColorCycleMapping< AObject >

Class template for coloring objects in different Colors.

This Class uses the color list defined in the Colors class.

Definition at line 26 of file ColorMapping.h.

Member Typedef Documentation

◆ Super

template<class AObject>
using Super = CycleMapping<AObject>
private

Type of the base class.

Definition at line 30 of file ColorMapping.h.

Constructor & Destructor Documentation

◆ DefaultColorCycleMapping()

template<class AObject>
DefaultColorCycleMapping ( )
inline

Constructor.

Definition at line 34 of file ColorMapping.h.

35 : Super(Colors::getList())
36 {
37 }

Member Function Documentation

◆ info() [1/2]

std::string info ( )
inlineoverridevirtualinherited

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

Reimplemented from Mapping< AObject >.

Definition at line 90 of file Mapping.h.

91 {
92 return "Cycle through " + bracketed(join(", ", m_values)) + "\n";
93 }

◆ info() [2/2]

std::string info ( )
inlineoverridevirtualinherited

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

Reimplemented from Mapping< AObject >.

Definition at line 90 of file Mapping.h.

91 {
92 return "Cycle through " + bracketed(join(", ", m_values)) + "\n";
93 }

◆ map() [1/2]

std::string map ( int index,
AObject & t )
inlineoverridevirtualinherited

Return a value from the cycle value according to the given index.

Reimplemented from Mapping< AObject >.

Definition at line 83 of file Mapping.h.

84 {
85 assert(index >= 0);
86 return m_values[index % m_values.size()];
87 }

◆ map() [2/2]

std::string map ( int index,
AObject & t )
inlineoverridevirtualinherited

Return a value from the cycle value according to the given index.

Reimplemented from Mapping< AObject >.

Definition at line 83 of file Mapping.h.

84 {
85 assert(index >= 0);
86 return m_values[index % m_values.size()];
87 }

Member Data Documentation

◆ m_values [1/2]

std::vector<std::string> m_values
privateinherited

Memory for the attribute values to be cycled.

Definition at line 97 of file Mapping.h.

◆ m_values [2/2]

std::vector<std::string> m_values
privateinherited

Memory for the attribute values to be cycled.

Definition at line 97 of file Mapping.h.


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