User Manual, Developers Guide and API Documentation

wns::Creator< T, KIND > Class Template Reference

Factory method interface to use as creator for StaticFactory. More...

#include <StaticFactory.hpp>

List of all members.

Public Member Functions

virtual KIND * create ()


Detailed Description

template<typename T, typename KIND = T>
class wns::Creator< T, KIND >

Create instances of a given class. This is the default Creator, creating instances using the new-operator and the default constructor.

Alternative implementations are possible to support different constructor signatures.

Note that there is one StaticFactory for each Creator template instantiation and thus for each constructor signature. That is, every implementation of an abstract interface has to implement the same constructor interface.

Note:
This creator does *not* support instantiation of interfaces. It is only capable of handling abstract interfaces. To implement a creator that can handle non-abstract interfaces, the create method of the Creator<KIND, KIND> specialization has be the same as the default template create method. Such a creator will not work for abstract interface classes (Referencing the new operator of an abstract class yields a compile time error.)

Definition at line 255 of file StaticFactory.hpp.


Member Function Documentation

template<typename T, typename KIND = T>
virtual KIND* wns::Creator< T, KIND >::create (  )  [inline, virtual]

Definition at line 259 of file StaticFactory.hpp.


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

Generated on Sat May 26 03:32:50 2012 for openWNS by  doxygen 1.5.5