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

The base factory-type. More...

#include <factory.hpp>

Public Types

typedef Cont_ container_type
 
typedef container_type::key_type id_type
 
typedef container_type::value_type value_type
 
typedef container_type::mapped_type createable_type
 
typedef container_type::mapped_type mapped_type
 
typedef container_type::size_type size_type
 
typedef Ret_ created_type
 

Public Member Functions

 base (base const &)=delete
 
virtual __stdcall ~base ()
 
bool __fastcall insert (const value_type &)
 Register a specific key & manufacturing method with the factory. More...
 
bool __fastcall insert (const id_type &, const createable_type &)
 Register a specific key & manufacturing method with the factory. More...
 
const container_type::size_type __fastcall erase (const id_type &id)
 Unregister a specific key from the factory. More...
 
bool __fastcall find (const id_type &) const
 Return true if that key has been registered with the factory. More...
 
bool __fastcall empty (void) const noexcept(true)
 Return true if any key has been registered with the factory. More...
 
const size_type __fastcall size (void) const noexcept(true)
 Return the total number of unique keys registered with the factory. More...
 
void __fastcall reserve (const size_type)
 Reserve capacity for a specified number of keys with the factory. More...
 
const container_type &__fastcall createables (void) const noexcept(true)
 Access the internal associative collection used to store the keys and methods for creating the return items. More...
 
container_type &__fastcall createables (void) noexcept(true)
 Access the internal associative collection used to store the keys and methods for creating the return items. More...
 

Protected Member Functions

__stdcall base (void)
 

Protected Attributes

container_type createables_
 

Detailed Description

template<typename ID_, class Obj_, class Except_, class Ret_, class NotFound_, typename CreatFn_, class Cont_>
class jmmcg::LIBJMMCG_VER_NAMESPACE::factory::base< ID_, Obj_, Except_, Ret_, NotFound_, CreatFn_, Cont_ >

The base factory-type.

Note that this class is threading-agnostic.

Definition at line 54 of file factory.hpp.

Member Typedef Documentation

◆ container_type

template<typename ID_ , class Obj_ , class Except_ , class Ret_ , class NotFound_ , typename CreatFn_ , class Cont_ >
typedef Cont_ jmmcg::LIBJMMCG_VER_NAMESPACE::factory::base< ID_, Obj_, Except_, Ret_, NotFound_, CreatFn_, Cont_ >::container_type

Definition at line 56 of file factory.hpp.

◆ createable_type

template<typename ID_ , class Obj_ , class Except_ , class Ret_ , class NotFound_ , typename CreatFn_ , class Cont_ >
typedef container_type::mapped_type jmmcg::LIBJMMCG_VER_NAMESPACE::factory::base< ID_, Obj_, Except_, Ret_, NotFound_, CreatFn_, Cont_ >::createable_type

Definition at line 59 of file factory.hpp.

◆ created_type

template<typename ID_ , class Obj_ , class Except_ , class Ret_ , class NotFound_ , typename CreatFn_ , class Cont_ >
typedef Ret_ jmmcg::LIBJMMCG_VER_NAMESPACE::factory::base< ID_, Obj_, Except_, Ret_, NotFound_, CreatFn_, Cont_ >::created_type

Definition at line 62 of file factory.hpp.

◆ id_type

template<typename ID_ , class Obj_ , class Except_ , class Ret_ , class NotFound_ , typename CreatFn_ , class Cont_ >
typedef container_type::key_type jmmcg::LIBJMMCG_VER_NAMESPACE::factory::base< ID_, Obj_, Except_, Ret_, NotFound_, CreatFn_, Cont_ >::id_type

Definition at line 57 of file factory.hpp.

◆ mapped_type

template<typename ID_ , class Obj_ , class Except_ , class Ret_ , class NotFound_ , typename CreatFn_ , class Cont_ >
typedef container_type::mapped_type jmmcg::LIBJMMCG_VER_NAMESPACE::factory::base< ID_, Obj_, Except_, Ret_, NotFound_, CreatFn_, Cont_ >::mapped_type

