Talk:HPP emit (Delphi)

From RAD Studio
Jump to: navigation, search

I would probably say "a specified string" rather than "a specified symbol" since HPPEMIT can be used to emit anything: a comment, a #include directive, etc, etc.



And I would probably add a semicolon to the sample mentioned:

  Example: {$HPPEMIT 'typedef double Weight;' }.

Please add some info about the new (to XE5) {$HPPEMIT NOUSINGNAMESPACE} directive. It tells the Delphi compiler not to generate the "using namespace <unit-name>;" typically seen at the end of the .HPP generated from a .PAS unit. This directive avoids polluting the global namespace and can be very helpful in avoiding ambiguities. The same effect can be achieved by defining the DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE macro. However, the latter may cause failures in cases where code does not use qualified names (like event handlers generated by the IDE).


Your suggested changes have been incorporated here and in the What's New topic.

RS-46882 KrisHouser (talk) 15:24, 24 January 2014 (PST)