RTC Toolkit 4.0.1
Loading...
Searching...
No Matches
rtcComponentArgs.hpp
Go to the documentation of this file.
1
13#ifndef RTCTK_COMPONENTFRAMEWORK_RTCCOMPONENTARGS_HPP
14#define RTCTK_COMPONENTFRAMEWORK_RTCCOMPONENTARGS_HPP
15
17
18#include <mal/Cii.hpp>
19
20#include <boost/program_options.hpp>
21
22#include <iostream>
23#include <memory>
24#include <optional>
25#include <string>
26
28
34class Args {
35public:
41 class HelpOnly : public RtctkException {
42 public:
43 explicit HelpOnly(const std::string& help_text);
44 };
45
51 class ArgNotSet : public RtctkException {
52 public:
53 explicit ArgNotSet(const std::string& arg_name);
54 };
55
60 Args(int argc, char** argv);
61
67 std::string GetComponentName() const;
68
74 elt::mal::Uri GetServiceDiscEndpoint() const;
75
81 std::optional<elt::mal::Uri> GetLogPropsFile() const;
82
88 bool GetDebugMode() const;
89
95 std::optional<elt::mal::Uri> GetModelExportFile() const;
96
97private:
98 void Parse();
99
100 int m_argc;
101 char** m_argv;
102
103 boost::program_options::variables_map vm;
104};
105
106} // namespace rtctk::componentFramework
107
108#endif // RTCTK_COMPONENTFRAMEWORK_RTCCOMPONENTARGS_HPP
Exception class used by the command line argument parser.
Definition: rtcComponentArgs.hpp:51
Exception class used by the command line argument parser.
Definition: rtcComponentArgs.hpp:41
Class used to parse default command line arguments.
Definition: rtcComponentArgs.hpp:34
bool GetDebugMode() const
Get debug mode.
Definition: rtcComponentArgs.cpp:44
std::optional< elt::mal::Uri > GetModelExportFile() const
Get name of optionally provided state machine model export file.
Definition: rtcComponentArgs.cpp:48
std::string GetComponentName() const
Get component name or identifier.
Definition: rtcComponentArgs.cpp:28
elt::mal::Uri GetServiceDiscEndpoint() const
Get service discovery endpoint.
Definition: rtcComponentArgs.cpp:32
std::optional< elt::mal::Uri > GetLogPropsFile() const
Get name of optionally provided log4cplus log properties file.
Definition: rtcComponentArgs.cpp:36
The RtctkException class is the base class for all Rtctk exceptions.
Definition: exceptions.hpp:237
Provides macros and utilities for exception handling.
Definition: commandReplier.cpp:22