System.Bindings.Factories.TBindingScopeFactory.CreateScope

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

class function CreateScope(const AObject: TObject; MetaClass: TClass): TCustomScope; overload;
class function CreateScope(const AObject: TObject; MetaClass: TClass;
out CustomScope: TCustomScope): Boolean; overload; inline;
class function CreateScope(const AObject: TObject): TCustomScope; overload;
class function CreateScope(const AObject: TObject; out CustomScope: TCustomScope): Boolean; overload; inline;

C++

__classmethod System::Bindings::Customscope::TCustomScope* __fastcall CreateScope(System::TObject* const AObject, System::TClass MetaClass)/* overload */;
__classmethod bool __fastcall CreateScope(System::TObject* const AObject, System::TClass MetaClass, /* out */ System::Bindings::Customscope::TCustomScope* &CustomScope)/* overload */;
__classmethod System::Bindings::Customscope::TCustomScope* __fastcall CreateScope(System::TObject* const AObject)/* overload */;
__classmethod bool __fastcall CreateScope(System::TObject* const AObject, /* out */ System::Bindings::Customscope::TCustomScope* &CustomScope)/* overload */;

Properties

Type Visibility Source Unit Parent
function public
System.Bindings.Factories.pas
System.Bindings.Factories.hpp
System.Bindings.Factories TBindingScopeFactory

Description

Instantiates a custom scope associated with either the type of the passed object or with the passed class reference.

The CreateScope method instantiates a custom scope associated with either the type of the passed object or with the passed class reference. There are four overloaded CreateScope methods, with their parameters described below.

Call the first overloaded CreateScope method with the parameters described below. This overloaded CreateScope method returns the custom scope instance.

Parameter Meaning
AObject The object that the custom scope will be able to use to create custom wrappers.
MetaClass The class reference to be used in the case the object is nil. MetaClass cannot be nil if the passed object is nil.

Call the second overloaded CreateScope method with the parameters described below. This overloaded CreateScope method returns True if it succeeds, False otherwise.

Parameter Meaning
AObject The object that the custom scope will be able to use to create custom wrappers.
MetaClass The class reference to be used in the case the object is nil. MetaClass cannot be nil if the passed object is nil.
CustomScope If the function succeeds, it contains a reference to the custom scope instance. If no association is found for the passed class reference, then this parameter contains nil.

Call the third overloaded CreateScope method with the parameters described below. It instantiates a custom scope associated with the type of the passed object. This overloaded CreateScope method returns the custom scope instance.

Parameter Meaning
AObject The object that the custom scope will be able to use to create custom wrappers. AObject cannot be nil.

Call the fourth overloaded CreateScope method with the parameters described below. This overloaded CreateScope method returns True if it succeeds, False otherwise.

Parameter Meaning
AObject The object that the custom scope will be able to use to create custom wrappers.
MetaClass The class reference to be used in the case the object is nil. MetaClass cannot be nil if the passed object is nil.
CustomScope If the function succeeds, it contains a reference to the custom scope instance. If no association is found for the passed class reference, then this parameter contains nil.

See Also