C++ Utilities
5.8.0
Useful C++ classes and routines such as argument parser, IO and conversion utilities
|
Go to the documentation of this file. 1 #ifndef APPLICATION_UTILITIES_ARGUMENTPARSER_PRIVATE_H
2 #define APPLICATION_UTILITIES_ARGUMENTPARSER_PRIVATE_H
12 ArgumentReader &reset(
const char *
const *argv,
const char *
const *end);
25 const char *
const *
end;
49 const char *
const m_str;
55 , m_indentation(currentIndentation)
61 #endif // APPLICATION_UTILITIES_ARGUMENTPARSER_PRIVATE_H
const char *const * end
Points to the end of the argv array.
The Argument class is a wrapper for command line argument information.
The Indentation class allows printing indentation conveniently, eg.
const char *const * argv
Points to the first argument denotation and will be incremented when a denotation has been processed.
CPP_UTILITIES_EXPORT std::ostream & operator<<(std::ostream &out, Indentation indentation)
friend std::ostream & operator<<(std::ostream &os, const Wrapper &wrapper)
ArgumentParser & parser
The associated ArgumentParser instance.
Contains all utilities provides by the c++utilities library.
The ArgumentReader class internally encapsulates the process of reading command line arguments.
const char *const * lastArgDenotation
Points to the element in argv where lastArg was encountered. Unspecified if lastArg is not set.
unsigned char argDenotationType
The type of the currently processed abbreviation denotation. Unspecified if argDenotation is not set.
The Wrapper class is internally used print text which might needs to be wrapped preserving the indent...
Argument * lastArg
The last Argument instance which could be detected. Set to nullptr in the initial call....
ArgumentVector & args
The Argument instances to store the results. Sub arguments of args are considered as well.
std::vector< Argument * > ArgumentVector
#define CPP_UTILITIES_EXPORT
Marks the symbol to be exported by the c++utilities library.
Wrapper(const char *str, Indentation currentIndentation=Indentation())
The ArgumentParser class provides a means for handling command line arguments.
bool completionMode
Whether completion mode is enabled. In this case reading args will be continued even if an denotation...
size_t index
An index which is incremented when an argument is encountered (the current index is stored in the occ...
const char * argDenotation
The currently processed abbreviation denotation (should be substring of one of the args in argv)....