Calls of inherited procedures and functions |
Top Previous Next |
What is translated > Routines > Calls of inherited procedures and functions
For each class, which inherits from another one a typedef is inserted into the C++ code, like
class foo: public bar { typedef bar inherited;
So, if in the Delphi code an inherited routine is called by the identifier "inherited" followed by the name of the routine, it can be translated easily to C++ accordingly.
inherited.foo -> inherited::foo()
When "inherited" has no identifier after it, it refers to the inherited method with the same name as the enclosing method. In this case, inherited can appear with or without parameters; if no parameters are specified, it passes to the inherited method the same parameters with which the enclosing method was called. For example,
procedure foo.bar(b : BOOLEAN); begin inherited; end;
->
void __fastcall foo::bar ( bool b ) { inherited::bar( b ); }
|
This page belongs to the Delphi2Cpp Documentation |
Delphi2Cpp home Content |