Skip to main content
Table of Contents

ITMSFNCPersistenceIO.CreateObject Method

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

API unit family: TMSFNCPersistence Declaring type: ITMSFNCPersistenceIO Inherited from: ITMSFNCBasePersistenceIO

Syntax

FMX.TMSFNCPersistence.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.