is-operator

Top  Previous  Next

What is translated > Operators > is-operator

 

In C++ test with dynamic_cast corresponds to the is operator for the dynamic type check in Delphi.

 

ActiveControl is TEdit  

->  

std::dynamic_cast<TEdit*>(ActiveControl)

 

If the overwritten System.pas is used, the is-operator is substituted by the macro, ObjectIs :

 

ObjectIs( ActiveControl, TEdit* )

 

ObjectIs is defines as:

 

#define ObjectIs(xObj, xIs) dynamic_cast< xIs >( xObj )

 

 

If a VCL class is tested for a Meta-class, the translated code looks like:

 

Obj->ClassNameIs( targetClass->ClassName() )

 

 



This page belongs to the Delphi2Cpp Documentation

Delphi2Cpp home  Content