![]() |
• System Utilities | ||||||||
|
API Links
Developer Links
|
class ConstructorDefined in:
The C4Construction.hConstructor class template encapsulates a constructor function for application-defined subclasses.
Definition
Template Parameters
Constructor
Parameters
Description
The Constructor class template encapsulates a constructor function that is called when the engine encounters an object that is a subclass of the template parameter, but is of an application-defined type. The ConstructProc type is defined as follows.
Constructor instance to encapsulate it, and then install the constructor object by calling the Constructable::InstallConstructor function.When the engine calls the constructor function specified by the proc parameter, it passes in the custom data type specified by the param template parameter, which is normally a reference to an Unpacker object. The application should examine this data (normally by calling the Unpacker::GetType function) and return a newly constructed class corresponding to that type if it is recognized. If the type is not recognized, then the function should return nullptr to indicate that the remaining installed constructor objects are to be given the opportunity to construct the subclass.
Base Classes
See Also
Constructable
|