#include <ProgramOptions.h>
Protected Types | |
| enum | OptionType { opt_boolean, opt_string, opt_long } |
Protected Member Functions | |
| ProgramOption (char cShortOption, const char *pszLongOption, OptionType type, bool bHasParameter) | |
| bool | IsOption (char c) const |
| Returns true if character is this option. | |
| bool | IsOption (const char *psz) const |
| Returns true if string is this option. | |
| bool | IsDefined () const |
| char | GetShortOption () const |
| const std::string & | GetLongOption () const |
| bool | HasParameter () const |
| bool | HasShortOption () const |
| bool | HasLongOption () const |
| bool | IsCaseSensitive () const |
| Return true if short option is case sensitive. | |
| const std::string & | GetHelpText () const |
| const std::string & | GetParameterHint () const |
| OptionType | GetType () const |
| bool | GetBoolValue () const |
| void | SetBoolValue () |
| long | GetLongValue () const |
| bool | SetLongValue (long l) |
| Sets long value if within limits and returns true. | |
| const std::string & | GetStringValue () const |
| void | SetStringValue (const char *psz) |
| long | GetLongValueMin () const |
| long | GetLongValueMax () const |
Protected Attributes | |
| char | m_cShortOption |
| std::string | m_sLongOption |
| bool | m_bDefined |
| bool | m_bCaseSensitive |
| bool | m_bHasParameter |
| std::string | m_sParameterHint |
| std::string | m_sHelpText |
| OptionType | m_type |
| bool | m_bValue |
| long | m_lValue |
| long | m_lMinValue |
| long | m_lMaxValue |
| std::string | m_sValue |
Friends | |
| class | ProgramOptions |
| std::ostream & | operator<< (std::ostream &, const ProgramOption &) |
Constructor is protected and objects can only be created with ProgramOptions::AddBoolean, ProgramOptions::AddString or ProgramOptions::AddLong.
Definition at line 20 of file ProgramOptions.h.
|
|
Definition at line 23 of file ProgramOptions.h. |
|
||||||||||||||||||||
|
Definition at line 25 of file ProgramOptions.h. References m_bDefined, m_bHasParameter, m_bValue, m_cShortOption, m_lMaxValue, m_lMinValue, m_lValue, m_sLongOption, m_type, and safe_assign(). Here is the call graph for this function: ![]() |
|
|
Definition at line 64 of file ProgramOptions.h. References m_bValue. Referenced by ProgramOptions::GetBoolValue(), and operator<<(). |
|
|
Definition at line 60 of file ProgramOptions.h. References m_sHelpText. Referenced by ProgramOptions::PrintHelp(). |
|
|
Definition at line 54 of file ProgramOptions.h. References m_sLongOption. Referenced by IsOption(), operator<<(), and ProgramOptions::PrintHelp(). |
|
|
Definition at line 69 of file ProgramOptions.h. References m_lValue. Referenced by ProgramOptions::GetLongValue(), and operator<<(). |
|
|
Definition at line 88 of file ProgramOptions.h. References m_lMaxValue. Referenced by operator<<(), and SetLongValue(). |
|
|
Definition at line 87 of file ProgramOptions.h. References m_lMinValue. Referenced by operator<<(), and SetLongValue(). |
|
|
Definition at line 61 of file ProgramOptions.h. References m_sParameterHint. Referenced by ProgramOptions::PrintHelp(). |
|
|
Definition at line 53 of file ProgramOptions.h. References m_cShortOption. Referenced by IsOption(), operator<<(), and ProgramOptions::PrintHelp(). |
|
|
Definition at line 80 of file ProgramOptions.h. References m_sValue. Referenced by ProgramOptions::GetStringValue(), and operator<<(). |
|
|
Definition at line 62 of file ProgramOptions.h. References m_type. Referenced by operator<<(), and ProgramOptions::Parse(). |
|
|
Definition at line 57 of file ProgramOptions.h. References m_sLongOption. Referenced by ProgramOptions::PrintHelp(). |
|
|
Definition at line 55 of file ProgramOptions.h. References m_bHasParameter. Referenced by ProgramOptions::Parse(), and ProgramOptions::PrintHelp(). |
|
|
Definition at line 56 of file ProgramOptions.h. References m_cShortOption. Referenced by ProgramOptions::PrintHelp(). |
|
|
Return true if short option is case sensitive.
Definition at line 59 of file ProgramOptions.h. References m_bCaseSensitive. Referenced by IsOption(), and operator<<(). |
|
|
Definition at line 52 of file ProgramOptions.h. References m_bDefined. Referenced by operator<<(). |
|
|
Returns true if string is this option.
Definition at line 47 of file ProgramOptions.h. References GetLongOption(). Here is the call graph for this function: ![]() |
|
|
Returns true if character is this option.
Definition at line 39 of file ProgramOptions.h. References GetShortOption(), and IsCaseSensitive(). Referenced by ProgramOptions::GetOption(). Here is the call graph for this function: ![]() |
|
|
Definition at line 65 of file ProgramOptions.h. References m_bDefined, and m_bValue. Referenced by ProgramOptions::Parse(). |
|
|
Sets long value if within limits and returns true. Otherwize false is returned Definition at line 71 of file ProgramOptions.h. References GetLongValueMax(), GetLongValueMin(), m_bDefined, and m_lValue. Referenced by ProgramOptions::Parse(). Here is the call graph for this function: ![]() |
|
|
Definition at line 81 of file ProgramOptions.h. References m_bDefined, m_sValue, and safe_assign(). Referenced by ProgramOptions::Parse(). Here is the call graph for this function: ![]() |
|
||||||||||||
|
Definition at line 8 of file ProgramOptions.cpp. |
|
|
Definition at line 105 of file ProgramOptions.h. |
|
|
Definition at line 93 of file ProgramOptions.h. Referenced by ProgramOptions::AddBoolean(), ProgramOptions::AddLong(), ProgramOptions::AddString(), and IsCaseSensitive(). |
|
|
Definition at line 92 of file ProgramOptions.h. Referenced by IsDefined(), ProgramOption(), SetBoolValue(), SetLongValue(), and SetStringValue(). |
|
|
Definition at line 94 of file ProgramOptions.h. Referenced by HasParameter(), and ProgramOption(). |
|
|
Definition at line 99 of file ProgramOptions.h. Referenced by ProgramOptions::AddBoolean(), GetBoolValue(), ProgramOption(), and SetBoolValue(). |
|
|
Definition at line 90 of file ProgramOptions.h. Referenced by GetShortOption(), HasShortOption(), and ProgramOption(). |
|
|
Definition at line 102 of file ProgramOptions.h. Referenced by ProgramOptions::AddLong(), GetLongValueMax(), and ProgramOption(). |
|
|
Definition at line 101 of file ProgramOptions.h. Referenced by ProgramOptions::AddLong(), GetLongValueMin(), and ProgramOption(). |
|
|
Definition at line 100 of file ProgramOptions.h. Referenced by ProgramOptions::AddLong(), GetLongValue(), ProgramOption(), and SetLongValue(). |
|
|
Definition at line 96 of file ProgramOptions.h. Referenced by ProgramOptions::AddBoolean(), ProgramOptions::AddLong(), ProgramOptions::AddString(), and GetHelpText(). |
|
|
Definition at line 91 of file ProgramOptions.h. Referenced by GetLongOption(), HasLongOption(), and ProgramOption(). |
|
|
Definition at line 95 of file ProgramOptions.h. Referenced by ProgramOptions::AddLong(), ProgramOptions::AddString(), and GetParameterHint(). |
|
|
Definition at line 103 of file ProgramOptions.h. Referenced by ProgramOptions::AddString(), GetStringValue(), and SetStringValue(). |
|
|
Definition at line 97 of file ProgramOptions.h. Referenced by GetType(), and ProgramOption(). |
1.4.3