3 #ifndef CARMA_UI_RTD_MONITORCELLMAPPED_H
4 #define CARMA_UI_RTD_MONITORCELLMAPPED_H
16 #include <boost/shared_ptr.hpp>
18 #define MP_BITMASK_FORMAT_FN(fn) unsigned (fn)(carma::monitor::MonitorPoint& mp, int iSamp, int iBit)
24 class MonitorCellMapped;
25 typedef boost::shared_ptr<MonitorCellMapped> MonitorCellMappedPtr;
27 class MonitorCellMapped :
public MonitorCell {
33 MonitorCellMapped(
int cellWidth,
35 monitor::MonitorPoint& monitorPoint,
37 std::map<std::string, std::string> labelMap);
39 MonitorCellMapped(
int cellWidth,
40 monitor::MonitorPoint& monitorPoint,
41 std::map<std::string, std::string> labelMap);
43 static MonitorCellMappedPtr makeCell(
const int cellWidth,
44 monitor::MonitorPoint& mp,
45 std::map<std::string, std::string> labelMap);
49 static MonitorCellMappedPtr makeCell(
const int cellWidth,
50 monitor::MonitorPoint& mp,
52 std::map<std::string, std::string> labelMap);
54 static MonitorCellMappedPtr makeCell(
const int cellWidth,
55 monitor::MonitorPoint& mp);
57 static MonitorCellMappedPtr makeCell(
const int cellWidth,
58 monitor::MonitorPoint& mp,
61 static MonitorCellMappedPtr makeCell(
const int cellWidth,
62 monitor::MonitorPoint& mp,
68 static MonitorCellMappedPtr makeCell(
const int cellWidth,
69 monitor::MonitorPoint& mp,
74 static MonitorCellMappedPtr makeCell(
const int cellWidth,
75 monitor::MonitorPoint& mp,
80 static MonitorCellMappedPtr makeCell(
const int cellWidth,
81 monitor::MonitorPoint& mp,
87 static MonitorCellMappedPtr makeCell(
const int cellWidth,
88 monitor::MonitorPoint& mp,
95 static MonitorCellMappedPtr makeCell(
const int cellWidth,
96 monitor::MonitorPoint& mp,
104 static MonitorCellMappedPtr makeCell(
const int cellWidth,
105 monitor::MonitorPoint& mp,
114 static MonitorCellMappedPtr makeCell(
const int cellWidth,
115 monitor::MonitorPoint& mp,
128 virtual ~MonitorCellMapped();
130 virtual ::std::string computeText();
132 void setBit(
int iBit);
134 void setDefaultLabel(std::string defaultLabel);
136 void setColorMap(std::map<std::string, CellColor>& colorMap);
142 MP_BITMASK_FORMAT_FN(*formatFn_);
146 std::map<std::string, std::string> labelMap_;
147 std::map<std::string, CellColor> colorMap_;
149 std::string defaultLabel_;
153 void privateConstructor(monitor::MonitorPoint& mp,
154 std::map<std::string, std::string> labelMap);
156 static MP_BITMASK_FORMAT_FN(formatByte);
157 static MP_BITMASK_FORMAT_FN(formatShort);
158 static MP_BITMASK_FORMAT_FN(formatBool);
159 static MP_BITMASK_FORMAT_FN(formatInt);
169 #endif // End #ifndef CARMA_MONITOR_UI_RTD_MONITORCELLMAPPED_H
Cell that takes a MonitorPoint and displays its current value.
enum carma::ui::rtd::CellColorEnum CellColor
Cell color choices.