#include <char_matcher.hpp>
Inheritance diagram for commandl::char_matcher:
Public Methods | |
char_matcher () | |
A constructor which should be followed by a call to set_arguments(). More... | |
char_matcher (std::vector< argument * >) | |
Primary constructor for this class. More... | |
virtual | ~char_matcher () |
virtual argument * | match (const std::string &) const |
This method will perform matching on a string. More... | |
virtual std::string | usage_key (const std::string &) const |
virtual std::vector< std::string > | usage_keys (const std::vector< std::string > &) const |
virtual std::map< std::string, argument * > | resolve_keys (const std::vector< argument * > &) |
This method performs the task of providing unique keys. More... | |
virtual char_matcher * | clone () const |
This method returns a newed copy of this object. More... |
This matcher only matches single character keys.
|
A constructor which should be followed by a call to set_arguments().
|
|
Primary constructor for this class.
|
|
|
|
This method returns a newed copy of this object.
Since the pointer returned has been newed, it is imperative that callers of this method are sure to call delete on the pointer. Implements commandl::matcher. |
|
This method will perform matching on a string.
However, the string should only be a single character long. Anything else will cause an exception. Implements commandl::matcher. |
|
This method performs the task of providing unique keys.
For this class, doing so involves taking only the first character from the potential keys provided by the arguments. If there is a conflict between the first letters of two potential keys (like "file" and "forget"), then this method will throw. Implements commandl::matcher. |
|
Implements commandl::matcher. |
|
Implements commandl::matcher. |