netxsimdg
Loading...
Searching...
No Matches
ConfigurationHelpPrinter.hpp
Go to the documentation of this file.
1
8#ifndef CONFIGURATIONHELPPRINTER_HPP
9#define CONFIGURATIONHELPPRINTER_HPP
10
12
13#include <ostream>
14#include <string>
15
16static std::string b;
17
18namespace Nextsim {
19
21public:
22 typedef ConfigurationHelp::ConfigType ConfigType;
23
24 enum class Output {
25 ANSI,
26 MARKDOWN,
27 };
28
29 static const std::string allStr;
30 static const std::string availStr;
31
32 static void setOutput(Output out);
33
34 static std::ostream& print(
35 std::ostream& os, const ConfigurationHelp::HelpMap& map, const std::string& target);
36 static std::ostream& print(std::ostream& os, const ConfigurationHelp& help);
37
38protected:
39 static std::ostream& printString(std::ostream& os, const ConfigurationHelp& help);
40 static std::ostream& printNumeric(std::ostream& os, const ConfigurationHelp& help);
41 static std::ostream& printInteger(std::ostream& os, const ConfigurationHelp& help);
42 static std::ostream& printModule(std::ostream& os, const ConfigurationHelp& help);
43 static std::ostream& printBoolean(std::ostream& os, const ConfigurationHelp& help);
44};
45
46inline std::ostream& operator<<(std::ostream& os, const ConfigurationHelp& help)
47{
48 return ConfigurationHelpPrinter::print(os, help);
49}
50} /* namespace Nextsim */
51
52#endif /* CONFIGURATIONHELPPRINTER_HPP */