Direct-BT v3.3.0-1-gc2d430c
Direct-BT - Direct Bluetooth Programming.
Public Types | Public Member Functions | List of all members
jau::codec::base::alphabet Class Reference

Base Alphabet Specification providing the alphabet for encode() and decode(). More...

#include <base_codec.hpp>

Inheritance diagram for jau::codec::base::alphabet:
Collaboration diagram for jau::codec::base::alphabet:

Public Types

typedef int(* code_point_func) (const char c) noexcept
 

Public Member Functions

 alphabet (std::string _name, int _base, std::string_view _symbols, char _padding64, code_point_func _cpf) noexcept
 
constexpr int base () const noexcept
 The fixed base used for this alphabet. More...
 
constexpr int code_point (const char c) const noexcept
 Returns the code-point of the given character or -1 if not element of this alphabet. More...
 
constexpr const std::string & name () const noexcept
 Human readable name for this alphabet instance. More...
 
constexpr char operator[] (size_t cp) const noexcept
 Retrieve the character at given code-point of this alphabet. More...
 
constexpr char padding64 () const noexcept
 Padding symbol for base <= 64 and block encoding only. More...
 
constexpr const std::string_view & symbols () const noexcept
 The string of symbols of this alphabet. More...
 
std::string to_string () const noexcept
 

Detailed Description

Base Alphabet Specification providing the alphabet for encode() and decode().

Implementation delegates static code_point() function.

See also
encode()
decode()

Definition at line 56 of file base_codec.hpp.

Member Typedef Documentation

◆ code_point_func

typedef int(* jau::codec::base::alphabet::code_point_func) (const char c) noexcept
noexcept

Definition at line 58 of file base_codec.hpp.

Constructor & Destructor Documentation

◆ alphabet()

jau::codec::base::alphabet::alphabet ( std::string  _name,
int  _base,
std::string_view  _symbols,
char  _padding64,
code_point_func  _cpf 
)
inlinenoexcept

Definition at line 68 of file base_codec.hpp.

Member Function Documentation

◆ name()

constexpr const std::string & jau::codec::base::alphabet::name ( ) const
inlineconstexprnoexcept

Human readable name for this alphabet instance.

Definition at line 72 of file base_codec.hpp.

Here is the caller graph for this function:

◆ base()

constexpr int jau::codec::base::alphabet::base ( ) const
inlineconstexprnoexcept

The fixed base used for this alphabet.

Definition at line 75 of file base_codec.hpp.

Here is the caller graph for this function:

◆ symbols()

constexpr const std::string_view & jau::codec::base::alphabet::symbols ( ) const
inlineconstexprnoexcept

The string of symbols of this alphabet.

Definition at line 78 of file base_codec.hpp.

◆ padding64()

constexpr char jau::codec::base::alphabet::padding64 ( ) const
inlineconstexprnoexcept

Padding symbol for base <= 64 and block encoding only.

May return zero for no padding.

Definition at line 81 of file base_codec.hpp.

◆ code_point()

constexpr int jau::codec::base::alphabet::code_point ( const char  c) const
inlineconstexprnoexcept

Returns the code-point of the given character or -1 if not element of this alphabet.

Definition at line 84 of file base_codec.hpp.

◆ operator[]()

constexpr char jau::codec::base::alphabet::operator[] ( size_t  cp) const
inlineconstexprnoexcept

Retrieve the character at given code-point of this alphabet.

Definition at line 87 of file base_codec.hpp.

◆ to_string()

std::string jau::codec::base::alphabet::to_string ( ) const
inlinenoexcept

Definition at line 89 of file base_codec.hpp.

Here is the caller graph for this function:

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