args-parser 6.3.6
Loading...
Searching...
No Matches
help_printer_iface.hpp
Go to the documentation of this file.
1
2/*
3 SPDX-FileCopyrightText: 2026 Igor Mironchik <igor.mironchik@gmail.com>
4 SPDX-License-Identifier: MIT
5*/
6
7#ifndef ARGS__HELP_PRINTER_IFACE_HPP__INCLUDED
8#define ARGS__HELP_PRINTER_IFACE_HPP__INCLUDED
9
10// Args include.
11#include "utils.hpp"
12
13namespace Args
14{
15
16class CmdLine;
17class Command;
18class ArgIface;
19
20//
21// HelpPrinterIface
22//
23
28{
29public:
31 {
32 }
33
35 {
36 }
37
39 virtual void print(
41 OutStreamType &to) = 0;
42
44 virtual void print(
46 const String &name,
48 OutStreamType &to,
50 Command *parent = nullptr) = 0;
51
53 virtual void setExecutable(const String &exe) = 0;
54
56 virtual void setAppDescription(const String &desc) = 0;
57
59 virtual void setCmdLine(CmdLine *cmd) = 0;
60
62 virtual void setLineLength(String::size_type length) = 0;
63
65 virtual ArgIface *findArgument(const String &name) = 0;
66
67private:
69}; // class HelpPrinterIface
70
71} /* namespace Args */
72
73#endif // ARGS__HELP_PRINTER_IFACE_HPP__INCLUDED
Interface for arguments.
Definition arg_iface.hpp:29
CmdLine is class that holds all rguments and parse command line arguments in the correspondence with ...
Definition cmd_line.hpp:98
Command in the command line interface.
Definition command.hpp:28
virtual void setCmdLine(CmdLine *cmd)=0
Set command line.
virtual void setExecutable(const String &exe)=0
Set executable name.
virtual ArgIface * findArgument(const String &name)=0
virtual void setLineLength(String::size_type length)=0
Set line length for the help.
virtual void print(const String &name, OutStreamType &to, Command *parent=nullptr)=0
Print help for the given argument.
virtual void setAppDescription(const String &desc)=0
Set description for the application.
virtual void print(OutStreamType &to)=0
Print help for all arguments.
Definition api.hpp:18
std::ostream OutStreamType
Out stream type.
Definition types.hpp:320
std::string String
String type.
Definition types.hpp:314
#define DISABLE_COPY(Class)
Macro for disabling copy.
Definition utils.hpp:25