Belle II Software development
FixedStyling< AObject > Class Template Reference

Implementation of a styling from fixed attribute map. More...

#include <Styling.h>

Inheritance diagram for FixedStyling< AObject >:
Styling< AObject >

Public Member Functions

AttributeMap map (int index, AObject &object) override
 Return the fixed attributes on each invocation.
 
std::string info () override
 Informal string summarizing the translation from the object to the styling attributes.
 
void set (const std::string &key, const std::string &value)
 Sets the given attribute to the fixed value.
 
void setStroke (const std::string &value)
 Legacy - Sets the stroke color to the fixed value.
 
void setStrokeWidth (const std::string &value)
 Legacy - Sets the stroke width to the fixed value.
 

Private Attributes

AttributeMap m_attributeMap
 Memory for the fixed attribute values.
 

Detailed Description

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

Implementation of a styling from fixed attribute map.

Definition at line 54 of file Styling.h.

Member Function Documentation

◆ info()

std::string info ( )
inlineoverridevirtual

Informal string summarizing the translation from the object to the styling attributes.

Reimplemented from Styling< AObject >.

Definition at line 65 of file Styling.h.

66 {
67 std::ostringstream oss;
68 for (const auto& keyValue : m_attributeMap) {
69 oss << keyValue.first << ": " << keyValue.second << '\n';
70 }
71 return oss.str();
72 }
AttributeMap m_attributeMap
Memory for the fixed attribute values.
Definition: Styling.h:94

◆ map()

AttributeMap map ( int  index,
AObject &  object 
)
inlineoverridevirtual

Return the fixed attributes on each invocation.

Reimplemented from Styling< AObject >.

Definition at line 58 of file Styling.h.

60 {
61 return m_attributeMap;
62 }

◆ set()

void set ( const std::string &  key,
const std::string &  value 
)
inline

Sets the given attribute to the fixed value.

Definition at line 75 of file Styling.h.

76 {
77 m_attributeMap.emplace(key, value);
78 }

◆ setStroke()

void setStroke ( const std::string &  value)
inline

Legacy - Sets the stroke color to the fixed value.

Definition at line 81 of file Styling.h.

82 {
83 set("stroke", value);
84 }
void set(const std::string &key, const std::string &value)
Sets the given attribute to the fixed value.
Definition: Styling.h:75

◆ setStrokeWidth()

void setStrokeWidth ( const std::string &  value)
inline

Legacy - Sets the stroke width to the fixed value.

Definition at line 87 of file Styling.h.

88 {
89 set("stroke-width", value);
90 }

Member Data Documentation

◆ m_attributeMap

AttributeMap m_attributeMap
private

Memory for the fixed attribute values.

Definition at line 94 of file Styling.h.


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