Libmacro  0.2
Libmacro is an extensible macro and hotkey library.
mcr::Contract< T > Class Template Referencefinal

#include <contract.h>

Public Member Functions

 Contract (const T &notFound)
 
 Contract (const Contract &)=default
 
 ~Contract ()=default
 
Contractoperator= (const Contract &)=default
 
value (const std::string &name) const
 
value (const char *name) const
 
bool empty () const
 
maximum () const
 
const char * name (T value) const
 
void set (T value, const std::string &name)
 
void add (T value, const std::string &addName)
 
void add (T value, const char *const *addNames, size_t count)
 
void setMap (T value, const std::string &name, const char *const *addNames, size_t count)
 
void clear ()
 

Public Attributes

notFound
 
std::map< T, std::string > map
 
std::map< std::string, T, string_less_cirmap
 

Detailed Description

template<typename T>
class mcr::Contract< T >

Map any type of value to its name, and vice versa.

Definition at line 40 of file contract.h.

Constructor & Destructor Documentation

§ Contract()

template<typename T >
mcr::Contract< T >::Contract ( const T &  notFound)
inline

ctor

Definition at line 49 of file contract.h.

§ ~Contract()

template<typename T >
mcr::Contract< T >::~Contract ( )
default

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