doc, small fixes

This commit is contained in:
2022-05-08 19:23:52 +03:00
parent 460519c075
commit 3107949e6f
24 changed files with 1061 additions and 406 deletions

View File

@@ -26,15 +26,15 @@
#ifndef PICLI_H
#define PICLI_H
#include "piobject.h"
#include "pistringlist.h"
#include "piset.h"
//! \ingroup Core
//! \~\brief
//! \~english Command-Line parser.
//! \~russian Парсер командной строки.
class PIP_EXPORT PICLI: public PIObject
class PIP_EXPORT PICLI
{
PIOBJECT_SUBCLASS(PICLI, PIObject)
public:
//! \~english Constructor
@@ -98,6 +98,11 @@ public:
void setMandatoryArgumentsCount(const int count) {_count_mand = count; needParse = true;}
void setOptionalArgumentsCount(const int count) {_count_opt = count; needParse = true;}
bool debug() const {return debug_;}
void setDebug(bool debug) {debug_ = debug;}
PIConstChars className() const {return "PICLI";}
PIString name() const {return PIStringAscii("CLI");}
private:
struct Argument {
Argument() {has_value = found = false;}
@@ -116,7 +121,7 @@ private:
PISet<PIString> keys_full, keys_short;
PIVector<Argument> _args;
int _count_mand, _count_opt;
bool needParse;
bool needParse, debug_;
};