#include <instantiator.h>
Public Types | |
typedef T | result_type |
A typedef for the first template parameter for this type. | |
typedef SubT | actual_type |
A typedef for the second template parameter for this type. | |
Public Member Functions | |
result_type * | operator() () const |
Same as new_instance();. | |
Static Public Member Functions | |
result_type * | new_instance () |
This creates a new SubT, which is assumed to be a subclass of T. | |
result_type * | no_instance () |
A convenience factory to assist in the registration of abstract base types. |
SubT must derive from (or be) T and must be Default Constructuable on the heap. In short, the following must be able to succeed:
T * foo = new SubT;
Definition at line 32 of file instantiator.h.
|
This creates a new SubT, which is assumed to be a subclass of T. It can be used as a factory for instantiator & class_loader. Definition at line 51 of file instantiator.h. |
|
A convenience factory to assist in the registration of abstract base types. It can be used as a factory for such types, avoiding the problem that the default factory will try to use 'new T', which won't work with abstract types. It always returns 0. Definition at line 65 of file instantiator.h. |