#include <eckit/memory/Factory.h>
template<class T>
Factory class
Public types
-
using key_t = std::
string - using product_t = T
- using builder_t = product_t::builder_t
- using builder_ptr = builder_t*
-
using storage_t = std::
map<key_ t, builder_ptr>
Public static functions
- static auto instance() -> Factory<T>&
-
static auto build_type() -> std::
string
Public functions
Friends
-
auto operator<<(std::
ostream& os, const Factory<T>& o) -> std:: ostream&
Function documentation
template<class T>
static std:: string eckit:: Factory<T>:: build_type()
Returns | class name of the type built by this factory |
---|
template<class T>
void eckit:: Factory<T>:: regist(const key_ t&,
builder_ptr)
Exceptions | |
---|---|
BadParameter | if the builder already registered |
Registers a builder
template<class T>
void eckit:: Factory<T>:: unregist(const key_ t&)
Exceptions | |
---|---|
BadParameter | if the builder is not registered |
Remove a registered builder
template<class T>
size_t eckit:: Factory<T>:: size() const
Returns | the number of builders registered to the factory |
---|