Public Types | Public Member Functions | Public Attributes | Protected Attributes | List of all members
BankSuper< T > Class Template Reference

A Bank with additional support for brief, single char keys. More...

#include <Bank.h>

Inheritance diagram for BankSuper< T >:
Inheritance graph
[legend]
Collaboration diagram for BankSuper< T >:
Collaboration graph
[legend]

Public Types

typedef Bank< T, std::string > bank_t
 
typedef bank_t::key_t key_t
 
typedef bank_t::bank_id bank_id
 
typedef T data_t
 
- Public Types inherited from Bank< T, std::string >
typedef std::string key_t
 Public key type. (Key type used in the public interface.)
 
typedef T value_t
 Base type of cloned objects.
 
typedef ClonerBase< T > cloner_t
 
typedef std::map< std::string, cloner_t * > map_t
 Base class.
 
typedef std::set< std::string > key_set_t
 For enumerating keys. More...
 

Public Member Functions

 BankSuper (const BankSuper &bank)
 
template<class D >
D & add (const std::string &key, char brief=0)
 
template<class D >
D & add (char brief=0)
 Add something that has getName()
 
template<class D >
D & addExternal (const D &entry, const std::string &key, char brief=0)
 
void setBriefKey (char brief, const std::string &value)
 Now, D::getName() is required.
 
bool hasAlias (const std::string &value) const
 
bool hasAlias (char brief) const
 
char getAlias (const std::string &value) const
 
const drain::Dictionary< char, key_t > & getAliases () const
 
virtual const std::string & resolve (const key_t &value) const
 Given brief or long key, returns the long key .
 
void setTitle (const std::string &title)
 Set name and brief description of a program, to appear in help dumps.
 
Flagger::ivalue_t addSection (const FlagResolver::dict_t::key_t &title, const FlagResolver::dict_t::value_t index=0)
 
- Public Member Functions inherited from Bank< T, std::string >
cloner_tgetCloner (const std::string &key) const
 Return the internal static entry.
 
D & add (const std::string &key)
 Adds class D as an internal instance. More...
 
D & add ()
 
D & addExternal (const D &entry, const std::string &key)
 Adds class D using a copy constructor on an external instance. More...
 
bool has (const std::string &key) const
 Check if a cloner is defined for this key.
 
T & clone (const std::string &key) const
 Return a copy of the base instance.
 
const T & get (const std::string &key) const
 Returns the base instance.
 
T & get (const std::string &key)
 Returns the base instance.
 
map_t::const_iterator get () const
 Returns a map entry: pair<Key,D *>()
 
const map_tgetMap () const
 
void toStream (std::ostream &ostr=std::cout) const
 
key_set_tgetKeys ()
 

Public Attributes

FlagResolver::dict_t sections
 

Protected Attributes

drain::Dictionary< char, std::string > briefKeys
 
std::string title
 For example, name of the program, to appear in help dumps etc.
 
- Protected Attributes inherited from Bank< T, std::string >
key_set_t keys
 

Additional Inherited Members

- Static Public Member Functions inherited from Bank< T, std::string >
static Cloner< T, D > & getCloner ()
 
- Protected Member Functions inherited from Bank< T, std::string >
drain::ClonerBase< T > & set (const std::string &key, drain::ClonerBase< T > &cloner)
 

Detailed Description

template<class T>
class drain::BankSuper< T >

A Bank with additional support for brief, single char keys.

Consider a command like "--outputFile" abbreviated "-o".


The documentation for this class was generated from the following file: