Bayonne2 / Common C++ 2 Framework
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Member Functions | Private Attributes
EnumBase Class Reference

EnumBase provides methods to store and access algorithm enumerations of a specific algorithm type. More...

#include <ZrtpConfigure.h>

Inheritance diagram for EnumBase:
Inheritance graph
[legend]
Collaboration diagram for EnumBase:
Collaboration graph
[legend]

Public Member Functions

AlgorithmEnumgetByName (const char *name)
 Get an AlgorithmEnum by its name. More...
 
std::list< std::string > * getAllNames ()
 Return all names of all currently stored AlgorithmEnums. More...
 
int getSize ()
 Get the number of currently stored AlgorithmEnums. More...
 
AlgoTypes getAlgoType ()
 Get the AlgoTypes to which this EnumBase belongs. More...
 
AlgorithmEnumgetByOrdinal (int ord)
 Return the AlgorithmEnum by its ordinal number. More...
 
int getOrdinal (AlgorithmEnum &algo)
 Get the ordinal number of an AlgorithmEnum. More...
 

Protected Member Functions

 EnumBase (AlgoTypes algo)
 
 ~EnumBase ()
 
void insert (const char *name)
 
void insert (const char *name, int32_t klen, const char *ra, encrypt_t en, decrypt_t de, SrtpAlgorithms alId)
 

Private Attributes

AlgoTypes algoType
 
std::vector< AlgorithmEnum * > algos
 

Detailed Description

EnumBase provides methods to store and access algorithm enumerations of a specific algorithm type.

An application shall use the get / check methods to retrieve information from the preset Algorithm Enumerations.

See Also
AlgoTypes
zrtpHashes
zrtpSymCiphers
zrtpPubKeys
zrtpSasTypes
zrtpAuthLengths

Definition at line 185 of file ZrtpConfigure.h.

Constructor & Destructor Documentation

EnumBase::EnumBase ( AlgoTypes  algo)
protected
EnumBase::~EnumBase ( )
protected

Member Function Documentation

AlgoTypes EnumBase::getAlgoType ( )

Get the AlgoTypes to which this EnumBase belongs.

Returns
The AlgoTypes of this EnumBase.
See Also
AlgoTypes.
std::list<std::string>* EnumBase::getAllNames ( )

Return all names of all currently stored AlgorithmEnums.

Returns
A C++ std::list of C++ std::strings that contain the names.
AlgorithmEnum& EnumBase::getByName ( const char *  name)

Get an AlgorithmEnum by its name.

Parameters
nameThe name of the AlgorithmEnum to search.
Returns
The AlgorithmEnum if found or an invalid AlgorithmEnum if the name was not found
AlgorithmEnum& EnumBase::getByOrdinal ( int  ord)

Return the AlgorithmEnum by its ordinal number.

Parameters
ordThe ordinal number of the AlgorithmEnum.
Returns
The AlgorithmEnum if found, an invalid Algorithm otherwise.
int EnumBase::getOrdinal ( AlgorithmEnum algo)

Get the ordinal number of an AlgorithmEnum.

Parameters
algoReturn toe ordinal numer of this AlgorithmEnum.
Returns
Return the ordinal number of this AlgorithmEnum if found, -1 otherwise.
int EnumBase::getSize ( )

Get the number of currently stored AlgorithmEnums.

Returns
The number of currently stored AlgorithmEnums
void EnumBase::insert ( const char *  name)
protected
void EnumBase::insert ( const char *  name,
int32_t  klen,
const char *  ra,
encrypt_t  en,
decrypt_t  de,
SrtpAlgorithms  alId 
)
protected

Field Documentation

std::vector<AlgorithmEnum* > EnumBase::algos
private

Definition at line 254 of file ZrtpConfigure.h.

AlgoTypes EnumBase::algoType
private

Definition at line 253 of file ZrtpConfigure.h.


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