libjmmcg  release_579_6_g8cffd
A C++ library containing an eclectic mix of useful, advanced components.
jmmcg::LIBJMMCG_VER_NAMESPACE::factory::clone< ID_, Obj_, Except_, Ret_, NotFound_, CreatFn_, Cont_ > Class Template Reference

A factory that manufactures a clone of an instance of the specified return-type for a specified key that has been registered with the factory. More...

#include <factory.hpp>

Inherits base< ID_, Obj_, Except_, std::unique_ptr< Obj_ >, not_found< ID_, std::unique_ptr< Obj_ >, Except_ >, std::unique_ptr< Obj_ >(__fastcall *)(const Obj_ &), rapid_insert_lookup::multimap< ID_, std::pair< shared_ptr< Obj_, ppd::api_lock_traits< ppd::platform_api, ppd::sequential_mode >>, std::unique_ptr< Obj_ >(__fastcall *)(const Obj_ &) > > >.

Public Types

typedef base< ID_, Obj_, Except_, Ret_, NotFound_, CreatFn_, Cont_ > base_t
 
typedef base_t::id_type id_type
 
typedef base_t::createable_type createable_type
 
typedef base_t::created_type created_type
 
typedef Cont_::mapped_type::first_type::value_type::lock_traits lock_traits
 

Public Member Functions

constexpr __stdcall clone ()
 
virtual __stdcall ~clone ()
 
virtual created_type __fastcall make (const id_type &) const
 Returns a clone of an instance of the specified return-type for a specified key that has been registered with the factory. More...
 

Detailed Description

template<typename ID_, class Obj_, class Except_, class Ret_ = std::unique_ptr<Obj_>, class NotFound_ = not_found<ID_, Ret_, Except_>, typename CreatFn_ = Ret_ (__fastcall *)(const Obj_ &), class Cont_ = rapid_insert_lookup::multimap<ID_, std::pair<shared_ptr<Obj_, ppd::api_lock_traits<ppd::platform_api, ppd::sequential_mode>>, CreatFn_> >>
class jmmcg::LIBJMMCG_VER_NAMESPACE::factory::clone< ID_, Obj_, Except_, Ret_, NotFound_, CreatFn_, Cont_ >

A factory that manufactures a clone of an instance of the specified return-type for a specified key that has been registered with the factory.

Note that this class is not thread-safe by default, at a minimum the container and shared pointer-type would need to be thread-safe.

Definition at line 135 of file factory.hpp.

Member Typedef Documentation

◆ base_t

template<typename ID_ , class Obj_ , class Except_ , class Ret_ = std::unique_ptr<Obj_>, class NotFound_ = not_found<ID_, Ret_, Except_>, typename CreatFn_ = Ret_ (__fastcall *)(const Obj_ &), class Cont_ = rapid_insert_lookup::multimap<ID_, std::pair<shared_ptr<Obj_, ppd::api_lock_traits<ppd::platform_api, ppd::sequential_mode>>, CreatFn_> >>
typedef base<ID_, Obj_, Except_, Ret_, NotFound_, CreatFn_, Cont_> jmmcg::LIBJMMCG_VER_NAMESPACE::factory::clone< ID_, Obj_, Except_, Ret_, NotFound_, CreatFn_, Cont_ >::base_t

Definition at line 137 of file factory.hpp.

◆ createable_type

template<typename ID_ , class Obj_ , class Except_ , class Ret_ = std::unique_ptr<Obj_>, class NotFound_ = not_found<ID_, Ret_, Except_>, typename CreatFn_ = Ret_ (__fastcall *)(const Obj_ &), class Cont_ = rapid_insert_lookup::multimap<ID_, std::pair<shared_ptr<Obj_, ppd::api_lock_traits<ppd::platform_api, ppd::sequential_mode>>, CreatFn_> >>
typedef base_t::createable_type jmmcg::LIBJMMCG_VER_NAMESPACE::factory::clone< ID_, Obj_, Except_, Ret_, NotFound_, CreatFn_, Cont_ >::createable_type

