Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Instance reference in Delphi?

What's the Delphi equivalent of 'this' in C++? Could you please give some examples of its use?

like image 724
W.K.S Avatar asked Jul 22 '11 22:07

W.K.S


People also ask

What is TObject in Delphi?

TObject is the root class from which all other classes descend. It has no explicit fields, but it stores a pointer to its VMT in a hidden field. It also defines a number of useful methods that all classes inherit.

What is class reference?

A class reference is a special meta type that can be used to refer to classes (not instances of them) within a certain subtree of the class hierarchy. This allows to write code that can work polymorphically with classes – for example dynamically instantiate different subclasses or call virtual static methods.

What are methods in Delphi?

The Delphi method is a process used to arrive at a group opinion or decision by surveying a panel of experts. Experts respond to several rounds of questionnaires, and the responses are aggregated and shared with the group after each round.


1 Answers

In delphi Self is the equivalent of this. It is also assignable as described in here.

like image 138
too Avatar answered Sep 18 '22 13:09

too