summaryrefslogtreecommitdiff
path: root/src/include/argparser.h
diff options
context:
space:
mode:
authorJannis M. Hoffmann <jannis@fehcom.de>2023-10-07 22:33:50 +0200
committerJannis M. Hoffmann <jannis@fehcom.de>2023-10-08 11:35:51 +0200
commit1978c49bea5b439d993067c055cec47e70db8fd6 (patch)
tree255caea96a13f95564e6b631be9a4ac55ce33cd9 /src/include/argparser.h
parent3b1278f5459514a6d6364f068ff97b8a0432057b (diff)
minor refactoring
Diffstat (limited to 'src/include/argparser.h')
-rw-r--r--src/include/argparser.h25
1 files changed, 13 insertions, 12 deletions
diff --git a/src/include/argparser.h b/src/include/argparser.h
index ba7838d..0e9b060 100644
--- a/src/include/argparser.h
+++ b/src/include/argparser.h
@@ -1,30 +1,31 @@
-/** --------------------------------------------------------------------
+/**
* @file argparser.h
* @brief Declaration of the argument parser class.
* @author Andreas Aardal Hanssen
* @date 2002-2005
- * ----------------------------------------------------------------- **/
+ */
+
#ifndef ARGPARSER_H_INCLUDED
#define ARGPARSER_H_INCLUDED
+
#include <map>
#include <string>
#include <vector>
namespace Binc {
- class ArgOpts {
- public:
+
+ struct ArgOpts {
std::string c;
bool b;
bool o;
std::string desc;
- inline ArgOpts(const std::string &chr, bool boolean, bool optional, const std::string &descr)
- {
- c = chr;
- b = boolean;
- o = optional;
- desc = descr;
- }
+ ArgOpts(const std::string &chr, bool boolean, bool optional, const std::string &descr)
+ : c(chr)
+ , b(boolean)
+ , o(optional)
+ , desc(descr)
+ {}
};
class CommandLineArgs {
@@ -46,7 +47,7 @@ namespace Binc {
void setTail(const std::string &str);
- const std::vector<std::string> &getUnqualifiedArgs() const;
+ const std::vector<std::string> &getUnqualifiedArgs(void) const;
private:
void registerArg(const std::string &arg, const std::string &desc, bool boolean, bool optional);