1 #ifndef PLOTMSPAGEHEADERPARAM_H_
2 #define PLOTMSPAGEHEADERPARAM_H_
25 shortLabel_(shortLabel),
26 longLabel_(longLabel) {}
53 Obs_Start_Date=ms_begin,
67 static constexpr
size_t n_items =
static_cast<size_t>(Item::n_items);
68 static constexpr
size_t size() {
return n_items; }
71 static const map<HeaderItemInfo,Item> info2item = {
73 { {
"filename" ,
"File" ,
"Filename" } , Item::Filename },
74 { {
"y_columns" ,
"Y Column(s)" ,
"Y Column(s)" } , Item::YColumns },
75 { {
"obs_start_date" ,
"Observation date",
"Observation Start Date" } , Item::Obs_Start_Date },
76 { {
"obs_start_time" ,
"Observation time",
"Observation Start Time" } , Item::Obs_Start_Time },
77 { {
"obs_observer" ,
"Observer" ,
"Observer" } , Item::Obs_Observer },
78 { {
"obs_project" ,
"Project ID" ,
"Project ID" } , Item::Obs_Project },
79 { {
"obs_telescope_name" ,
"Telescope" ,
"Telescope Name" } , Item::Obs_Telescope_Name },
80 { {
"target_name" ,
"Target name" ,
"Target Name" } , Item::Target_Name },
81 { {
"target_direction" ,
"Target RA,Dec" ,
"Target Direction" } , Item::Target_Direction }
90 item2Info[p.second] = p.first;
92 const map<Item,HeaderItemInfo> &
result() {
return item2Info; }
96 static map<Item,HeaderItemInfo>
reverseMap(
const map<HeaderItemInfo,Item>& map ) {
97 return for_each(map.begin(),map.end(),
Reverse()).result();
101 static const auto item2info = reverseMap(info2Item_());
109 toItem[p.first.name()] = p.second;
115 static const auto & info = info2Item_();
116 static const auto name2item = for_each(info.begin(),info.end(),
GetName()).toItem ;
120 static const array<Item,n_items>& items();
121 static const array<String,n_items>& itemNames();
122 static bool isItemName(
const String& s);
136 static constexpr
size_t kMaxItems = 10;
140 const std::vector<HeaderItem>& items()
const;
141 void setItems(
const String& items=
String(),
const char sep=
',');
143 bool append(
const String& item);
148 pair<bool,size_t> index(
HeaderItem item)
const;
151 return items_ == other.
items() ; }
TableExprNode array(const TableExprNode &values, const TableExprNodeSet &shape)
Create an array of the given shape and fill it with the values.
ABSTRACT CLASSES Abstract class for colors Any implementation of color should be able to provide a hexadecimal form of the if a human readable name(i.e."black").In many places throughout the plotter
const_iterator end() const
const_iterator begin() const
bool operator<(const HeaderItemInfo &left, const HeaderItemInfo &right)
String: the storage and methods of handling collections of characters.
Bool operator==(const MVTime &lh, const MVTime &rh)
is equal operator, uses operator Double which returns days