File indexing completed on 2026-04-09 07:49:30
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020 #pragma once
0021
0022 #include <vector>
0023 #include <string>
0024 #include <sstream>
0025 #include <iostream>
0026 #include <iomanip>
0027 #include <iterator>
0028 #include <algorithm>
0029 #include <cstring>
0030
0031 #include "plog/Severity.h"
0032
0033
0034
0035
0036
0037
0038
0039
0040
0041
0042
0043
0044
0045
0046 #include "SYSRAP_API_EXPORT.hh"
0047
0048 struct SYSRAP_API SArgs
0049 {
0050 static const plog::Severity LEVEL ;
0051
0052 int argc ;
0053 char** argv ;
0054
0055 std::vector<std::string> elem ;
0056 void add(int argc_, char** argv_);
0057
0058 static bool starts_with( const std::string& e, const char* pfx );
0059 void addElements(const std::string& line, bool dedupe);
0060 void make();
0061
0062 std::string desc() const ;
0063 void dump() const ;
0064
0065 SArgs(int argc_, char** argv_, const char* argforced, const char* opts, bool dedupe=true);
0066 SArgs(const char* argv0, const char* argline);
0067 bool hasArg(const char* arg) const ;
0068 std::string getArgLine() const ;
0069 const char* get_arg_after(const char* option, const char* fallback) const ;
0070 const char* get_first_arg_ending_with(const char* ending, const char* fallback) const ;
0071
0072 };
0073