template<class T>
eckit::Factory class

Public types

using product_t = T
using builder_t = typename product_t::builder_t
using key_t = std::string
using storage_t = std::map<key_t, builder_t*>

Public static functions

static auto instance() -> Factory<T>&
static auto build_type() -> std::string

Constructors, destructors, conversion operators

Factory(const Factory&) deleted
Factory(Factory&&) deleted

Public functions

void operator=(const Factory&) deleted
void operator=(Factory&&) deleted
auto exists(const key_t&) const -> bool
void regist(const key_t&, builder_t*)
void unregist(const key_t&)
auto get(const key_t&) const -> const builder_t&
auto size() const -> size_t
auto keys() const -> std::vector<key_t>

Friends

auto operator<<(std::ostream& os, const Factory<T>& o) -> std::ostream&

Function documentation

template<class T _1>
static Factory<T>& eckit::Factory<_1>::instance()

Returns the instance of this singleton factory

template<class T _1>
static std::string eckit::Factory<_1>::build_type()

Returns class name of the type built by this factory

template<class T _1>
bool eckit::Factory<_1>::exists(const key_t&) const

Checks if a builder is registered

template<class T _1>
void eckit::Factory<_1>::regist(const key_t&, builder_t*)

Exceptions
BadParameter if the builder already registered

Registers a builder

template<class T _1>
void eckit::Factory<_1>::unregist(const key_t&)

Exceptions
BadParameter if the builder is not registered

Remove a registered builder

template<class T _1>
const builder_t& eckit::Factory<_1>::get(const key_t&) const

Gets the builder registered to the associated key

template<class T _1>
size_t eckit::Factory<_1>::size() const

Returns the number of builders registered to the factory

template<class T _1>
std::vector<key_t> eckit::Factory<_1>::keys() const

Returns the builder keys registered to the factory
This website is beyond its original expiry date and the content may be out of date. The site owner has been notified and may choose to extend the expiry date and remove this banner. If you have any questions about this, please visit our support portal.