VisioDevKit  v2.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Properties Friends Pages
VgEngine::VgInstanceFactory Class Reference

Creates objects from their descriptor. More...

Public Member Functions

 VgInstanceFactory (VgApplication::VgIApplication *pApplication)
 Constructor. More...
 
template<typename tDescriptor >
VgEngine::VgRefPtr< typename
tDescriptor::Described > 
instantiate (VgEngine::VgConstRefPtr< tDescriptor > const &pDescriptor)
 The template instantiation to allow object instantiation through descriptors. More...
 
template<typename tDescriptor >
VgEngine::VgRefPtr< typename
tDescriptor::Described > 
instantiate (VgEngine::VgRefPtr< tDescriptor > const &pDescriptor)
 The template instantiation to allow object instantiation through descriptors. More...
 

Detailed Description

Creates objects from their descriptor.

Version
2.0

Constructor & Destructor Documentation

VgEngine::VgInstanceFactory::VgInstanceFactory ( VgApplication::VgIApplication pApplication)

Constructor.

Parameters
pApplicationThe application to associate with the instance factory object.

Member Function Documentation

template<typename tDescriptor >
VgEngine::VgRefPtr< typename tDescriptor::Described > VgEngine::VgInstanceFactory::instantiate ( VgEngine::VgConstRefPtr< tDescriptor > const &  pDescriptor)

The template instantiation to allow object instantiation through descriptors.

Warning
Even if the interface allows it, it is highly inadvisable to use objects in another VgIEngine instance than the one that holds this factory.
Parameters
pDescriptorThe descriptor that 'describes' the object, which will be used to create the object.
Returns
A pointer to the object or NULL if the descriptor was invalid.
template<typename tDescriptor >
VgEngine::VgRefPtr< typename tDescriptor::Described > VgEngine::VgInstanceFactory::instantiate ( VgEngine::VgRefPtr< tDescriptor > const &  pDescriptor)
inline

The template instantiation to allow object instantiation through descriptors.

Warning
Even if the interface allows it, it is highly inadvisable to use the created objects in another VgIApplication instance than the one that holds this factory.
Parameters
pDescriptorThe descriptor that 'describes' the object, which will be used to create the object.
Returns
A pointer to the object or NULL if the descriptor was invalid.

The documentation for this class was generated from the following file:
VisioDevKit 2.0, Visioglobe® 2013