System.TMethod

From Appmethod Libraries
Jump to: navigation, search

Object Pascal

  TMethod = record
    Code, Data: Pointer;
  public
    class operator Equal(const Left, Right: TMethod): Boolean; inline;
    class operator NotEqual(const Left, Right: TMethod): Boolean; inline;
    class operator GreaterThan(const Left, Right: TMethod): Boolean; inline;
    class operator GreaterThanOrEqual(const Left, Right: TMethod): Boolean; inline;
    class operator LessThan(const Left, Right: TMethod): Boolean; inline;
    class operator LessThanOrEqual(const Left, Right: TMethod): Boolean; inline;
  end;

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);
};

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