args-parser 6.3.3
Loading...
Searching...
No Matches
help_printer_iface.hpp
Go to the documentation of this file.
1
31#ifndef ARGS__HELP_PRINTER_IFACE_HPP__INCLUDED
32#define ARGS__HELP_PRINTER_IFACE_HPP__INCLUDED
33
34// Args include.
35#include "utils.hpp"
36
37
38namespace Args {
39
40class CmdLine;
41class Command;
42class ArgIface;
43
44
45//
46// HelpPrinterIface
47//
48
53public:
55 {
56 }
57
59 {
60 }
61
63 virtual void print(
65 OutStreamType & to ) = 0;
66
68 virtual void print(
70 const String & name,
72 OutStreamType & to,
74 Command * parent = nullptr ) = 0;
75
77 virtual void setExecutable( const String & exe ) = 0;
78
80 virtual void setAppDescription( const String & desc ) = 0;
81
83 virtual void setCmdLine( CmdLine * cmd ) = 0;
84
86 virtual void setLineLength( String::size_type length ) = 0;
87
89 virtual ArgIface * findArgument( const String & name ) = 0;
90
91private:
93}; // class HelpPrinterIface
94
95} /* namespace Args */
96
97#endif // ARGS__HELP_PRINTER_IFACE_HPP__INCLUDED
Interface for arguments.
Definition arg_iface.hpp:51
CmdLine is class that holds all rguments and parse command line arguments in the correspondence with ...
Definition cmd_line.hpp:123
Command in the command line interface.
Definition command.hpp:53
Interface for HelpPrinter.
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:42
std::string String
String type.
Definition types.hpp:324
@ Command
Command.
std::ostream OutStreamType
Out stream type.
Definition types.hpp:330
#define DISABLE_COPY(Class)
Macro for disabling copy.
Definition utils.hpp:50