#include <commandlineparser.h>
Public Types | |
| typedef void(T::* | PointerToMethodTakingVoid )() |
| typedef void(T::* | PointerToMethodTakingInt )(int) |
| typedef void(T::* | PointerToMethodTakingDouble )(double) |
| typedef void(T::* | PointerToMethodTakingString )(const std::string &) |
Public Member Functions | |
| CommandLineParser () | |
| void | RegisterOption (const std::string &name, const std::string &altname, PointerToMethodTakingVoid option_handler, PointerToMethodTakingString error_handler=0) |
| void | RegisterOption (const std::string &name, const std::string &altname, PointerToMethodTakingInt option_handler, PointerToMethodTakingString error_handler=0) |
| void | RegisterOption (const std::string &name, const std::string &altname, PointerToMethodTakingDouble option_handler, PointerToMethodTakingString error_handler=0) |
| void | RegisterOption (const std::string &name, const std::string &altname, PointerToMethodTakingString option_handler, PointerToMethodTakingString error_handler=0) |
| void | EnableFilenameExtraction (int max_filenames, PointerToMethodTakingString filename_handler) |
| void | Parse (int argc, char **argv) throw (ParseException) |
| std::string | GetCurrentOptionName () const |
| int | AcceptInteger () throw (InvalidArgumentException, MissingArgumentException) |
| double | AcceptDouble () throw (InvalidArgumentException, MissingArgumentException) |
| std::string | AcceptString () throw (InvalidArgumentException, MissingArgumentException) |
Private Types | |
| typedef std::vector< optspec > | optspec_vector |
| typedef optspec_vector::const_iterator | optspec_vector_const_it |
Private Attributes | |
| optspec_vector | m_optspecs |
| bool | m_filename_extraction_enabled |
| Filename extraction settings. | |
| int | m_max_filenames |
| PointerToMethodTakingString | m_filename_handler |
| int | m_argc |
| char ** | m_argv |
| int | m_curopt |
| std::string | m_curoptname |
|
|||||
|
Definition at line 138 of file commandlineparser.h. |
|
|||||
|
Definition at line 139 of file commandlineparser.h. |
|
|||||
|
Definition at line 65 of file commandlineparser.h. |
|
|||||
|
Definition at line 64 of file commandlineparser.h. |
|
|||||
|
Definition at line 66 of file commandlineparser.h. |
|
|||||
|
Definition at line 63 of file commandlineparser.h. |
|
|||||||||
|
Definition at line 178 of file commandlineparser.h. |
|
|||||||||
|
Definition at line 348 of file commandlineparser.h. |
|
|||||||||
|
Definition at line 334 of file commandlineparser.h. |
|
|||||||||
|
Definition at line 362 of file commandlineparser.h. |
|
||||||||||||||||
|
Enables extraction of leading filenames in the command line. The number of filenames retrieved is controlled by the 'max_filenames' parameter. Usually, you'll want to set it to 1 (only the first argument on the command line can be considered as a filename) or -1 (any argument that looks like a filename can be seen as a filename, without restriction on the number of filenames extracted). Definition at line 252 of file commandlineparser.h. |
|
|||||||||
|
Definition at line 329 of file commandlineparser.h. |
|
||||||||||||||||
|
Reimplemented in toxic::CLParser, and CLParser. Definition at line 261 of file commandlineparser.h. |
|
||||||||||||||||||||||||
|
Definition at line 235 of file commandlineparser.h. |
|
||||||||||||||||||||||||
|
Definition at line 218 of file commandlineparser.h. |
|
||||||||||||||||||||||||
|
Definition at line 201 of file commandlineparser.h. |
|
||||||||||||||||||||||||
|
Definition at line 184 of file commandlineparser.h. |
|
|||||
|
Definition at line 148 of file commandlineparser.h. |
|
|||||
|
Definition at line 149 of file commandlineparser.h. |
|
|||||
|
Definition at line 151 of file commandlineparser.h. |
|
|||||
|
Definition at line 152 of file commandlineparser.h. |
|
|||||
|
Filename extraction settings.
Definition at line 144 of file commandlineparser.h. |
|
|||||
|
Definition at line 146 of file commandlineparser.h. |
|
|||||
|
Definition at line 145 of file commandlineparser.h. |
|
|||||
|
Definition at line 141 of file commandlineparser.h. |
1.3.6