C++ Utilities  4.8.0
Common C++ classes and routines used by my applications such as argument parser, IO and conversion utilities
argumentparserprivate.h
Go to the documentation of this file.
1 #ifndef APPLICATION_UTILITIES_ARGUMENTPARSER_PRIVATE_H
2 #define APPLICATION_UTILITIES_ARGUMENTPARSER_PRIVATE_H
3 
4 namespace ApplicationUtilities {
5 
7  ArgumentReader(ArgumentParser &parser, const char *const *argv, const char *const *end, bool completionMode = false);
8  ApplicationUtilities::ArgumentReader &reset(const char *const *argv, const char *const *end);
9  void read();
10  void read(ArgumentVector &args);
11 
17  size_t index;
19  const char *const *argv;
21  const char *const *end;
25  const char *const *lastArgDenotation;
27  const char *argDenotation;
29  unsigned char argDenotationType;
32 };
33 }
34 
35 #endif // APPLICATION_UTILITIES_ARGUMENTPARSER_PRIVATE_H
ArgumentVector & args
The Argument instances to store the results. Sub arguments of args are considered as well...
const char * argDenotation
The currently processed abbreviation denotation (should be substring of one of the args in argv)...
Contains currently only ArgumentParser and related classes.
const char *const * argv
Points to the first argument denotation and will be incremented when a denotation has been processed...
unsigned char argDenotationType
The type of the currently processed abbreviation denotation. Unspecified if argDenotation is not set...
ArgumentParser & parser
The associated ArgumentParser instance.
The Argument class is a wrapper for command line argument information.
const char *const * lastArgDenotation
Points to the element in argv where lastArg was encountered. Unspecified if lastArg is not set...
bool completionMode
Whether completion mode is enabled. In this case reading args will be continued even if an denotation...
const char *const * end
Points to the end of the argv array.
size_t index
An index which is incremented when an argument is encountered (the current index is stored in the occ...
#define CPP_UTILITIES_EXPORT
Marks the symbol to be exported by the c++utilities library.
Argument * lastArg
The last Argument instance which could be detected. Set to nullptr in the initial call...
The ArgumentParser class provides a means for handling command line arguments.
std::vector< Argument * > ArgumentVector