Encapsulate a single argument. More...
#include <DwmArguments.hh>
Public Member Functions | |
| Argument (const ValueType &v, const std::string &valueName="", const std::string &help="") | |
| const ValueType & | Value () const |
| const ValueType & | Value (const ValueType &v) |
| ValueType & | Value () |
| const std::string & | ValueName () const |
| const std::string & | ValueName (const std::string &valueName) |
| const std::string & | Help () const |
| const std::string & | Help (const std::string &help) |
| const std::set< char > & | Conflicts () const |
| const std::set< char > & | Conflicts (const std::set< char > &conflicts) |
| std::string | UsageString () const |
| std::string | HelpText () const |
| Argument & | operator= (const std::string &s) |
| operator T () const | |
Static Public Member Functions | |
| static constexpr char | OptChar () |
| static constexpr bool | Required () |
| static constexpr bool | NeedsValue () |
| static std::string | IndentedText (const std::string &s) |
Protected Attributes | |
| T | _value |
Friends | |
| std::ostream & | operator<< (std::ostream &os, const Argument< T > &arg) |
| ostream operator << for Argument instances. | |
Encapsulate a single argument.
Simple class template for a command-line argument.
Pre-declare the Argument class template.
C is the character of the argument, ValueType is the type of the argument (bool for arguments that that don't take a value), Req must be true for required arguments.
This can be used directly, thought it typically is only used by OptArgs.