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

@@ -38,7 +38,7 @@
//! а также получить их значения при помощи \a argumentValue().
//!
//! \~english \section PICLI_sec1 Example
//! \~russian \section PICLI_sec0 Пример
//! \~russian \section PICLI_sec1 Пример
//! \~\code
//! int main(int argc, char ** argv) {
//! PICLI cli(argc, argv);
@@ -64,8 +64,7 @@
PICLI::PICLI(int argc, char * argv[]) {
setName("CLI");
needParse = true;
needParse = debug_ = true;
_prefix_short = "-";
_prefix_full = "--";
_count_opt = 0;

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_;
};

View File

@@ -22,8 +22,8 @@
//! \~\class PIConstChars piconstchars.h
//! \~\details
//! \~english \section PICout_sec0 Synopsis
//! \~russian \section PICout_sec0 Краткий обзор
//! \~english \section PIConstChars_sec0 Synopsis
//! \~russian \section PIConstChars_sec0 Краткий обзор
//! \~english
//! This is wrapper around \c const char * string. %PIConstChars doesn`t
//! copy string, just save pointer and size.