![]() |
PIDUINO
|
Value option without value. More...
#include <popl.h>
Public Member Functions | |
| Switch (const std::string &short_name, const std::string &long_name, const std::string &description, bool *assign_to=nullptr) | |
| Switch implementation /////////////////////////////////. | |
| void | set_default (const bool &value)=delete |
| Argument | argument_type () const override |
| size_t | count () const override |
| bool | is_set () const override |
| void | assign_to (bool *var) |
| void | set_value (const bool &value) |
| bool | value (size_t idx=0) const |
| bool | has_default () const |
| bool | get_default () const |
| bool | get_default (std::ostream &out) const override |
| char | short_name () const |
| std::string | long_name () const |
| std::string | name (OptionName what_name, bool with_hypen=false) const |
| std::string | description () const |
| void | set_attribute (const Attribute &attribute) |
| Attribute | attribute () const |
Protected Member Functions | |
| void | parse (OptionName what_name, const char *value) override |
| virtual void | update_reference () |
| virtual void | add_value (const bool &value) |
| void | clear () override |
| Clear the internal data structure. | |
Protected Attributes | |
| std::unique_ptr< bool > | default_ |
| bool * | assign_to_ |
| std::vector< bool > | values_ |
| std::string | short_name_ |
| std::string | long_name_ |
| std::string | description_ |
| Attribute | attribute_ |
Value option without value.
Value option without value Does not require an argument Can be either set or not set
|
inline |
|
inlineprotectedvirtualinherited |
|
inlineoverridevirtual |
Get the Option's argument type
Implements Piduino::Option.
Definition at line 773 of file popl.h.
References Piduino::no.
|
inlineinherited |
|
inlineinherited |
Get the Option's attribute
Definition at line 542 of file popl.h.
References Piduino::Option::attribute_.
Referenced by Piduino::Option::set_attribute().
|
inlineoverrideprotectedvirtualinherited |
Clear the internal data structure.
Implements Piduino::Option.
|
inlineoverridevirtualinherited |
Check how often the Option is set on command line
Implements Piduino::Option.
|
inlineinherited |
Get the Option's description
Definition at line 532 of file popl.h.
References Piduino::Option::description_.
|
inlineinherited |
|
inlineoverridevirtualinherited |
Get the Option's default value
| out | stream to write the default value to |
Implements Piduino::Option.
|
inlineinherited |
|
inlineoverridevirtualinherited |
|
inlineinherited |
Get the Option's long name
Definition at line 516 of file popl.h.
References Piduino::Option::long_name_.
Referenced by Piduino::Option::Option().
|
inlineinherited |
Get the Option's long or short name
| what_name | the option's name to return |
| what_hyphen | preced the returned name with (double-)hypen |
Definition at line 521 of file popl.h.
References Piduino::long_name, Piduino::Option::long_name_, Piduino::short_name, and Piduino::Option::short_name_.
|
inlineoverrideprotectedvirtual |
Parse the command line option and fill the internal data structure
| what_name | short or long option name |
| value | the value as given on command line |
Implements Piduino::Option.
Definition at line 768 of file popl.h.
References Piduino::Value< bool >::add_value().
|
inlineinherited |
Set the Option's attribute
| attribute |
Definition at line 537 of file popl.h.
References Piduino::Option::attribute(), and Piduino::Option::attribute_.
|
delete |
|
inlineinherited |
|
inlineinherited |
Get the Option's short name
Definition at line 508 of file popl.h.
References Piduino::Option::short_name_.
Referenced by Piduino::Option::Option().
|
inlineprotectedvirtualinherited |
|
inlineinherited |
|
protectedinherited |
|
protectedinherited |
Definition at line 169 of file popl.h.
Referenced by Piduino::Option::attribute(), and Piduino::Option::set_attribute().
|
protectedinherited |
|
protectedinherited |
Definition at line 168 of file popl.h.
Referenced by Piduino::Option::description().
|
protectedinherited |
Definition at line 167 of file popl.h.
Referenced by Piduino::Option::long_name(), and Piduino::Option::name().
|
protectedinherited |
Definition at line 166 of file popl.h.
Referenced by Piduino::Option::name(), and Piduino::Option::short_name().
|
protectedinherited |