Archetype: cpp_service_config_parser.hpp.mustache
Parser declarations. component-service profile.
See the Template variable reference for the complete list of available variables and their semantics.
Template
The full template source. Edit here and re-tangle with
compass build --direct tangle_codegen_templates to regenerate
library/templates/cpp_service_config_parser.hpp.mustache.
{{! GENERATED FILE — tangled from projects/ores.codegen/library/templates/cpp_service_app.org. Edit the org source. }}
{{{cpp_license}}}
{{#component}}
#ifndef {{full_name_upper}}_CONFIG_PARSER_HPP
#define {{full_name_upper}}_CONFIG_PARSER_HPP
#include <iosfwd>
#include <vector>
#include <string>
#include <optional>
#include "{{full_name}}/export.hpp"
#include "{{full_name}}/config/options.hpp"
namespace {{namespace}}::config {
/**
* @brief Command-line parser for {{full_name}}.
*
* Note on logging: logging is not available during parsing since the logger
* is only initialised after options have been successfully parsed.
*/
class {{full_name_upper}}_EXPORT parser final {
public:
std::optional<options>
parse(const std::vector<std::string>& arguments, std::ostream& info,
std::ostream& error) const;
};
}
#endif
{{/component}}
See also
- Parent facet: C++ service application templates
- Template variable reference