Definition at line 139 of file factory.hpp.

◆ created_type

template<typename ID_ , class Obj_ , class Except_ , class Ret_ = std::unique_ptr<Obj_>, class NotFound_ = not_found<ID_, Ret_, Except_>, typename CreatFn_ = Ret_ (__fastcall *)(const Obj_ &), class Cont_ = rapid_insert_lookup::multimap<ID_, std::pair<shared_ptr<Obj_, ppd::api_lock_traits<ppd::platform_api, ppd::sequential_mode>>, CreatFn_> >>
typedef base_t::created_type jmmcg::LIBJMMCG_VER_NAMESPACE::factory::clone< ID_, Obj_, Except_, Ret_, NotFound_, CreatFn_, Cont_ >::created_type

Definition at line 140 of file factory.hpp.

◆ id_type

template<typename ID_ , class Obj_ , class Except_ , class Ret_ = std::unique_ptr<Obj_>, class NotFound_ = not_found<ID_, Ret_, Except_>, typename CreatFn_ = Ret_ (__fastcall *)(const Obj_ &), class Cont_ = rapid_insert_lookup::multimap<ID_, std::pair<shared_ptr<Obj_, ppd::api_lock_traits<ppd::platform_api, ppd::sequential_mode>>, CreatFn_> >>
typedef base_t::id_type jmmcg::LIBJMMCG_VER_NAMESPACE::factory::clone< ID_, Obj_, Except_, Ret_, NotFound_, CreatFn_, Cont_ >::id_type

Definition at line 138 of file factory.hpp.

◆ lock_traits

template<typename ID_ , class Obj_ , class Except_ , class Ret_ = std::unique_ptr<Obj_>, class NotFound_ = not_found<ID_, Ret_, Except_>, typename CreatFn_ = Ret_ (__fastcall *)(const Obj_ &), class Cont_ = rapid_insert_lookup::multimap<ID_, std::pair<shared_ptr<Obj_, ppd::api_lock_traits<ppd::platform_api, ppd::sequential_mode>>, CreatFn_> >>
typedef Cont_::mapped_type::first_type::value_type::lock_traits jmmcg::LIBJMMCG_VER_NAMESPACE::factory::clone< ID_, Obj_, Except_, Ret_, NotFound_, CreatFn_, Cont_ >::lock_traits

Definition at line 141 of file factory.hpp.

Constructor & Destructor Documentation

◆ clone()

template<typename ID_ , class Obj_ , class Except_ , class Ret_ , class NotFound_ , typename CreatFn_ , class Cont_ >
constexpr jmmcg::LIBJMMCG_VER_NAMESPACE::factory::clone< ID_, Obj_, Except_, Ret_, NotFound_, CreatFn_, Cont_ >::clone ( void  )
inlineconstexpr

Definition at line 93 of file factory_impl.hpp.

◆ ~clone()

template<typename ID_ , class Obj_ , class Except_ , class Ret_ , class NotFound_ , typename CreatFn_ , class Cont_ >
jmmcg::LIBJMMCG_VER_NAMESPACE::factory::clone< ID_, Obj_, Except_, Ret_, NotFound_, CreatFn_, Cont_ >::~clone ( void  )
inlinevirtual

Definition at line 98 of file factory_impl.hpp.

Member Function Documentation

◆ make()

template<typename ID_ , class Obj_ , class Except_ , class Ret_ , class NotFound_ , typename CreatFn_ , class Cont_ >
clone< ID_, Obj_, Except_, Ret_, NotFound_, CreatFn_, Cont_ >::created_type jmmcg::LIBJMMCG_VER_NAMESPACE::factory::clone< ID_, Obj_, Except_, Ret_, NotFound_, CreatFn_, Cont_ >::make ( const id_type id) const
inlinevirtual

Returns a clone of an instance of the specified return-type for a specified key that has been registered with the factory.

Definition at line 102 of file factory_impl.hpp.


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