Skip to main content
Table of Contents

TTMSMCPPersistence.CreateObject Method

Creates a new instance of the named class, verifying it descends from the given base class.

API unit family: TMS.MCP.Persistence Declaring type: TTMSMCPPersistence

Syntax

TMS.MCP.Persistence.hppPascalC++
class function CreateObject(const AClassName: string; BaseClass: TClass): TObject;
__classmethod System::TObject* __fastcall CreateObject(const System::UnicodeString AClassName, System::TClass BaseClass);

Parameters

Name Description
AClassName The class name to instantiate.
BaseClass The required base class; the result must be an instance of this class or a descendant.

Returns

A new object instance, or nil if the class was not found or does not descend from the base class.