6 #ifndef CRYPTOPP_OBJFACT_H 7 #define CRYPTOPP_OBJFACT_H 15 template <class AbstractClass>
23 virtual AbstractClass * CreateObject()
const =0;
30 template <
class AbstractClass,
class ConcreteClass>
36 return new ConcreteClass;
44 template <
class AbstractClass,
int instance=0>
56 for (
typename Map::iterator i = m_map.begin(); i != m_map.end(); ++i)
65 m_map[
name] = factory;
70 typename Map::const_iterator i = m_map.find(name);
86 std::vector<std::string> names;
87 typename Map::const_iterator iter;
88 for (iter = m_map.begin(); iter != m_map.end(); ++iter)
89 names.push_back(iter->first);
97 typedef std::map<std::string, void *>
Map;
101 template <
class AbstractClass,
int instance>
113 template <
class AbstractClass,
class ConcreteClass,
int instance = 0>
119 std::string n =
name ? std::string(
name) : std::string(ConcreteClass::StaticAlgorithmName());
132 template <
class SchemeClass>
146 template <
class SchemeClass>
160 template <
class SchemeClass>
174 template <
class SchemeClass>
Base class for all exceptions thrown by the library.
Utility functions for the Crypto++ library.
FactoryNotFound(const char *name)
void RegisterAuthenticatedSymmetricCipherDefaultFactories(const char *name=NULL)
std::vector< std::string > GetFactoryNames() const
#define NAMESPACE_BEGIN(x)
static CRYPTOPP_NOINLINE ObjectFactoryRegistry< AbstractClass, instance > & Registry(CRYPTOPP_NOINLINE_DOTDOTDOT)
Abstract base classes that provide a uniform interface to this library.
void RegisterAsymmetricCipherDefaultFactories(const char *name=NULL)
std::hash for asio::adress
Object factory for registering objects.
virtual AbstractClass * CreateObject() const =0
const ObjectFactory< AbstractClass > * GetFactory(const char *name) const
void RegisterSignatureSchemeDefaultFactories(const char *name=NULL)
void RegisterSymmetricCipherDefaultFactories(const char *name=NULL)
void RegisterFactory(const std::string &name, ObjectFactory< AbstractClass > *factory)
#define CRYPTOPP_NOINLINE_DOTDOTDOT
Object factory registry helper.
Object factory interface for registering objects.
#define CRYPTOPP_NOINLINE
AbstractClass * CreateObject(const char *name) const
AbstractClass * CreateObject() const
RegisterDefaultFactoryFor(const char *name=NULL)
std::map< std::string, void * > Map