HOPS
HOPS class reference
MHO_VexElementLineGenerator.hh
Go to the documentation of this file.
1 #ifndef MHO_VexElementLineGenerator_HH__
2 #define MHO_VexElementLineGenerator_HH__
3 
5 #include "MHO_Message.hh"
6 #include "MHO_VexDefinitions.hh"
7 #include <sstream>
8 #include <string>
9 
10 namespace hops
11 {
12 
25 {
26  public:
29 
38  std::string ConstructElementLine(std::string element_name, mho_json& element, mho_json& format);
39 
47  std::string GenerateInt(std::string element_name, mho_json& obj);
55  std::string GenerateListInt(std::string element_name, mho_json& obj);
63  std::string GenerateReal(std::string element_name, mho_json& obj);
71  std::string GenerateListReal(std::string element_name, mho_json& obj);
79  std::string GenerateKeyword(std::string element_name, mho_json& obj);
87  std::string GenerateString(std::string element_name, mho_json& obj);
95  std::string GenerateListString(std::string element_name, mho_json& obj);
103  std::string GenerateEpoch(std::string element_name, mho_json& obj);
111  std::string GenerateRaDec(std::string element_name, mho_json& obj);
119  std::string GenerateLink(std::string element_name, mho_json& obj);
128  std::string GenerateCompound(std::string element_name, mho_json& element, mho_json& format);
129 
130  private:
131  std::string fSpace;
132 
140  bool IsTrailingOptionalField(std::string field_name, mho_json& fields);
141 };
142 
143 } // namespace hops
144 
145 #endif
nlohmann::json mho_json
Definition: MHO_JSONHeaderWrapper.hh:5
Class MHO_VexElementLineGenerator.
Definition: MHO_VexElementLineGenerator.hh:25
std::string GenerateListInt(std::string element_name, mho_json &obj)
Generates a string list of integers from a given JSON object.
Definition: MHO_VexElementLineGenerator.cc:74
std::string GenerateListReal(std::string element_name, mho_json &obj)
Generates a formatted string from a JSON object containing real values.
Definition: MHO_VexElementLineGenerator.cc:107
std::string GenerateCompound(std::string element_name, mho_json &element, mho_json &format)
Generates a compound string from an element and format using specified types.
Definition: MHO_VexElementLineGenerator.cc:196
std::string GenerateRaDec(std::string element_name, mho_json &obj)
Generates Right Ascension and Declination string for given element name from mho_json object.
Definition: MHO_VexElementLineGenerator.cc:182
std::string GenerateEpoch(std::string element_name, mho_json &obj)
Generates epoch string for given element name using provided JSON object.
Definition: MHO_VexElementLineGenerator.cc:175
virtual ~MHO_VexElementLineGenerator()
Definition: MHO_VexElementLineGenerator.cc:11
std::string GenerateInt(std::string element_name, mho_json &obj)
Generates a string representation of an integer value from a JSON object.
Definition: MHO_VexElementLineGenerator.cc:67
std::string GenerateLink(std::string element_name, mho_json &obj)
Generates a link string for an element using its name and associated JSON object.
Definition: MHO_VexElementLineGenerator.cc:189
std::string GenerateString(std::string element_name, mho_json &obj)
Generates a string representation of an object's value with given element name.
Definition: MHO_VexElementLineGenerator.cc:154
std::string GenerateReal(std::string element_name, mho_json &obj)
Generates a real value string from a JSON object with optional units.
Definition: MHO_VexElementLineGenerator.cc:88
MHO_VexElementLineGenerator()
Definition: MHO_VexElementLineGenerator.cc:6
std::string GenerateListString(std::string element_name, mho_json &obj)
Generates a string list from a JSON object using given element name.
Definition: MHO_VexElementLineGenerator.cc:161
std::string ConstructElementLine(std::string element_name, mho_json &element, mho_json &format)
Constructs a formatted line for an element in VEX format.
Definition: MHO_VexElementLineGenerator.cc:13
std::string GenerateKeyword(std::string element_name, mho_json &obj)
Generates a keyword string from an element name and a JSON object.
Definition: MHO_VexElementLineGenerator.cc:147
Definition: MHO_ChannelLabeler.hh:17