#include <Translate.hh>
Public Member Functions | |
| Translate (void) | |
| Translate (T init) | |
| ~Translate (void) | |
| void | char_type (const char *, T val) |
| T | operator[] (char c) const |
| Translate a character. | |
| T & | operator[] (char c) |
| Translate a character. | |
| void | reset (void) |
| Clear the translation table. | |
| void | set_alpha (T alfval) |
| Set alphabet translation. | |
| void | set_numer (T numval) |
| Set number translation. | |
| void | set_type (const char *x, T val) |
| Reset the list of characters with the specified value. | |
| void | unset (T val) |
Remove all entries that translate to val. | |
Construct a translate table and initialize all characters to the specified value.
| void Translate< T >::char_type | ( | const char * | ccc, | |
| T | val | |||
| ) | [inline] |
Set the table to translate the specified characters to listed value.
| T Translate< T >::operator[] | ( | char | c | ) | const [inline] |
Translate a character.
Get the traslation of the specified character.
| c | Character to be translated. |
| T & Translate< T >::operator[] | ( | char | c | ) | [inline] |
Translate a character.
Get get a reference to the traslation table entry for the specified character.
| c | Character to be translated. |
| void Translate< T >::reset | ( | void | ) | [inline] |
Clear the translation table.
Reset all entries of the table to the initial value specified in the constructor.
| void Translate< T >::set_alpha | ( | T | alfval | ) | [inline] |
Set alphabet translation.
Set the translation of all alphabetic characters (a-z and A-Z) to the specified value.
| alfval | New alphabet translation value. |
| void Translate< T >::set_numer | ( | T | numval | ) | [inline] |
Set number translation.
Set the translation of all numeric characters (0-9) to the specified value.
| numval | New number translation value. |
| void Translate< T >::set_type | ( | const char * | x, | |
| T | val | |||
| ) | [inline] |
Reset the list of characters with the specified value.
Unset all translation table entries with the specified value. Then set the translation of all characters in the null-terminated string to the specified value.
| x | Null-terminated string with characters to be translated to val. | |
| val | Translation value to be reset. |
| void Translate< T >::unset | ( | T | val | ) | [inline] |
Remove all entries that translate to val.
Reset all the table entries that translate to val to the initialization value.
| val | Value to be unset. |
1.5.4