#include <coStringTable.h>
|
std::map< const char *, int, ltstr > * | cs_ |
|
std::map< int, const char *, ltint > * | ci_ |
|
a coStringTable object may have a string or an integer as index. You can either search for the integer and get the string or search for the string and get the integer. Examples: coStringTable sample; sample.insert(177, "foo");
gives foo cout << sample[177] << endl; gives 177 cout << sample["foo"] << endl;
◆ coStringTable()
coStringTable::coStringTable |
( |
| ) |
|
◆ insert()
void coStringTable::insert |
( |
int |
number, |
|
|
const char * |
str |
|
) |
| |
Insert a pair of integer/string
- Parameters
-
number | the number belonging to the string |
str | the string to be inserted |
◆ isElement() [1/2]
bool coStringTable::isElement |
( |
const char * |
str | ) |
|
check whether a string occurs in the table
◆ isElement() [2/2]
bool coStringTable::isElement |
( |
int |
x | ) |
|
check whether an integer occurs in the table
- Parameters
-
◆ operator[]() [1/2]
int coStringTable::operator[] |
( |
const char * |
str | ) |
|
get the integer belonging to the string
- Parameters
-
◆ operator[]() [2/2]
const char * coStringTable::operator[] |
( |
int |
x | ) |
|
get the string belonging to the integer
- Parameters
-
- Returns
- the string belonging to the integer
◆ ci_
std::map<int, const char *, ltint>* covise::coStringTable::ci_ |
|
private |
◆ cs_
std::map<const char *, int, ltstr>* covise::coStringTable::cs_ |
|
private |
The documentation for this class was generated from the following files: