FreeNOS
|
Represents program command line argument. More...
#include <Argument.h>
Public Member Functions | |
Argument (const char *name) | |
Class constructor. More... | |
Argument (const String &name) | |
Class constructor. More... | |
char | getIdentifier () const |
Get single character identifier. More... | |
const String & | getName () const |
Retrieve argument name. More... | |
const String & | getDescription () const |
Retrieve single line argument description. More... | |
const String & | getValue () const |
Retrieve argument option value (if any) More... | |
Size | getCount () const |
Retrieve maximum argument count (if set) More... | |
void | setIdentifier (char id) |
Set argument identifier. More... | |
void | setName (const char *name) |
Set argument name. More... | |
void | setDescription (const char *description) |
Set argument single line description. More... | |
void | setValue (const char *value) |
Set argument option value. More... | |
void | setCount (Size count) |
Set argument maximum count. More... | |
bool | operator== (const Argument &arg) const |
Equality operator. More... | |
bool | operator!= (const Argument &arg) const |
Non-equality operator. More... | |
Private Attributes | |
char | m_id |
Argument identifier. More... | |
String | m_name |
Argument name. More... | |
String | m_description |
Argument description in a single line. More... | |
String | m_value |
Optional argument value. More... | |
Size | m_count |
Maximum argument count. More... | |
Represents program command line argument.
Definition at line 35 of file Argument.h.
Argument::Argument | ( | const char * | name | ) |
Argument::Argument | ( | const String & | name | ) |
Size Argument::getCount | ( | ) | const |
Retrieve maximum argument count (if set)
Definition at line 39 of file Argument.cpp.
References m_count.
Referenced by ArgumentParser::registerPositional().
const String & Argument::getDescription | ( | ) | const |
Retrieve single line argument description.
Definition at line 49 of file Argument.cpp.
References m_description.
char Argument::getIdentifier | ( | ) | const |
Get single character identifier.
Definition at line 34 of file Argument.cpp.
References m_id.
const String & Argument::getName | ( | ) | const |
Retrieve argument name.
Definition at line 44 of file Argument.cpp.
References m_name.
Referenced by ArgumentContainer::addFlag(), and ArgumentContainer::get().
const String & Argument::getValue | ( | ) | const |
Retrieve argument option value (if any)
Definition at line 54 of file Argument.cpp.
References m_value.
Referenced by ArgumentContainer::get().
bool Argument::operator!= | ( | const Argument & | arg | ) | const |
Non-equality operator.
arg | Argument reference |
Definition at line 89 of file Argument.cpp.
References m_id.
bool Argument::operator== | ( | const Argument & | arg | ) | const |
Equality operator.
arg | Argument reference |
Definition at line 84 of file Argument.cpp.
References m_id.
void Argument::setCount | ( | Size | count | ) |
Set argument maximum count.
count | New argument maximum count |
Definition at line 79 of file Argument.cpp.
References m_count.
Referenced by ArgumentParser::registerPositional().
void Argument::setDescription | ( | const char * | description | ) |
Set argument single line description.
description | New argument description |
Definition at line 69 of file Argument.cpp.
References m_description.
Referenced by ArgumentParser::registerFlag(), and ArgumentParser::registerPositional().
void Argument::setIdentifier | ( | char | id | ) |
Set argument identifier.
id | Argument identifier |
Definition at line 59 of file Argument.cpp.
References m_id.
Referenced by ArgumentParser::registerFlag().
void Argument::setName | ( | const char * | name | ) |
Set argument name.
name | New argument name |
Definition at line 64 of file Argument.cpp.
References m_name.
void Argument::setValue | ( | const char * | value | ) |
Set argument option value.
value | New argument option value |
Definition at line 74 of file Argument.cpp.
References m_value.
Referenced by ArgumentParser::parse().
|
private |
Maximum argument count.
Definition at line 156 of file Argument.h.
Referenced by getCount(), and setCount().
|
private |
Argument description in a single line.
Definition at line 150 of file Argument.h.
Referenced by getDescription(), and setDescription().
|
private |
Argument identifier.
Definition at line 144 of file Argument.h.
Referenced by getIdentifier(), operator!=(), operator==(), and setIdentifier().
|
private |
|
private |
Optional argument value.
Definition at line 153 of file Argument.h.
Referenced by getValue(), and setValue().