Definition at line 60 of file factory.hpp.

◆ size_type

template<typename ID_ , class Obj_ , class Except_ , class Ret_ , class NotFound_ , typename CreatFn_ , class Cont_ >
typedef container_type::size_type jmmcg::LIBJMMCG_VER_NAMESPACE::factory::base< ID_, Obj_, Except_, Ret_, NotFound_, CreatFn_, Cont_ >::size_type

Definition at line 61 of file factory.hpp.

◆ value_type

template<typename ID_ , class Obj_ , class Except_ , class Ret_ , class NotFound_ , typename CreatFn_ , class Cont_ >
typedef container_type::value_type jmmcg::LIBJMMCG_VER_NAMESPACE::factory::base< ID_, Obj_, Except_, Ret_, NotFound_, CreatFn_, Cont_ >::value_type

Definition at line 58 of file factory.hpp.

Constructor & Destructor Documentation

◆ base() [1/2]

template<typename ID_ , class Obj_ , class Except_ , class Ret_ , class NotFound_ , typename CreatFn_ , class Cont_ >
jmmcg::LIBJMMCG_VER_NAMESPACE::factory::base< ID_, Obj_, Except_, Ret_, NotFound_, CreatFn_, Cont_ >::base ( base< ID_, Obj_, Except_, Ret_, NotFound_, CreatFn_, Cont_ > const &  )
delete

◆ ~base()

template<typename ID_ , class Obj_ , class Except_ , class Ret_ , class NotFound_ , typename CreatFn_ , class Cont_ >
base< ID_, Obj_, Except_, Ret_, NotFound_, CreatFn_, Cont_ >::~base ( void  )
inlinevirtual

Definition at line 31 of file factory_impl.hpp.

◆ base() [2/2]

template<typename ID_ , class Obj_ , class Except_ , class Ret_ , class NotFound_ , typename CreatFn_ , class Cont_ >
base< ID_, Obj_, Except_, Ret_, NotFound_, CreatFn_, Cont_ >::base ( void  )
inlineprotected

Definition at line 27 of file factory_impl.hpp.

Member Function Documentation

◆ createables() [1/2]

template<typename ID_ , class Obj_ , class Except_ , class Ret_ , class NotFound_ , typename CreatFn_ , class Cont_ >
const base< ID_, Obj_, Except_, Ret_, NotFound_, CreatFn_, Cont_ >::container_type & base< ID_, Obj_, Except_, Ret_, NotFound_, CreatFn_, Cont_ >::createables ( void  ) const
inlinenoexcept

Access the internal associative collection used to store the keys and methods for creating the return items.

Definition at line 65 of file factory_impl.hpp.

References jmmcg::LIBJMMCG_VER_NAMESPACE::factory::base< ID_, Obj_, Except_, Ret_, NotFound_, CreatFn_, Cont_ >::createables_.

◆ createables() [2/2]

template<typename ID_ , class Obj_ , class Except_ , class Ret_ , class NotFound_ , typename CreatFn_ , class Cont_ >
base< ID_, Obj_, Except_, Ret_, NotFound_, CreatFn_, Cont_ >::container_type & base< ID_, Obj_, Except_, Ret_, NotFound_, CreatFn_, Cont_ >::createables ( void  )
inlinenoexcept

Access the internal associative collection used to store the keys and methods for creating the return items.

Definition at line 70 of file factory_impl.hpp.

References jmmcg::LIBJMMCG_VER_NAMESPACE::factory::base< ID_, Obj_, Except_, Ret_, NotFound_, CreatFn_, Cont_ >::createables_.

◆ empty()

template<typename ID_ , class Obj_ , class Except_ , class Ret_ , class NotFound_ , typename CreatFn_ , class Cont_ >
bool base< ID_, Obj_, Except_, Ret_, NotFound_, CreatFn_, Cont_ >::empty ( void  ) const
inlinenoexcept

