HOPS
HOPS class reference
MHO_VexTokenProcessor.hh
Go to the documentation of this file.
1 #ifndef MHO_VexTokenProcessor_HH__
2 #define MHO_VexTokenProcessor_HH__
3 
6 #include "MHO_Message.hh"
7 #include "MHO_Tokenizer.hh"
8 
9 #include "MHO_VexDefinitions.hh"
10 #include "MHO_VexLine.hh"
11 
12 namespace hops
13 {
14 
27 {
28  public:
30  virtual ~MHO_VexTokenProcessor();
31 
40  mho_json ProcessInt(const std::string& element_name, mho_json& format, std::vector< std::string >& tokens);
41 
50  mho_json ProcessListInt(const std::string& element_name, mho_json& format, std::vector< std::string >& tokens);
51 
60  mho_json ProcessListString(const std::string& element_name, mho_json& format, std::vector< std::string >& tokens);
61 
70  mho_json ProcessReal(const std::string& element_name, mho_json& format, std::vector< std::string >& tokens);
71 
80  mho_json ProcessListReal(const std::string& element_name, mho_json& format, std::vector< std::string >& tokens);
81 
88  bool ContainsWhitespace(std::string value);
89 
90  private:
91  std::string fWhitespaceDelim;
92  MHO_Tokenizer fTokenizer;
93 };
94 
95 } // namespace hops
96 
97 #endif
nlohmann::json mho_json
Definition: MHO_JSONHeaderWrapper.hh:5
Class MHO_Tokenizer.
Definition: MHO_Tokenizer.hh:24
Class MHO_VexTokenProcessor.
Definition: MHO_VexTokenProcessor.hh:27
mho_json ProcessInt(const std::string &element_name, mho_json &format, std::vector< std::string > &tokens)
Converts first token to integer and returns as mho_json.
Definition: MHO_VexTokenProcessor.cc:13
mho_json ProcessListInt(const std::string &element_name, mho_json &format, std::vector< std::string > &tokens)
Converts a list of string tokens into integers and stores them in an mho_json object.
Definition: MHO_VexTokenProcessor.cc:20
mho_json ProcessListString(const std::string &element_name, mho_json &format, std::vector< std::string > &tokens)
Processes a list string into a JSON object and stores tokens.
Definition: MHO_VexTokenProcessor.cc:33
MHO_VexTokenProcessor()
Definition: MHO_VexTokenProcessor.cc:6
mho_json ProcessReal(const std::string &element_name, mho_json &format, std::vector< std::string > &tokens)
Processes a real number value from tokens and returns it as an mho_json object.
Definition: MHO_VexTokenProcessor.cc:46
bool ContainsWhitespace(std::string value)
Checks if a given string contains whitespace characters.
Definition: MHO_VexTokenProcessor.cc:120
mho_json ProcessListReal(const std::string &element_name, mho_json &format, std::vector< std::string > &tokens)
Processes a list of real numbers as strings and converts them into a JSON object with values and opti...
Definition: MHO_VexTokenProcessor.cc:81
virtual ~MHO_VexTokenProcessor()
Definition: MHO_VexTokenProcessor.cc:11
Definition: MHO_ChannelLabeler.hh:17
struct token_struct * tokens
Definition: parse_control_file.c:26
Definition: vex.h:175