Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members  

commandl::whole_matcher Class Reference

A matcher class that matches the whole string of a key. More...

#include <whole_matcher.hpp>

Inheritance diagram for commandl::whole_matcher:

commandl::matcher List of all members.

Public Methods

 whole_matcher ()
 whole_matcher (std::vector< argument * >)
virtual ~whole_matcher ()
virtual argumentmatch (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...


Detailed Description

A matcher class that matches the whole string of a key.

This matcher matches on the whole string.


Constructor & Destructor Documentation

commandl::whole_matcher::whole_matcher  
 

commandl::whole_matcher::whole_matcher std::vector< argument * >   
 

commandl::whole_matcher::~whole_matcher   [virtual]
 


Member Function Documentation

commandl::whole_matcher * commandl::whole_matcher::clone   const [virtual]
 

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.

commandl::argument * commandl::whole_matcher::match const std::string &    key const [virtual]
 

This method tries to match the whole key exactly.

Implements commandl::matcher.

std::map< std::string, commandl::argument * > commandl::whole_matcher::resolve_keys const std::vector< argument * > &    arguments [virtual]
 

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.

std::string commandl::whole_matcher::usage_key const std::string &    key const [virtual]
 

Given a key string, it will return a value that the matcher would use to match against.

Implements commandl::matcher.

std::vector< std::string > commandl::whole_matcher::usage_keys const std::vector< std::string > &    keys const [virtual]
 

Given a vector of key strings, it will return a vector of values that the matcher would use to match against.

Implements commandl::matcher.


The documentation for this class was generated from the following files:
Generated on Sat Apr 5 21:17:29 2003 for commandl Library by doxygen1.2.15