ApplyModelFromFile¶
-
virtual void ISubController::ApplyModelFromFile(const std::string &filename) = 0¶
Replaces this sub-controller with a new instance based on the model contained in the XML controller description file.
- Parameters
filename – String containing the path to a file containing the XML controller description to apply on this sub-controller.
- Throws
CInvalidFormatException– Invalid XML contents (see exception message for details).CInvalidOperationException– Top-controller state is not “Config”.CAccessDeniedException– Unable to open file for reading.CReadErrorException– Error while reading from the specified file.CCommunicationErrorException– Protocol error.CConnectionLostException– Connection to controller lost.CRebootedException– Controller has been rebooted since this object reference was retrieved, invalidating this reference.CIncompatibleException– Incompatible firmware version loaded.CObjectDestroyedException– Object is destroyed.
- Remarks
Equivalent to: std::dynamic_pointer_cast<ITopController>(subController->GetParent())->ApplyModelFromFile(filename,{ subController });