tetengo 1.8.1
A multipurpose library set
Loading...
Searching...
No Matches
tetengo::text::encoder< Encoding > Class Template Reference

An encoder. More...

#include <encoder.hpp>

+ Inheritance diagram for tetengo::text::encoder< Encoding >:
+ Collaboration diagram for tetengo::text::encoder< Encoding >:

Public Types

using encoding_type = Encoding
 The encoding type.
 
using string_type = typename encoding_type::string_type
 The string type.
 
using string_view_type = typename encoding_type::string_view_type
 The string view type.
 
using encoded_string_type = typename encoding_type::encoded_string_type
 The encoded string type.
 
using encoded_string_view_type = typename encoding_type::encoded_string_view_type
 The encoded string view type.
 

Public Member Functions

virtual ~encoder ()=default
 Destroys the encoder.
 
encoded_string_type encode (const string_view_type &string_) const
 Encodes a string.
 
string_type decode (const encoded_string_view_type &encoded_string) const
 Decodes a string.
 
- Public Member Functions inherited from tetengo::text::encoder_base
virtual ~encoder_base ()=0
 Destroys the encoder base.
 

Static Public Member Functions

static const encoderinstance ()
 Returns the instance.
 

Detailed Description

template<typename Encoding>
class tetengo::text::encoder< Encoding >

An encoder.

Template Parameters
EncodingAn encoding type.

Member Function Documentation

◆ decode()

template<typename Encoding >
string_type tetengo::text::encoder< Encoding >::decode ( const encoded_string_view_type encoded_string) const
inline

Decodes a string.

Parameters
encoded_stringAn encoded string.
Returns
A decoded string.

◆ encode()

template<typename Encoding >
encoded_string_type tetengo::text::encoder< Encoding >::encode ( const string_view_type string_) const
inline

Encodes a string.

Parameters
string_A string.
Returns
An encoded string.

◆ instance()

template<typename Encoding >
static const encoder & tetengo::text::encoder< Encoding >::instance ( )
inlinestatic

Returns the instance.

Returns
The instance.

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