# class i2sMapper

maps integers (typically: enumeration values) to Strings. More...

Full name | `EnumBase::i2sMapper`
Definition | `#include <Enum.h>`
List of all Methods

Annotated List
Files
Globals
Hierarchy
Index

#### Public Methods

- void add (long, const char*)
- std::string lookup (long) const
- long lookup (const char *) const
- bool inRange (long) const

## Detailed Description

maps integers (typically: enumeration values) to Strings. Takes care of the fact, that an Integer may map to multiple strings (sometimes multiple enumeration values represent the same integer).

Provides a means to get the string representation of an integer and vice versa.

void add (long, const char*)

### add

adds a new int -> string mapping Does NOT take over responsibility for the pointer (i.e. it is not freed), so it is save to add constant strings provided in the program code.

std::string lookup (long)

### lookup

[const]

returns the string representation for this integer. If there are multiple strings for this integer, return a comma delimited list.

long lookup (const char *)

### lookup

[const]

returns the integer associated with the given string or -1 if the value is not found (XXX: this should throw an exception).

bool inRange (long)

### inRange

[const]

returns true, if we have an representation for the given integer.

- Author: Henner Zeller
- Generated: rrt on drom on Mon Nov 26 16:06:15 2007, using kdoc 2.0a54.