Logo Search packages:      
Sourcecode: performous version File versions  Download package

plugin::registry< Base, Arg, Key > Class Template Reference

#include <plugin.hpp>

List of all members.

Detailed Description

template<typename Base, typename Arg = std::string const&, typename Key = std::string>
class plugin::registry< Base, Arg, Key >

A polymorphic plugin factory.

This class provides facilities for registering implementations of Base and for requesting instances of implementations by their names (of type Key), passing an argument of type Arg to the constructor of the implementation.

More generically, a Base* is returned using a handler previously registered with a specific Key, calling handler's operator()(Arg arg).

See documentation for usage examples.

Definition at line 90 of file plugin.hpp.

Public Types

typedef Arg arg_type
typedef Base base_type
typedef Key key_type

Static Public Member Functions

static iterator begin ()
static bool empty ()
static iterator end ()
static iterator find (Key const &key)
static map_t::size_type size ()

Private Types

typedef std::multimap< Key,
handler * > 

Static Private Member Functions

static map_t & map ()


class  handler
 An abstract base for handler classes. Registers itself on construct, unregisters on destruct. More...
struct  invalid_key_error
class  iterator

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

Generated by  Doxygen 1.6.0   Back to index