DUECA/DUSIME
Loading...
Searching...
No Matches
Public Member Functions | List of all members
CFSubcontractor< Xbase, Derived, Conglomerate > Class Template Reference

Specific subcontractor template. More...

#include <ConglomerateFactory.hxx>

Inheritance diagram for CFSubcontractor< Xbase, Derived, Conglomerate >:
Inheritance graph
[legend]
Collaboration diagram for CFSubcontractor< Xbase, Derived, Conglomerate >:
Collaboration graph
[legend]

Public Member Functions

 CFSubcontractor (const typename Xbase::Key &key, const std::string &description=std::string())
 Constructor, only uses the key as argument.
 
 ~CFSubcontractor ()
 Destructor.
 
Xbase::ProductBase create (const typename Xbase::Key &key, const typename Xbase::SpecBase &spec)
 Only function, create a new object.
 
void print (std::ostream &os)
 Print name and description.
 

Detailed Description

template<typename Xbase, typename Derived, typename Conglomerate>
class CFSubcontractor< Xbase, Derived, Conglomerate >

Specific subcontractor template.

Create a single instance of this subcontractor, which will be able to use the definition of the derived class (Derived) to create the desired objects of type XBase::ProductBase, for instance bare pointers, shared or intrusive pointers, etc.

The constructor of the CFSubcontractor template will register and add the subcontractor to the conglomerate.

Template Parameters
XBaseDefinition of the key type, base product type and specification type
DerivedClass defining the subcontractor's product. Needs a constructor of the type Derived(const XBase::SpecBase&);
ConglomeratClass definition of the conglomerate, needs an instance() singleton function.

Member Function Documentation

◆ create()

template<typename Xbase , typename Derived , typename Conglomerate >
Xbase::ProductBase CFSubcontractor< Xbase, Derived, Conglomerate >::create ( const typename Xbase::Key & key,
const typename Xbase::SpecBase & spec )
inlinevirtual

Only function, create a new object.

Implements SubcontractorBase< Xbase >.

◆ print()

template<typename Xbase , typename Derived , typename Conglomerate >
void CFSubcontractor< Xbase, Derived, Conglomerate >::print ( std::ostream & os)
inlinevirtual

Print name and description.

Reimplemented from SubcontractorBase< Xbase >.


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