Type-map

Top  Previous  Next

User interface > Translation options > Type options > Type-map

 

At the type options a type map can be shown. If use user type-map is checked, the cells of the shown grid can be edited.

 

 

OptionsTypemap

 

In the first column of the type map the names of Delphi built-in types and the second column the according names of the C++ types are listed. In the further columns some properties of the C++ types are given:

 

typemap

 

 

Size:                size of the type in bytes

Minimum:         minimum value of the type

Maximum:        maximum value of the type

In System:        true, if the type is defined in d2c_system or in System.h, else false.

 

The last column determines, whether the System namespace is prepended to the according type name in a header.

 

For example BOOL is a Windows type and therefore has not to be defined in the System namespace. E.g.:

 

longbool        BOOL        4        -2147483648        2147483647        false

 

 

 

Under Linux however BOOL is unknown and could be defined in d2c_systypes.h

 

 

longbool        BOOL        4        -2147483648        2147483647        true

 

 

 

size_t

 

In addition to the built-in types there is a size_t item, though  no corresponding type exists in Delphi. The reason is, that sometimes Integer types are converted to size_t types in C++ and the properties of size_t determine whether some casts are written into the resulting code, which avoid warnings from the C++ compiler.

 

 

For C++Builder sometimes simple type identifiers are needed, because no space is allowed inside of a type identifier.

 

 

 

 



This page belongs to the DelphiXE2Cpp11 Documentation

DelphiXE2Cpp11 home  Content