#include <muo_convert_table.h>
Inheritance diagram for krmuo::CodeTokenMap:
Public Methods | |
CodeTokenMap () | |
constructor for class CodeTokenMap | |
virtual | ~CodeTokenMap () |
class-destructor | |
virtual bool | isEncodableSign (unsigned char pSign) const |
is the given sign encodable? | |
virtual const string & | encodeSign (unsigned char pSign) const |
encode the given sign | |
bool | isDecodableToken (const string &pToken) const |
is the given token decodable ? | |
virtual unsigned char | decodeToken (const string &pToken) const |
returns sign for which the given entity stands | |
void | dumpEncodeTable () |
writes encodation tabel to stdout | |
void | dumpDecodeTable () |
writes decodation tabel to stdout | |
Protected Attributes | |
const string * | mClearToken |
pointer to the empty token | |
map< string, unsigned char > * | mDecoderMap |
map key = encoded / value = clear | |
map< unsigned char, string > * | mEncoderMap |
map key = clear / value = encoded |
each type of encodation-decodation will own a specific pair of sign-token-maps by which signs are linked to tokens and vc. these maps need be filled only once. and the use of these maps can the same for each type of encodation. this is realized using the following method:
each class being derivated from class CodeTokenMap owns specific static maps for linking signs to tokens and vc. these static maps will be filled by the constructor of these derivated subclasses. each of these subconstructors stores the addresses of theses maps into the (not stictic) pointervariables being offered by their motherclass CodeTokenMap.
and this motherclass offers the common methods for transposing a sign into a token and vc.
Definition at line 66 of file muo_convert_table.h.
|
constructor for class CodeTokenMap
normally it hasn't to do anything Definition at line 41 of file muo_convert_table.cc. |
|
class-destructor
normally it hasn't to do anything Definition at line 54 of file muo_convert_table.cc. |
|
returns sign for which the given entity stands
Definition at line 110 of file muo_convert_table.cc. References mDecoderMap. Referenced by krmuo::UrlConverter::decode(), and krmuo::Converter::decode(). |
|
encode the given sign
Definition at line 79 of file muo_convert_table.cc. References mClearToken, and mEncoderMap. Referenced by krmuo::UrlConverter::encode(), and krmuo::Converter::encode(). |
|
is the given token decodable ?
Definition at line 96 of file muo_convert_table.cc. References mDecoderMap. Referenced by krmuo::UrlConverter::decode(), and krmuo::Converter::decode(). |
|
is the given sign encodable?
Definition at line 64 of file muo_convert_table.cc. References mEncoderMap. Referenced by krmuo::UrlConverter::encode(), and krmuo::Converter::encode(). |