LibCppCmd v1.0 Beta 15
C++ Command Line Parsing Library
|
A pair of a name and a value. More...
#include <NameValuePair.h>
Classes | |
class | InvalidPair |
An exception thrown for invalid NameValuePairs. More... | |
Public Member Functions | |
NameValuePair (std::string pair) | |
Constructs a new NameValuePair. | |
std::string | Name () const |
Gets the name from the NameValuePair. | |
std::string | Value () const |
Gets the value from the NameValuePair. | |
A pair of a name and a value.
A name-value pair specified in a CommandLine argument takes the form "name=value". This class separates the name and the value and stores them as a single pair with the name and value individually retrievable. A valid name without a value (i.e. "name" vs. "name=value") can also represent a name-value pair. In this case the resulting NameValuePair will have an empty value.
CmdLine::NameValuePair::NameValuePair | ( | std::string | pair | ) |
Constructs a new NameValuePair.
pair | The string used to construct the pair. |
|
inline |
Gets the name from the NameValuePair.
|
inline |
Gets the value from the NameValuePair.