VMime
encoderFactory Class Reference

Classes

class  registeredEncoder
 

Public Member Functions

template<class E >
void registerName (const string &name)
 
shared_ptr< encodercreate (const string &name)
 
const shared_ptr< const
registeredEncoder
getEncoderByName (const string &name) const
 
size_t getEncoderCount () const
 
const shared_ptr< const
registeredEncoder
getEncoderAt (const size_t pos) const
 
const std::vector< shared_ptr
< const registeredEncoder > > 
getEncoderList () const
 

Static Public Member Functions

static shared_ptr< encoderFactorygetInstance ()
 

Detailed Description

A factory to create 'encoder' objects for the specified encoding.

Member Function Documentation

shared_ptr< encoder > create ( const string name)

Create a new encoder instance from an encoding name.

Parameters
nameencoding name (eg. "base64")
Returns
a new encoder instance for the specified encoding
Exceptions
exceptions::no_encoder_availableif no encoder is registered for this encoding

References encoderFactory::getEncoderByName().

const shared_ptr< const encoderFactory::registeredEncoder > getEncoderAt ( const size_t  pos) const

Return the registered encoder at the specified position.

Parameters
posposition of the registered encoder to return
Returns
registered encoder at the specified position
const shared_ptr< const encoderFactory::registeredEncoder > getEncoderByName ( const string name) const

Return information about a registered encoder.

Parameters
nameencoding name
Returns
information about this encoder
Exceptions
exceptions::no_encoder_availableif no encoder is registered for this encoding

References stringUtils::toLower().

Referenced by encoderFactory::create().

size_t getEncoderCount ( ) const

Return the number of registered encoders.

Returns
number of registered encoders
const std::vector< shared_ptr< const encoderFactory::registeredEncoder > > getEncoderList ( ) const

Return a list of all registered encoders.

Returns
list of registered encoders
shared_ptr< encoderFactory > getInstance ( )
static
void registerName ( const string name)

Register a new encoder by its encoding name.

Parameters
nameencoding name

References stringUtils::toLower().


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