RAD Studio
ContentsIndex
PreviousUpNext
Handling Delphi Features in C++Builder 2009

This section contains topics describing how you can handle issues that might arise when C++Builder 2009 interacts with certain new Delphi features.

Name 
Description 
This topic describes some programming issues that you might encounter when dealing with anonymous methods, one of Delphi's newest features.
Under the cover, Delphi implements anonymous methods types (also known as method references) via an interface that implements an Invoke(...) method. So a method that takes a method reference parameter in Delphi is exposed to C++ as a method that takes an interface. Here's an example:  
The C++ implementation of the AnsiString type provides CodePage support similar to that available in Delphi 2009. However, while the Delphi version is implemented via extension to the language, the C++ version is implemented via a template with a non-type parameter as codepage, as in:  
This topic describes some programming issues that you might encounter when dealing with generics, one of Delphi's newest features.
Delphi generics are exposed to C++ as templates. However, it's important to realize that the instantiations occur on the Delphi side, not in C++. Therefore, you can only use these template for types that were explicitly instantiated in Delphi code. For example, let's declare a simply generic, TList<T>, in Delphi:  
Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!