NODEFINE directive (Delphi)

From RAD Studio
Jump to: navigation, search

Go Up to Delphi Compiler Directives (List) Index

Type

Parameter

Syntax

{$NODEFINE identifier [ 'typeNameInHpp' [ 'typeNameInHppUnion' ]]}

Used when generating header files for consumption by C++Builder.


The NODEFINE directive prevents the specified symbol from being included in the header file generated for C++, while allowing some information to be output to the OBJ file.

When you use NODEFINE, it is your responsibility to define any necessary types with HPPEMIT. For example:


type
	   Temperature = type double;
	   {$NODEFINE Temperature}
	   {$HPPEMIT 'typedef double Temperature'}

The 'typeNameInHpp' and 'typeNameInHppUnion' fields work as follows:

  • You can specify both of these two, or one of them, or neither of them.
  • 'typeNameInHpp' is the name that is emitted when using the symbol.
  • 'typeNameInHppUnion' is the name that is used if the symbol is declared inside a union (variant section of Pascal record type).