C/C++ Programmer's Guide (G06.27+, H06.03+)

Table Of Contents
Compiler Pragmas
HP C/C++ Programmer’s Guide for NonStop Systems429301-010
13-93
SRLExportClassMembers
item_list:
item | item_list , item
item:
is a member of the class.
This pragma has no default settings.
Usage Guidelines
The SRLExportClassMembers pragma is used to specify which members of a
class are exported from an SRL. Exporting a member function from an SRL means
that the member function definition is provided by the SRL. The SRL's clients
should never have a copy (inlined or non-inlined) of the function definition within
the client's code. A client's call of the member function will always resolve to calling
the member function within the SRL.
The "same" SRLExportClassMembers pragma must appear in the class
definition for both the compilation of the SRL and the compilation of the SRL client.
The results of inconsistencies between the SRL and the SRL clients are undefined.
When the SRLExportClassMembers pragma is processed while compiling a
client of the SRL, the compiler never inlines a call to a member function exported
by the SRL.
If srl_id matches the name given by #pragma SRLName, this pragma causes
the compiler to generate code for the exported definition, otherwise the compiler
treats the definition as a declaration.
The SRLExportClassMembers pragma must appear within the class definition.
The class definition must be in a global (file) scope.
Non-static data members cannot be exported.
The SRLExportClassMembers pragma applies only to methods introduced by
the class, not to methods inherited by the class.
SRLExportClassMembers PROTECTED exports all protected members of the
class whose declaration textually precedes the pragma.
SRLExportClassMembers PUBLIC exports all public members of the class
whose declaration textually precedes the pragma.
SRLExportClassMembers * exports all protected and all public members of the
class whose declaration textually precedes the pragma.
This pragma is not valid for the TNS/E native compilers.