Main Page | Class Hierarchy | Class List | Directories | File List | Class Members | File Members

krmuo::CodeTokenMap Class Reference

for managing the content of tokens for codations More...

#include <muo_convert_table.h>

Inheritance diagram for krmuo::CodeTokenMap:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 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

Detailed Description

for managing the content of tokens for codations

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 & Destructor Documentation

krmuo::CodeTokenMap::CodeTokenMap  ) 
 

constructor for class CodeTokenMap

normally it hasn't to do anything

Definition at line 41 of file muo_convert_table.cc.

krmuo::CodeTokenMap::~CodeTokenMap  )  [virtual]
 

class-destructor

normally it hasn't to do anything

Definition at line 54 of file muo_convert_table.cc.


Member Function Documentation

unsigned char krmuo::CodeTokenMap::decodeToken const string &  pToken  )  const [virtual]
 

returns sign for which the given entity stands

Parameters:
pToken = string, which shall be decoded
Returns:
result of the decodation

Definition at line 110 of file muo_convert_table.cc.

References mDecoderMap.

Referenced by krmuo::UrlConverter::decode(), and krmuo::Converter::decode().

const string & krmuo::CodeTokenMap::encodeSign unsigned char  pSign  )  const [virtual]
 

encode the given sign

Parameters:
pSign = sign, which shall be encoded
Returns:
result of the encodation (pointer to the HtmlCodeTokenMap

Definition at line 79 of file muo_convert_table.cc.

References mClearToken, and mEncoderMap.

Referenced by krmuo::UrlConverter::encode(), and krmuo::Converter::encode().

bool krmuo::CodeTokenMap::isDecodableToken const string &  pToken  )  const
 

is the given token decodable ?

Parameters:
pToken = string, which shall be decoded
Returns:
true if it is an decodable string otherwise false

Definition at line 96 of file muo_convert_table.cc.

References mDecoderMap.

Referenced by krmuo::UrlConverter::decode(), and krmuo::Converter::decode().

bool krmuo::CodeTokenMap::isEncodableSign unsigned char  pSign  )  const [virtual]
 

is the given sign encodable?

Parameters:
pSign = sign, which shall be encoded
Returns:
true if it is an encodable sign otherwise false

Definition at line 64 of file muo_convert_table.cc.

References mEncoderMap.

Referenced by krmuo::UrlConverter::encode(), and krmuo::Converter::encode().


The documentation for this class was generated from the following files:
Generated on Sat Mar 4 11:55:09 2006 for MRPROJEXT by  doxygen 1.4.1