argagg
|
Contains two maps which aid in option parsing. The first map, short_map, maps from a short flag (just a character) to a pointer to the original definition that the flag represents. The second map, long_map, maps from a long flag (an std::string) to a pointer to the original definition that the flag represents. More...
#include <argagg.hpp>
Public Member Functions | |
bool | known_short_flag (const char flag) const |
Returns true if the provided short flag exists in the map object. | |
const definition * | get_definition_for_short_flag (const char flag) const |
If the short flag exists in the map object then it is returned by this method. If it doesn't then nullptr will be returned. | |
bool | known_long_flag (const std::string &flag) const |
Returns true if the provided long flag exists in the map object. | |
const definition * | get_definition_for_long_flag (const std::string &flag) const |
If the long flag exists in the map object then it is returned by this method. If it doesn't then nullptr will be returned. | |
Public Attributes | |
std::array< const definition *, 256 > | short_map |
Maps from a short flag (just a character) to a pointer to the original definition that the flag represents. | |
std::unordered_map< std::string, const definition * > | long_map |
Maps from a long flag (an std::string) to a pointer to the original definition that the flag represents. | |
Contains two maps which aid in option parsing. The first map, short_map, maps from a short flag (just a character) to a pointer to the original definition that the flag represents. The second map, long_map, maps from a long flag (an std::string) to a pointer to the original definition that the flag represents.
This object is usually a temporary that only exists during the parsing operation. It is typically constructed using validate_definitions().
Definition at line 572 of file argagg.hpp.
|
inline |
If the long flag exists in the map object then it is returned by this method. If it doesn't then nullptr will be returned.
Definition at line 1098 of file argagg.hpp.
|
inline |
If the short flag exists in the map object then it is returned by this method. If it doesn't then nullptr will be returned.
Definition at line 1081 of file argagg.hpp.
|
inline |
Returns true if the provided long flag exists in the map object.
Definition at line 1089 of file argagg.hpp.
|
inline |
Returns true if the provided short flag exists in the map object.
Definition at line 1073 of file argagg.hpp.
std::unordered_map<std::string, const definition*> argagg::parser_map::long_map |
Maps from a long flag (an std::string) to a pointer to the original definition that the flag represents.
Definition at line 586 of file argagg.hpp.
std::array<const definition*, 256> argagg::parser_map::short_map |
Maps from a short flag (just a character) to a pointer to the original definition that the flag represents.
Definition at line 579 of file argagg.hpp.