Project
Loading...
Searching...
No Matches
qconfig.cxx
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11
14
15#include <cstdio>
16#include <cstdlib>
17#include <memory.h>
18#include <utility>
19#include <vector>
20#include <functional>
21#include <iostream>
22#include <tuple>
23#include "qconfig.h"
24#include "qconfig_helpers.h"
26
27// Create config instances
28#define QCONFIG_PARSER_CXX
29#define QCONFIG_INSTANCE
30#include "qconfig_internal.h"
31#undef QCONFIG_INSTANCE
32
33namespace qConfig
34{
35
36static inline const char* getOptName(const char** argv, int32_t i)
37{
38 while (i > 1 && argv[i][0] != '-') {
39 i--;
40 }
41 return (argv[i]);
42}
43
44template <typename T>
46 qConfigSettings() : checkMin(false), checkMax(false), doSet(false), doDefault(false), min(), max(), set(), message(nullptr), allowEmpty(false) {};
47 template <typename S>
51 T min, max;
52 T set;
53 const char* message;
55};
56
57template <typename T>
58static int32_t qAddOptionType(qConfigSettings<T>& settings, T& ref, int32_t& i, const char** argv, const int argc, T def);
59template <typename T>
60static void qAddOptionMessage(qConfigSettings<T>& settings, T& ref);
61template <typename T>
62static int32_t qAddOptionMinMax(qConfigSettings<T>& settings, T& ref, const char* arg);
63
64template <typename T>
66 typedef T settingsType;
67};
68template <typename... X>
69struct qSettingsType<std::tuple<X...>> {
70 typedef int32_t settingsType;
71};
72
73template <typename T>
75 static inline int32_t qAddOptionMain(qConfigSettings<T>& settings, T& ref, int32_t& i, const char** argv, const int argc, T def);
76};
77template <typename... X>
78struct qConfigTypeSpecialized<std::tuple<X...>> {
79 static inline int32_t qAddOptionMain(qConfigSettings<typename qSettingsType<std::tuple<X...>>::settingsType>& settings, std::tuple<X...>& ref, int32_t& i, const char** argv, const int argc, std::tuple<X...>& def);
80};
81
82// Main processing function for arguments
83template <class T>
84inline int32_t qConfigTypeSpecialized<T>::qAddOptionMain(qConfigSettings<T>& settings, T& ref, int32_t& i, const char** argv, const int argc, T def)
85{
86 int32_t retVal = 0;
87 int32_t iOrg = i;
88 if (settings.doSet) {
89 ref = settings.set;
90 } else if ((retVal = qAddOptionType<T>(settings, ref, i, argv, argc, def))) {
91 return (retVal);
92 }
93 if ((retVal = qAddOptionMinMax<T>(settings, ref, iOrg < argc ? argv[iOrg] : ""))) {
94 return (retVal);
95 }
96 qAddOptionMessage<T>(settings, ref);
97 return (0);
98}
99template <typename T>
100static inline int32_t qAddOptionMainTupleElem(qConfigSettings<typename qSettingsType<T>::settingsType> settingsTup, T& ref, int32_t& i, const char** argv, const int argc)
101{
102 T def = T();
103 qConfigSettings<T> settings = settingsTup;
104 return (qAddOptionType<T>(settings, ref, i, argv, argc, def));
105}
106template <typename T, int32_t index = 0, int32_t left = std::tuple_size_v<T>>
108 static inline int32_t qAddOptionMainTuple(qConfigSettings<typename qSettingsType<T>::settingsType> settings, T& tup, int32_t& i, const char** argv, const int argc)
109 {
110 auto& ref = std::get<index>(tup);
111 int32_t retVal = qAddOptionMainTupleElem(settings, ref, i, argv, argc);
112 if (retVal) {
113 if (retVal == qcrArgMissing && index != 0) {
114 printf("Invalid number of arguments for option %s\n", getOptName(argv, i));
116 }
117 return (retVal);
118 }
120 }
121};
122template <typename T, int32_t index>
124 static inline int32_t qAddOptionMainTuple(qConfigSettings<typename qSettingsType<T>::settingsType> /*settings*/, T& /*tup*/, int32_t& /*i*/, const char** /*argv*/, const int32_t /*argc*/) { return 0; }
125};
126template <typename... X>
127inline int32_t qConfigTypeSpecialized<std::tuple<X...>>::qAddOptionMain(qConfigSettings<typename qSettingsType<std::tuple<X...>>::settingsType>& settings, std::tuple<X...>& ref, int32_t& i, const char** argv, const int argc, std::tuple<X...>& /*def*/)
128{
129 return (qAddOptionMainTupleStruct<std::tuple<X...>>::qAddOptionMainTuple(settings, ref, i, argv, argc));
130}
131
132template <typename T>
134 // Recursive handling of additional settings
135 static inline void qProcessSetting(qConfigSettings<T>& settings, qmin_t<T> minval)
136 {
137 static_assert(!std::is_same_v<T, bool>, "min option not supported for boolean settings");
138 settings.checkMin = true;
139 settings.min = minval.v;
140 }
141 static inline void qProcessSetting(qConfigSettings<T>& settings, qmax_t<T> maxval)
142 {
143 static_assert(!std::is_same_v<T, bool>, "max option not supported for boolean settings");
144 settings.checkMax = true;
145 settings.max = maxval.v;
146 }
147 static inline void qProcessSetting(qConfigSettings<T>& settings, qmessage_t msg) { settings.message = msg.v; }
148 template <typename S>
149 static inline void qProcessSetting(qConfigSettings<T>& settings, qset_t<S> set)
150 {
151 settings.doSet = true;
152 settings.set = set.v;
153 }
154 template <typename S>
155 static inline void qProcessSetting(qConfigSettings<T>& settings, qdef_t<S> set)
156 {
157 settings.doDefault = true;
158 settings.set = set.v;
159 }
160
161 static inline void qAddOptionSettings(qConfigSettings<T>& /*settings*/) {}
162 template <typename Arg1, typename... Args>
163 static inline void qAddOptionSettings(qConfigSettings<T>& settings, Arg1&& arg1, Args&&... args)
164 {
165 qProcessSetting(settings, arg1);
166 qAddOptionSettings(settings, args...);
167 }
168
169 template <typename... Args>
170 static inline int32_t qAddOption(T& ref, int32_t& i, const char** argv, const int argc, T def, const char* /*help*/, Args&&... args)
171 {
172 auto settings = qConfigGetSettings(args...);
173 return qConfigTypeSpecialized<T>::qAddOptionMain(settings, ref, i, argv, argc, def);
174 }
175
176 template <typename... Args>
177 static inline int32_t qAddOptionVec(std::vector<T>& ref, int32_t& i, const char** argv, const int argc, const char* /*help*/, Args&&... args)
178 {
179 auto settings = qConfigGetSettings(args...);
180 int32_t iFirst = i, iLast;
181 do {
182 iLast = i;
183 T tmp = T(), def = T();
184 settings.allowEmpty = (i != iFirst);
185 int32_t retVal = qConfigTypeSpecialized<T>::qAddOptionMain(settings, tmp, i, argv, argc, def);
186 if (retVal) {
187 return (retVal != qcrArgMissing || i == iFirst ? retVal : 0);
188 }
189 if (i == iFirst || i != iLast) {
190 ref.push_back(tmp);
191 }
192 } while (i != iLast);
193 return (0);
194 }
195
196 template <typename... Args>
197 static inline int32_t qAddOptionArray(T* ref, int32_t count, int32_t& i, const char** argv, const int argc, const char* /*help*/, Args&&... args)
198 {
199 auto settings = qConfigGetSettings(args...);
200 int32_t iFirst = i, iLast;
201 do {
202 iLast = i;
203 T tmp = T(), def = T();
204 settings.allowEmpty = (i != iFirst);
205 int32_t retVal = qConfigTypeSpecialized<T>::qAddOptionMain(settings, tmp, i, argv, argc, def);
206 if (retVal) {
207 return (retVal != qcrArgMissing || i == iFirst ? retVal : 0);
208 }
209 if (i - iFirst >= count) {
210 printf("Too many values provided for option %s\n", getOptName(argv, i));
211 return (qcrArrayOverflow);
212 }
213 if (i == iFirst || i != iLast) {
214 ref[i - iFirst] = tmp;
215 }
216 } while (i != iLast);
217 return (0);
218 }
219
220 template <typename... Args>
221 static inline void qConfigHelpOption(const char* name, const char* type, const char* def, const char* optname, char optnameshort, const char* preopt, char preoptshort, int32_t optionType, const char* help, Args&&... args)
222 {
223 auto settings = qConfigGetSettings(args...);
224 const bool boolType = optionType != 1 && std::is_same_v<T, bool>;
225 const char* arguments = settings.doSet ? " (" : (settings.doDefault || optionType == 1 || boolType) ? " [arg] (" : optionType == 2 ? " [...] (" : " arg (";
226 char argBuffer[4] = {0};
227 uint32_t argBufferPos = 0;
228 if (optnameshort && preoptshort) {
229 argBuffer[argBufferPos++] = '-';
230 }
231 if (optnameshort) {
232 argBuffer[argBufferPos++] = preoptshort == 0 ? '-' : preoptshort;
233 argBuffer[argBufferPos++] = optnameshort;
234 }
235 std::cout << "\t" << name << ": " << argBuffer << (optnameshort == 0 ? "" : arguments) << "--";
236 if (optname[0] == 0) {
237 std::cout << preopt << name;
238 } else {
239 std::cout << optname;
240 }
241 std::cout << (optnameshort == 0 ? arguments : ", ") << "type: " << type;
242 if (optionType == 0) {
243 std::cout << ", default: " << def;
244 }
245 if (optionType == 1) {
246 std::cout << ", sets " << name << " to " << def;
247 }
248 if (settings.checkMin) {
249 std::cout << ", minimum: " << settings.min;
250 }
251 if (settings.checkMax) {
252 std::cout << ", maximum: " << settings.max;
253 }
254 std::cout << ")\n\t\t" << help << ".\n";
255 if (settings.doSet) {
256 std::cout << "\t\tSets " << name << " to " << settings.set << ".\n";
257 } else if (settings.doDefault) {
258 std::cout << "\t\tIf no argument is supplied, " << name << " is set to " << settings.set << ".\n";
259 } else if (boolType) {
260 std::cout << "\t\tIf no argument is supplied, " << name << " is set to true.\n";
261 }
262 if (optionType == 2) {
263 std::cout << "\t\tCan be set multiple times, accepts multiple arguments.\n";
264 }
265 std::cout << "\n";
266 }
267
268 template <typename... Args>
269 static inline auto qConfigGetSettings(Args&... args)
270 {
273 return (settings);
274 }
275};
276
277static inline const char* getArg(int32_t& i, const char** argv, const int argc, bool allowOption = false)
278{
279 if (i + 1 < argc && argv[i + 1][0] && ((allowOption && argv[i + 1][0] == '-' && argv[i + 1][1] != '-') || argv[i + 1][0] != '-')) {
280 return (argv[++i]);
281 }
282 return (nullptr);
283}
284
285template <class T>
286static inline int32_t qAddOptionGeneric(qConfigSettings<T>& settings, T& ref, int32_t& i, const char** argv, const int argc, T def, std::function<T(const char*)> func, bool allowDefault = false)
287{
288 const char* arg = getArg(i, argv, argc, !allowDefault);
289 if (arg) {
290 ref = func(arg);
291 return (0);
292 } else if (allowDefault) {
293 ref = def;
294 return (0);
295 }
296 if (!settings.allowEmpty) {
297 printf("Argument missing for option %s!\n", getOptName(argv, i));
298 }
299 return (qcrArgMissing);
300}
301
302// Handling of all supported types
303template <>
304inline int32_t qAddOptionType<bool>(qConfigSettings<bool>& settings, bool& ref, int32_t& i, const char** argv, const int argc, bool /*def*/)
305{
306 return qAddOptionGeneric<bool>(
307 settings, ref, i, argv, argc, settings.doDefault ? settings.set : true, [](const char* a) -> bool {
308 return atoi(a);
309 },
310 true);
311}
312template <>
313inline int32_t qAddOptionType<int8_t>(qConfigSettings<int8_t>& settings, int8_t& ref, int32_t& i, const char** argv, const int argc, int8_t /*def*/)
314{
315 return qAddOptionGeneric<int8_t>(
316 settings, ref, i, argv, argc, settings.set, [](const char* a) -> int8_t {
317 return atoi(a);
318 },
319 settings.doDefault);
320}
321template <>
322inline int32_t qAddOptionType<uint8_t>(qConfigSettings<uint8_t>& settings, uint8_t& ref, int32_t& i, const char** argv, const int argc, uint8_t /*def*/)
323{
324 return qAddOptionGeneric<uint8_t>(
325 settings, ref, i, argv, argc, settings.set, [](const char* a) -> uint8_t {
326 return atoi(a);
327 },
328 settings.doDefault);
329}
330template <>
331inline int32_t qAddOptionType<int32_t>(qConfigSettings<int32_t>& settings, int32_t& ref, int32_t& i, const char** argv, const int argc, int32_t /*def*/)
332{
333 return qAddOptionGeneric<int32_t>(
334 settings, ref, i, argv, argc, settings.set, [](const char* a) -> int32_t {
335 return atoi(a);
336 },
337 settings.doDefault);
338}
339template <>
340inline int32_t qAddOptionType<uint32_t>(qConfigSettings<uint32_t>& settings, uint32_t& ref, int32_t& i, const char** argv, const int argc, uint32_t /*def*/)
341{
342 return qAddOptionGeneric<uint32_t>(
343 settings, ref, i, argv, argc, settings.set, [](const char* a) -> uint32_t {
344 return strtoul(a, nullptr, 0);
345 },
346 settings.doDefault);
347}
348template <>
349inline int32_t qAddOptionType<int16_t>(qConfigSettings<int16_t>& settings, int16_t& ref, int32_t& i, const char** argv, const int argc, int16_t /*def*/)
350{
351 return qAddOptionGeneric<int16_t>(
352 settings, ref, i, argv, argc, settings.set, [](const char* a) -> int16_t {
353 return atoi(a);
354 },
355 settings.doDefault);
356}
357template <>
358inline int32_t qAddOptionType<uint16_t>(qConfigSettings<uint16_t>& settings, uint16_t& ref, int32_t& i, const char** argv, const int argc, uint16_t /*def*/)
359{
360 return qAddOptionGeneric<uint16_t>(
361 settings, ref, i, argv, argc, settings.set, [](const char* a) -> uint16_t {
362 return strtoul(a, nullptr, 0);
363 },
364 settings.doDefault);
365}
366template <>
367inline int32_t qAddOptionType<int64_t>(qConfigSettings<int64_t>& settings, int64_t& ref, int32_t& i, const char** argv, const int argc, int64_t /*def*/)
368{
369 return qAddOptionGeneric<int64_t>(
370 settings, ref, i, argv, argc, settings.set, [](const char* a) -> int64_t {
371 return strtoll(a, nullptr, 0);
372 },
373 settings.doDefault);
374}
375template <>
376inline int32_t qAddOptionType<uint64_t>(qConfigSettings<uint64_t>& settings, uint64_t& ref, int32_t& i, const char** argv, const int argc, uint64_t /*def*/)
377{
378 return qAddOptionGeneric<uint64_t>(
379 settings, ref, i, argv, argc, settings.set, [](const char* a) -> uint64_t {
380 return strtoull(a, nullptr, 0);
381 },
382 settings.doDefault);
383}
384template <>
385inline int32_t qAddOptionType<float>(qConfigSettings<float>& settings, float& ref, int32_t& i, const char** argv, const int argc, float /*def*/)
386{
387 return qAddOptionGeneric<float>(
388 settings, ref, i, argv, argc, settings.set, [](const char* a) -> float {
389 return (float)atof(a);
390 },
391 settings.doDefault);
392}
393template <>
394inline int32_t qAddOptionType<double>(qConfigSettings<double>& settings, double& ref, int32_t& i, const char** argv, const int argc, double /*def*/)
395{
396 return qAddOptionGeneric<double>(
397 settings, ref, i, argv, argc, settings.set, [](const char* a) -> double {
398 return atof(a);
399 },
400 settings.doDefault);
401}
402template <>
403inline int32_t qAddOptionType<const char*>(qConfigSettings<const char*>& settings, const char*& ref, int32_t& i, const char** argv, const int argc, const char* /*def*/)
404{
405 return qAddOptionGeneric<const char*>(
406 settings, ref, i, argv, argc, settings.set, [](const char* a) -> const char* {
407 return a;
408 },
409 settings.doDefault);
410}
411template <>
412inline int32_t qAddOptionType<std::string>(qConfigSettings<std::string>& settings, std::string& ref, int32_t& i, const char** argv, const int argc, std::string /*def*/)
413{
414 return qAddOptionGeneric<std::string>(
415 settings, ref, i, argv, argc, settings.set, [](const char* a) -> std::string {
416 return a;
417 },
418 settings.doDefault);
419}
420
421// Checks and messages for additional settings
422template <typename T>
423static inline int32_t qAddOptionMinMax(qConfigSettings<T>& settings, T& ref, const char* arg)
424{
425 if (settings.checkMin && ref < settings.min) {
426 std::cout << "Invalid setting for " << arg << ": minimum threshold exceeded (" << ref << " < " << settings.min << ")!\n";
427 return (qcrMinFailure);
428 }
429 if (settings.checkMax && ref > settings.max) {
430 std::cout << "Invalid setting for " << arg << ": maximum threshold exceeded (" << ref << " > " << settings.max << ")!\n";
431 return (qcrMaxFailure);
432 }
433 return (0);
434}
435template <>
436inline int32_t qAddOptionMinMax<bool>(qConfigSettings<bool>& /*settings*/, bool& /*ref*/, const char* /*arg*/)
437{
438 return (0);
439}
440
441template <typename T>
442inline void qAddOptionMessage(qConfigSettings<T>& settings, T& ref)
443{
444 if (settings.message) {
445 std::string tmp = print_type(ref);
446 std::string msg = std::string(settings.message) + "\n";
447 printf(msg.c_str(), tmp.c_str());
448 }
449}
450
451static inline void qConfigHelp(const char* subConfig = nullptr, int32_t followSub = 0)
452{
453 if (followSub < 2) {
454 printf("Usage Info:");
455 }
456#define QCONFIG_HELP
457#include "qconfig_internal.h"
458#undef QCONFIG_HELP
459 if (followSub < 2) {
460 printf("\n");
461 }
462}
463
464// Create parser for configuration
465int32_t qConfigParse(int argc, const char** argv, const char* /*filename*/)
466{
467 for (int32_t i = 1; i < argc; i++) {
468 const char* thisoption = argv[i];
469 repeat:
470 bool found = false;
471#define QCONFIG_PARSE
472#include "qconfig_internal.h"
473#undef QCONFIG_PARSE
474 if (found == false) {
475 printf("Invalid argument: %s\n", argv[i]);
476 return (1);
477 goto repeat; // Suppress GCC warnings, this is never executed, label might be accessed from qconfig.h
478 }
479 }
480 return (0);
481}
482
483std::vector<std::function<void()>> qprint_global;
484#define QCONFIG_PRINT
485#include "qconfig_internal.h"
486#undef QCONFIG_PRINT
487
489{
490 for (auto& f : qprint_global) {
491 f();
492 }
493}
494} // end namespace qConfig
int32_t i
int32_t retVal
GLenum func
Definition glcorearb.h:778
GLint GLsizei count
Definition glcorearb.h:399
const GLdouble * v
Definition glcorearb.h:832
GLuint index
Definition glcorearb.h:781
GLuint const GLchar * name
Definition glcorearb.h:781
GLdouble f
Definition glcorearb.h:310
GLint GLint GLsizei GLint GLenum GLenum type
Definition glcorearb.h:275
typedef void(APIENTRYP PFNGLCULLFACEPROC)(GLenum mode)
GLuint GLsizei const GLchar * message
Definition glcorearb.h:2517
GLboolean GLboolean GLboolean GLboolean a
Definition glcorearb.h:1233
GLint ref
Definition glcorearb.h:291
bpo::variables_map arguments
int32_t qAddOptionType< float >(qConfigSettings< float > &settings, float &ref, int32_t &i, const char **argv, const int argc, float)
Definition qconfig.cxx:385
int32_t qAddOptionType< int8_t >(qConfigSettings< int8_t > &settings, int8_t &ref, int32_t &i, const char **argv, const int argc, int8_t)
Definition qconfig.cxx:313
void qConfigPrint()
Definition qconfig.cxx:488
std::vector< std::function< void()> > qprint_global
Definition qconfig.cxx:483
int32_t qAddOptionType< uint32_t >(qConfigSettings< uint32_t > &settings, uint32_t &ref, int32_t &i, const char **argv, const int argc, uint32_t)
Definition qconfig.cxx:340
int32_t qAddOptionType< std::string >(qConfigSettings< std::string > &settings, std::string &ref, int32_t &i, const char **argv, const int argc, std::string)
Definition qconfig.cxx:412
int32_t qAddOptionType< int64_t >(qConfigSettings< int64_t > &settings, int64_t &ref, int32_t &i, const char **argv, const int argc, int64_t)
Definition qconfig.cxx:367
int32_t qAddOptionType< uint16_t >(qConfigSettings< uint16_t > &settings, uint16_t &ref, int32_t &i, const char **argv, const int argc, uint16_t)
Definition qconfig.cxx:358
int32_t qAddOptionType< int16_t >(qConfigSettings< int16_t > &settings, int16_t &ref, int32_t &i, const char **argv, const int argc, int16_t)
Definition qconfig.cxx:349
int32_t qAddOptionType< uint8_t >(qConfigSettings< uint8_t > &settings, uint8_t &ref, int32_t &i, const char **argv, const int argc, uint8_t)
Definition qconfig.cxx:322
int32_t qAddOptionType< uint64_t >(qConfigSettings< uint64_t > &settings, uint64_t &ref, int32_t &i, const char **argv, const int argc, uint64_t)
Definition qconfig.cxx:376
int32_t qAddOptionType< bool >(qConfigSettings< bool > &settings, bool &ref, int32_t &i, const char **argv, const int argc, bool)
Definition qconfig.cxx:304
int32_t qAddOptionType< double >(qConfigSettings< double > &settings, double &ref, int32_t &i, const char **argv, const int argc, double)
Definition qconfig.cxx:394
int32_t qAddOptionType< const char * >(qConfigSettings< const char * > &settings, const char *&ref, int32_t &i, const char **argv, const int argc, const char *)
Definition qconfig.cxx:403
int32_t qConfigParse(int argc, const char **argv, const char *)
Definition qconfig.cxx:465
int32_t qAddOptionType< int32_t >(qConfigSettings< int32_t > &settings, int32_t &ref, int32_t &i, const char **argv, const int argc, int32_t)
Definition qconfig.cxx:331
std::string print_type(T val, bool precise=false)
int32_t qAddOptionMinMax< bool >(qConfigSettings< bool > &, bool &, const char *)
Definition qconfig.cxx:436
static int32_t qAddOptionMainTuple(qConfigSettings< typename qSettingsType< T >::settingsType >, T &, int32_t &, const char **, const int32_t)
Definition qconfig.cxx:124
static int32_t qAddOptionMainTuple(qConfigSettings< typename qSettingsType< T >::settingsType > settings, T &tup, int32_t &i, const char **argv, const int argc)
Definition qconfig.cxx:108
qConfigSettings(const qConfigSettings< S > v)
Definition qconfig.cxx:48
static int32_t qAddOptionMain(qConfigSettings< T > &settings, T &ref, int32_t &i, const char **argv, const int argc, T def)
Definition qconfig.cxx:84
static int32_t qAddOption(T &ref, int32_t &i, const char **argv, const int argc, T def, const char *, Args &&... args)
Definition qconfig.cxx:170
static int32_t qAddOptionArray(T *ref, int32_t count, int32_t &i, const char **argv, const int argc, const char *, Args &&... args)
Definition qconfig.cxx:197
static void qProcessSetting(qConfigSettings< T > &settings, qmin_t< T > minval)
Definition qconfig.cxx:135
static void qAddOptionSettings(qConfigSettings< T > &settings, Arg1 &&arg1, Args &&... args)
Definition qconfig.cxx:163
static int32_t qAddOptionVec(std::vector< T > &ref, int32_t &i, const char **argv, const int argc, const char *, Args &&... args)
Definition qconfig.cxx:177
static void qProcessSetting(qConfigSettings< T > &settings, qset_t< S > set)
Definition qconfig.cxx:149
static void qProcessSetting(qConfigSettings< T > &settings, qmessage_t msg)
Definition qconfig.cxx:147
static void qProcessSetting(qConfigSettings< T > &settings, qmax_t< T > maxval)
Definition qconfig.cxx:141
static void qConfigHelpOption(const char *name, const char *type, const char *def, const char *optname, char optnameshort, const char *preopt, char preoptshort, int32_t optionType, const char *help, Args &&... args)
Definition qconfig.cxx:221
static auto qConfigGetSettings(Args &... args)
Definition qconfig.cxx:269
static void qProcessSetting(qConfigSettings< T > &settings, qdef_t< S > set)
Definition qconfig.cxx:155
static void qAddOptionSettings(qConfigSettings< T > &)
Definition qconfig.cxx:161
uint64_t const void const *restrict const msg
Definition x9.h:153