#include <whole_matcher.hpp>
Inheritance diagram for commandl::whole_matcher:
Public Methods | |
whole_matcher () | |
whole_matcher (std::vector< argument * >) | |
virtual | ~whole_matcher () |
virtual argument * | match (const std::string &) const |
This method tries to match the whole key exactly. More... | |
virtual std::string | usage_key (const std::string &) const |
Given a key string, it will return a value that the matcher would use to match against. More... | |
virtual std::vector< std::string > | usage_keys (const std::vector< std::string > &) const |
Given a vector of key strings, it will return a vector of values that the matcher would use to match against. More... | |
virtual std::map< std::string, argument * > | resolve_keys (const std::vector< argument * > &) |
This method performs the task of providing unique keys. More... | |
virtual whole_matcher * | clone () const |
This method returns a newed copy of this object. More... |
This matcher matches on the whole string.
|
|
|
|
|
|
|
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 tries to match the whole key exactly.
Implements commandl::matcher. |
|
This method performs the task of providing unique keys.
For this class, doing so involves taking each of the whole strings from the potential keys provided by the arguments. If there is a conflict between two potential keys (if one of arg1's keys was "f" and and one of arg2's keys was "f"), then this method will throw. Implements commandl::matcher. |
|
Given a key string, it will return a value that the matcher would use to match against.
Implements commandl::matcher. |
|
Given a vector of key strings, it will return a vector of values that the matcher would use to match against.
Implements commandl::matcher. |