Show: Delphi C++
Display Preferences

C++ Classes that Support the Delphi Language

From RAD Studio
Jump to: navigation, search

Go Up to Support for Delphi Data Types and Language Concepts

Some Delphi data types and language constructs that do not have a built-in C++ counterpart are implemented in C++ as classes or structs. Class templates are also used to implement data types as well as Delphi language constructs, like set, from which a specific type can be declared. The declarations for these are found in the following header files:

Header File    Classes Defined

SmallString and ShortString (fixed-character strings)
AnsiStringT, AnsiString and UTF8String (single-byte strings)


WideString (BSTR wrapper for interfacing with COM)


Macros and C++ stream operators (>) for some Delphi types (AnsiString, UnicodeString, SmallString, Currency, TDateTime, and Variant)

syscomp.h Comp (floating-point type for backwards compatibility)
syscurr.h Currency (for monetary values)
sysdyn.h DynamicArray (generic resizable Delphi-style array type)

Contains macros designed for the Delphi compilers to use when compiling the RAD Studio libraries: PACKAGE, PASCALIMPLEMENTATION, DELPHICLASS, DYNAMIC, HIDESBASEDYNAMIC and HIDESBASE, DECLSPEC_DRTTI, DECLSPEC_DRECORD, BEGIN MESSAGE MAP, the class StaticArray (to allow Delphi code to return arrays from functions)

sysopen.h OpenArray type and OPENARRAY(), ARRAYOFCONST(), EXISTINGARRAY(), ARRAYSIZE() and SLICE() macros (to pass open array arguments to Delphi)
sysset.h Set (Delphi-compatible typed bitset class)
systdate.h TDateTime (type to store date/time, with supplemental methods for easy consumption and conversion)
systobj.h TObject (ultimate base class for Delphi-style classes), DelphiInterface (general-purpose smart-pointer for interfaces), interface_cast (to cast between different interfaces or between interfaces and objects), TInterfacedObject, TCppInterfacedObject, TAgreggatedObject, TCppAgreggatedObject, TContainedObject (base classes for classes that implement interfaces), TCustomAttribute (base class for custom Delphi attributes)
systvar.h TVarRec (Delphi open array support; do not use manually, use OPENARRAY() and ARRAYOFCONST() macros)
systvari.h OleVariant (encapsulates COM Variant type) and Variant (encapsulates the Delphi Variant type)
ustring.h UnicodeString (UTF-16 string type)

The classes implemented in these header files were created to support native types used in Delphi routines. They are intended to be used when calling these routines in RAD Studio library-based code.

See Also

Personal tools
RAD Studio 10.2 Tokyo
In other languages
Previous Versions