System.TMethod

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

TMethod = record

C++

struct DECLSPEC_DRECORD TMethod
{
public:
    void *Code;
    void *Data;
    static bool __fastcall _op_Equality(const TMethod &Left, const TMethod &Right);
    static bool __fastcall _op_Inequality(const TMethod &Left, const TMethod &Right);
    static bool __fastcall _op_GreaterThan(const TMethod &Left, const TMethod &Right);
    static bool __fastcall _op_GreaterThanOrEqual(const TMethod &Left, const TMethod &Right);
    static bool __fastcall _op_LessThan(const TMethod &Left, const TMethod &Right);
    static bool __fastcall _op_LessThanOrEqual(const TMethod &Left, const TMethod &Right);
    friend bool operator ==(const TMethod &Left, const TMethod &Right) { return TMethod::_op_Equality(Left, Right); }
    friend bool operator !=(const TMethod &Left, const TMethod &Right) { return TMethod::_op_Inequality(Left, Right); }
    friend bool operator >(const TMethod &Left, const TMethod &Right) { return TMethod::_op_GreaterThan(Left, Right); }
    friend bool operator >=(const TMethod &Left, const TMethod &Right) { return TMethod::_op_GreaterThanOrEqual(Left, Right); }
    friend bool operator <(const TMethod &Left, const TMethod &Right) { return TMethod::_op_LessThan(Left, Right); }
    friend bool operator <=(const TMethod &Left, const TMethod &Right) { return TMethod::_op_LessThanOrEqual(Left, Right); }
};

Properties

Type Visibility Source Unit Parent
record
struct
public
System.pas
System.hpp
System System

Description

Stores Code and Data fields to represent a method.

The TMethod type stores the Code and Data pointers for a method. This type can be used in a type cast of a method pointer to access the code and data parts of the method pointer.

You can also furnish a TMethod variable by assigning a Data pointer to an object, and assigning Code using MethodAddress, specifying the method name as a string parameter to that method.

See Also

Code Examples