Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
base64Layer Class Reference

An output filter layer to write base-64 encoded content. More...

Inheritance diagram for base64Layer:
Inheritance graph
[legend]

Public Member Functions

 base64Layer (std::ostream &os)
 
 ~base64Layer ()
 
void write (const char *s, std::streamsize n)
 
void reset ()
 
bool close ()
 

Static Public Member Functions

static std::size_t encodedLength (std::size_t n)
 

Protected Member Functions

void add (char c)
 

Detailed Description

An output filter layer to write base-64 encoded content.

Base64 encoding according to RFC 4648 specification (https://tools.ietf.org/html/rfc4648#page-5). It is the obligation of the caller to avoid using normal output while the base-64 encoding layer is actively used.

Source files

Definition at line 51 of file base64Layer.H.

Constructor & Destructor Documentation

◆ base64Layer()

base64Layer ( std::ostream &  os)
explicit

Definition at line 100 of file base64Layer.C.

◆ ~base64Layer()

Definition at line 111 of file base64Layer.C.

Member Function Documentation

◆ add()

void add ( char  c)
protected

Definition at line 78 of file base64Layer.C.

References Foam::constant::universal::c.

Referenced by foamVtkBase64Layer::write().

Here is the caller graph for this function:

◆ encodedLength()

std::size_t encodedLength ( std::size_t  n)
static

Definition at line 45 of file base64Layer.C.

References n.

Referenced by foamVtkBase64Layer::encodedLength().

Here is the caller graph for this function:

◆ write()

void write ( const char *  s,
std::streamsize  n 
)

Definition at line 119 of file base64Layer.C.

References Foam::add(), n, and s.

Here is the call graph for this function:

◆ reset()

void reset ( )

Definition at line 128 of file base64Layer.C.

◆ close()

bool close ( )

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