Description
The Construct method is called during the creation of the device object, and allows custom XML data to be supplied for the device from the XML markup for the module that is using this device. The XML node that defines the device in the module is passed into this method. Device specific settings can be passed in through the system module and retrieved here. This is the best way to allow externally configurable device settings to be provided. This devices are free to use any custom attributes, data, or child nodes on the Device node in the system module.
Usage
virtual bool Construct(IHierarchicalStorageNode& node);
Argument list
- node [IHierarchicalStorageNode&]
- The XML node which defined this device in the XML module definition
Return value
- [bool]
- True if the construction was successful, false otherwise. If a device returns false from this method, the creation of the device object will be considered to have failed, and the destructor of the device object will immediately be called.