|
Bash++
Bash++ compiler internal documentation
|
Represents a sequence of parsed options and non-option arguments. More...
#include <xgetopt.h>
Public Member Functions | |
| void | addOption (const ParsedOption &opt) |
| void | addNonOptionArgument (std::string_view arg) |
| OptionSequence & | operator+= (const OptionSequence &rhs) |
| auto | begin () const |
| auto | end () const |
| size_t | size () const |
| bool | empty () const |
| const ParsedOption & | operator[] (size_t index) const |
| const ParsedOption & | at (size_t index) const |
| bool | hasOption (int shortopt) const |
| Check if an option with the given shortopt was provided. | |
| const std::vector< std::string_view > & | getNonOptionArguments () const |
| Get a std::vector of all non-option arguments provided, in the order they were given. | |
Private Member Functions | |
| void | add (const OptionSequence &other) |
| Add another OptionSequence to this one. | |
Private Attributes | |
| std::vector< ParsedOption > | options |
| std::vector< std::string_view > | nonOptionArguments |
Friends | |
| OptionSequence | operator+ (OptionSequence lhs, const OptionSequence &rhs) |
Represents a sequence of parsed options and non-option arguments.
|
inlineprivate |
Add another OptionSequence to this one.
The options and non-option arguments from the other sequence are appended to this one. This is accessible via operator+= and operator+.
| other | The other OptionSequence to add |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Get a std::vector of all non-option arguments provided, in the order they were given.
|
inline |
Check if an option with the given shortopt was provided.
| shortopt | The shortopt character or unique integer identifier to check for |
|
inline |
|
inline |
|
inline |
|
friend |
|
private |
|
private |