#include <GetoptParameter.h>
Public Member Functions | |
GetoptParameter (const icl_core::String &option, const icl_core::String &short_option, const icl_core::String &help, bool is_prefix=false) | |
bool | hasValue () const |
Check if the option also expects a value. More... | |
icl_core::String | help () const |
Get the help text. More... | |
bool | isPrefixOption () const |
Check if this is a prefix option. More... | |
icl_core::String | option () const |
Get the long option name. More... | |
icl_core::String | shortOption () const |
Get the short option name. More... | |
Private Attributes | |
bool | m_has_value |
icl_core::String | m_help |
bool | m_is_prefix |
icl_core::String | m_option |
icl_core::String | m_short_option |
Definition at line 39 of file GetoptParameter.h.
icl_core::config::GetoptParameter::GetoptParameter | ( | const icl_core::String & | option, |
const icl_core::String & | short_option, | ||
const icl_core::String & | help, | ||
bool | is_prefix = false |
||
) |
Create a new commandline parameter.
option | The long option name of this parameter. If option ends with a colon (":") then the parameter also expects a value. |
short_option | The short option name of this parameter. If this is set to the empty string then no short option is used. |
help | The help text for this parameter. |
is_prefix | Set to true if this is a prefix option. Prefix Options are options like "-o/asd/asd". |
Definition at line 27 of file GetoptParameter.cpp.
|
inline |
Check if the option also expects a value.
Definition at line 65 of file GetoptParameter.h.
|
inline |
Get the help text.
Definition at line 67 of file GetoptParameter.h.
|
inline |
Check if this is a prefix option.
Definition at line 70 of file GetoptParameter.h.
|
inline |
Get the long option name.
Definition at line 61 of file GetoptParameter.h.
|
inline |
Get the short option name.
Definition at line 63 of file GetoptParameter.h.
|
private |
Definition at line 104 of file GetoptParameter.h.
|
private |
Definition at line 103 of file GetoptParameter.h.
|
private |
Definition at line 105 of file GetoptParameter.h.
|
private |
Definition at line 101 of file GetoptParameter.h.
|
private |
Definition at line 102 of file GetoptParameter.h.