Chi-Tech
EventCodes.cc
Go to the documentation of this file.
1#include <string>
2#include <map>
3
4namespace chi
5{
6
7int GetStandardEventCode(const std::string& event_name)
8{
9 static std::map<std::string, int> event_name_2_code_map{
10 {"ProgramStart", 1},
11 {"ProgramExecuted", 2},
12 {"SolverPreInitialize", 31},
13 {"SolverInitialized", 32},
14 {"SolverPreExecution", 33},
15 {"SolverExecuted", 34},
16 {"SolverPreStep", 35},
17 {"SolverStep", 36},
18 {"SolverPreAdvance", 37},
19 {"SolverAdvanced", 38},
20 };
21
22 const auto it = event_name_2_code_map.find(event_name);
23 if (it != event_name_2_code_map.end()) return it->second;
24
25 return 0;
26}
27
28} // namespace chi
int GetStandardEventCode(const std::string &event_name)
Definition: EventCodes.cc:7