System.TMethod

Aus RAD Studio API Documentation
Wechseln zu: Navigation, Suche

Delphi

  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);
    bool __fastcall operator==(const TMethod& __rhs) { return TMethod::_op_Equality(*this, __rhs); };
    static bool __fastcall _op_Inequality(const TMethod &Left, const TMethod &Right);
    bool __fastcall operator!=(const TMethod& __rhs) { return TMethod::_op_Inequality(*this, __rhs); };
    static bool __fastcall _op_GreaterThan(const TMethod &Left, const TMethod &Right);
    bool __fastcall operator>(const TMethod& __rhs) { return TMethod::_op_GreaterThan(*this, __rhs); };
    static bool __fastcall _op_GreaterThanOrEqual(const TMethod &Left, const TMethod &Right);
    bool __fastcall operator>=(const TMethod& __rhs) { return TMethod::_op_GreaterThanOrEqual(*this, __rhs); };
    static bool __fastcall _op_LessThan(const TMethod &Left, const TMethod &Right);
    bool __fastcall operator<(const TMethod& __rhs) { return TMethod::_op_LessThan(*this, __rhs); };
    static bool __fastcall _op_LessThanOrEqual(const TMethod &Left, const TMethod &Right);
    bool __fastcall operator<=(const TMethod& __rhs) { return TMethod::_op_LessThanOrEqual(*this, __rhs); };
};

Eigenschaften

Typ Sichtbarkeit Quelle Unit Übergeordnet
record
struct
public
System.pas
System.hpp
System System

Beschreibung

Speichert die Code- und Datenfelder zur Repräsentation einer Methode.

TMethod speichert die Code- und Datenzeiger für eine Methode. Dieser Typ kann in Typumwandlungen von Methodenzeigern für den Zugriff auf die Code- und Datenanteile der Methodenzeiger eingesetzt werden.

Sie können eine TMethod-Variable füllen, indem Sie Daten als Zeiger auf ein Objekt und mit MethodAddress Code zuweisen und den Methodennamen als String-Parameter für diese Methode festlegen.

Siehe auch

Codebeispiele