Return true if any key has been registered with the factory.

Definition at line 50 of file factory_impl.hpp.

References jmmcg::LIBJMMCG_VER_NAMESPACE::factory::base< ID_, Obj_, Except_, Ret_, NotFound_, CreatFn_, Cont_ >::createables_.

◆ erase()

template<typename ID_ , class Obj_ , class Except_ , class Ret_ , class NotFound_ , typename CreatFn_ , class Cont_ >
const container_type::size_type __fastcall jmmcg::LIBJMMCG_VER_NAMESPACE::factory::base< ID_, Obj_, Except_, Ret_, NotFound_, CreatFn_, Cont_ >::erase ( const id_type id)
inline

Unregister a specific key from the factory.

Definition at line 72 of file factory.hpp.

References jmmcg::LIBJMMCG_VER_NAMESPACE::factory::base< ID_, Obj_, Except_, Ret_, NotFound_, CreatFn_, Cont_ >::createables_.

◆ find()

template<typename ID_ , class Obj_ , class Except_ , class Ret_ , class NotFound_ , typename CreatFn_ , class Cont_ >
bool base< ID_, Obj_, Except_, Ret_, NotFound_, CreatFn_, Cont_ >::find ( const id_type id) const
inline

Return true if that key has been registered with the factory.

Definition at line 45 of file factory_impl.hpp.

References jmmcg::LIBJMMCG_VER_NAMESPACE::factory::base< ID_, Obj_, Except_, Ret_, NotFound_, CreatFn_, Cont_ >::createables_.

◆ insert() [1/2]

template<typename ID_ , class Obj_ , class Except_ , class Ret_ , class NotFound_ , typename CreatFn_ , class Cont_ >
bool base< ID_, Obj_, Except_, Ret_, NotFound_, CreatFn_, Cont_ >::insert ( const id_type id,
const createable_type createable 
)
inline

Register a specific key & manufacturing method with the factory.

Definition at line 40 of file factory_impl.hpp.

◆ insert() [2/2]

template<typename ID_ , class Obj_ , class Except_ , class Ret_ , class NotFound_ , typename CreatFn_ , class Cont_ >
bool base< ID_, Obj_, Except_, Ret_, NotFound_, CreatFn_, Cont_ >::insert ( const value_type createable)
inline

Register a specific key & manufacturing method with the factory.

Definition at line 35 of file factory_impl.hpp.

References jmmcg::LIBJMMCG_VER_NAMESPACE::factory::base< ID_, Obj_, Except_, Ret_, NotFound_, CreatFn_, Cont_ >::createables_.

◆ reserve()

template<typename ID_ , class Obj_ , class Except_ , class Ret_ , class NotFound_ , typename CreatFn_ , class Cont_ >
void base< ID_, Obj_, Except_, Ret_, NotFound_, CreatFn_, Cont_ >::reserve ( const size_type  sz)
inline

Reserve capacity for a specified number of keys with the factory.

Definition at line 60 of file factory_impl.hpp.

References jmmcg::LIBJMMCG_VER_NAMESPACE::factory::base< ID_, Obj_, Except_, Ret_, NotFound_, CreatFn_, Cont_ >::createables_.

◆ size()

template<typename ID_ , class Obj_ , class Except_ , class Ret_ , class NotFound_ , typename CreatFn_ , class Cont_ >
const base< ID_, Obj_, Except_, Ret_, NotFound_, CreatFn_, Cont_ >::size_type base< ID_, Obj_, Except_, Ret_, NotFound_, CreatFn_, Cont_ >::size ( void  ) const
inlinenoexcept

Return the total number of unique keys registered with the factory.

Definition at line 55 of file factory_impl.hpp.

References jmmcg::LIBJMMCG_VER_NAMESPACE::factory::base< ID_, Obj_, Except_, Ret_, NotFound_, CreatFn_, Cont_ >::createables_.

Member Data Documentation

◆ createables_


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