Implementation of a styling from fixed attribute map.
More...
#include <Styling.h>
|
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.
|
|
template<class AObject>
class Belle2::TrackFindingCDC::FixedStyling< AObject >
Implementation of a styling from fixed attribute map.
Definition at line 54 of file Styling.h.
◆ info()
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 }
◆ map()
template<class AObject>
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()
template<class AObject>
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()
template<class AObject>
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 }
◆ setStrokeWidth()
template<class AObject>
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 }
◆ m_attributeMap
template<class AObject>
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:
- tracking/trackFindingCDC/display/include/Styling.h