CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DataPointDefinition.h
Go to the documentation of this file.
1 /*
2  * DataPointDefinition.h
3  *
4  * Created on: Sep 24, 2012
5  * Author: aspataru
6  */
7 
8 #ifndef DATAPOINTDEFINITION_H_
9 #define DATAPOINTDEFINITION_H_
10 
11 #include <string>
12 #include <vector>
13 #include "JsonSerializable.h"
14 #include "LegendItem.h"
15 
16 namespace jsoncollector {
18 
19 public:
21  DataPointDefinition(const std::vector<LegendItem>& legend);
22  virtual ~DataPointDefinition();
23 
27  virtual void serialize(Json::Value& root) const;
31  virtual void deserialize(Json::Value& root);
35  bool isPopulated() const;
39  LegendItem getLegendFor(unsigned int index) const;
40  std::vector<LegendItem> getLegend() const {
41  return legend_;
42  }
43 
44  // JSON field names
45  static const std::string LEGEND;
46  static const std::string PARAM_NAME;
47  static const std::string OPERATION;
48 
49 private:
50  std::vector<LegendItem> legend_;
51 };
52 }
53 
54 #endif /* DATAPOINTDEFINITION_H_ */
virtual void deserialize(Json::Value &root)
Represents a JSON value.
Definition: value.h:111
static const std::string OPERATION
std::vector< LegendItem > legend_
virtual void serialize(Json::Value &root) const
static const std::string PARAM_NAME
LegendItem getLegendFor(unsigned int index) const
string root
initialization
Definition: dbtoconf.py:70
std::vector< LegendItem > getLegend() const