Skip to main content
Table of Contents

ITMSMCPPersistenceIO.CreateObject Method

Creates and returns a new instance of the class identified by AClassName, constrained to be a descendant of ABaseClass.

API unit family: TMS.MCP.Persistence Declaring type: ITMSMCPPersistenceIO Inherited from: ITMSMCPBasePersistenceIO

Syntax

TMS.MCP.Persistence.hppPascalC++
function CreateObject(const AClassName: string; const ABaseClass: TClass): TObject;
virtual System::TObject* __fastcall CreateObject(const System::UnicodeString AClassName, const System::TClass ABaseClass) = 0;

Parameters

Name Description
AClassName Fully-qualified class name to instantiate.
ABaseClass Required base class; the factory must refuse to create objects that are not descendants of this class.

Returns

The newly created object, or nil if the class name could not be resolved or does not descend from ABaseClass.