#include <aliaser.h>
Public Types | |
|
typedef std::map< std::string, std::string > | map_type |
| The map used to store aliases. | |
Public Member Functions | |
| map_type & | map () |
| Returns the map of aliases-to-expansions. | |
| const map_type & | map () const |
| Const form of map(). | |
| void | alias (const std::string &al, const std::string &expanded) |
Aliases al as a shortcut for expanded. | |
| std::string | expand (const std::string &input) const |
| Works similarly to Unix shells' alias expansion:. | |
Static Public Member Functions | |
| aliaser & | instance () |
| A shared instance of this object. | |
| template<typename ContextType> aliaser & | context () |
| context() is used for getting a "context singleton" - an instance of this object which is a quasi-singleton within the given ContextType. | |
It is intended to be used in the creation of shell-like application interfaces, but may have uses elsewhere (e.g., aliases class names for class_loader<T>).
Definition at line 19 of file aliaser.h.
|
||||||||||||
|
Aliases al should be exactly one token. If expanded is empty then any existing alias al is removed, and this is the way to unset an alias. |
|
|
Works similarly to Unix shells' alias expansion:. Expands the first input token as an alias. This expansion continues until the data can no longer be expanded to a new string. It returns the expanded string, which may be identical to the input. |
|
|
A shared instance of this object. Not post-main() safe. |
1.3.7