Improve documentation

This commit is contained in:
Martchus 2017-09-30 18:42:34 +02:00
parent 46bfbdd829
commit ee66c56905
2 changed files with 19 additions and 1 deletions

View File

@ -36,10 +36,16 @@ enum ArgumentDenotationType : unsigned char {
};
/*!
* \brief The ArgReader struct internally encapsulates the process of reading command line arguments.
* \class ArgumentReader
* \brief The ArgumentReader class internally encapsulates the process of reading command line arguments.
* \remarks
* - For meaning of parameter see documentation of corresponding member variables.
* - Results are stored in specified \a args and assigned sub arguments.
* - This class is explicitely *not* part of the public API.
*/
/*!
* \brief Initializes the internal reader for the specified \a parser and arguments.
*/
ArgumentReader::ArgumentReader(ArgumentParser &parser, const char *const *argv, const char *const *end, bool completionMode)
: parser(parser)
@ -260,6 +266,12 @@ void ArgumentReader::read(ArgumentVector &args)
} // while(argv != end)
}
/*!
* \class Wrapper
* \brief The Wrapper class is internally used print text which might needs to be wrapped preserving the indentation.
* \remarks This class is explicitely *not* part of the public API.
*/
ostream &operator<<(ostream &os, const Wrapper &wrapper)
{
// determine max. number of columns

View File

@ -67,6 +67,12 @@ enum class UnknownArgumentBehavior {
/*!
* \brief The ValueCompletionBehavior enum specifies the items to be considered when generating completion for an argument value.
* \remarks
* - The enumeration items are meant to be combined using the |-operator.
* - ValueCompletionBehavior::InvokeCallback is meant to initialize pre-defined values only when required in the callback assigned
* via Argument::setCallback(). Hence it makes sense to combine it with ValueCompletionBehavior::PreDefinedValues.
* - When ValueCompletionBehavior::InvokeCallback is present, the callback assigned via Argument::setCallback() might be called
* even when not all constraints are fulfilled. So, for instance, there might not be all required values present.
*/
enum class ValueCompletionBehavior : unsigned char {
None = 0, /**< no auto-completion */