herald  2.0.0
Public Member Functions | Static Public Member Functions | List of all members
herald::datatype::Base64String Class Reference

Strongly, rather than stringly, typed representation of Base64 String data. Prevents incorrect initialisation or manipulation. More...

#include <base64_string.h>

Public Member Functions

 Base64String (Base64String &&other)
 Move Constructor.
 
 Base64String (const Base64String &other)=delete
 Deleted copy constructor to prevent temporary memory use.
 
 ~Base64String ()
 Custom destructor.
 
Data decode () const noexcept
 Decodes this Base64String's content into a Data instance. More...
 
std::string encoded () const noexcept
 Returns the Base64 encoding of this class as a std::string.
 

Static Public Member Functions

static bool from (const std::string &original, Base64String &toInitialise) noexcept
 Populates a Base64String from a normal std::string.
 
static Base64String encode (const Data &from) noexcept
 Creates a Base64String from an arbitrary set of bytes. More...
 

Detailed Description

Strongly, rather than stringly, typed representation of Base64 String data. Prevents incorrect initialisation or manipulation.

Member Function Documentation

◆ decode()

Data herald::datatype::Base64String::decode ( ) const
noexcept

Decodes this Base64String's content into a Data instance.

See also
Data

◆ encode()

static Base64String herald::datatype::Base64String::encode ( const Data from)
staticnoexcept

Creates a Base64String from an arbitrary set of bytes.

See also
Data

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