CLI  2.9
StringDecoder Class Reference

Regular characters to key decoder. More...

#include <encoding.h>

Inheritance diagram for StringDecoder:

Public Member Functions

 StringDecoder (void)
 Default constructor. More...
 
 StringDecoder (const char *const STR_String)
 String based constructor. More...
 
virtual ~StringDecoder (void)
 Destructor. More...
 
const KEY Decode (const int I_Char)
 Push characters one by one and get the corresponding keys. More...
 
const KEY GetKey (void)
 Retrieve characters from the input string. More...
 
- Public Member Functions inherited from Object
virtual ~Object (void)=0
 Pure virtual destructor. More...
 

Additional Inherited Members

- Protected Member Functions inherited from Object
 Object (void)
 Default constructor only available to sub-classes. More...
 

Detailed Description

Regular characters to key decoder.

Manages special character encoding among others. utf-8 has the priority, then iso-8859-1 is managed when not conflicting.

Definition at line 77 of file encoding.h.

Constructor & Destructor Documentation

◆ StringDecoder() [1/2]

StringDecoder::StringDecoder ( void  )
explicit

Default constructor.

◆ StringDecoder() [2/2]

StringDecoder::StringDecoder ( const char *const  STR_String)
explicit

String based constructor.

Parameters
STR_StringEncoded input string.

◆ ~StringDecoder()

virtual StringDecoder::~StringDecoder ( void  )
virtual

Destructor.

Member Function Documentation

◆ Decode()

const KEY StringDecoder::Decode ( const int  I_Char)

Push characters one by one and get the corresponding keys.

Returns
Corresponding if it can be decoded right away. FEED_MORE if it is part of an ecncoding sequence.

Basic method used when the instance has been initialized through the default constructor.

Parameters
I_CharInput character (given as an int, the same as fread() behaves)

◆ GetKey()

const KEY StringDecoder::GetKey ( void  )

Retrieve characters from the input string.

Returns
NULL_KEY when the string has been fully read.

Based method used when the instance has been initialized through the string based constructor.


The documentation for this class was generated from the following file: