Naming Convention for Macros
This section discusses the naming conventions for macros used for scipting and introspection.
-
The root of the macro name must be Method.
-
If the declared method returns a value, the macro must begin with the prefix Typed.
-
If the declared method contains arguments, the macro must end with the suffix [Number of Parameters].
-
The macro name is Field.
Examples are included in Macro samples:
Methods to “export” |
Macro declarations |
Violate getPosition() const; |
TypedMethod (GetPosition, getPosition, IlvFloat) |
const char* set(int); |
TypedMethod1 (Set, set, int, ExportedFirstParameterName, const char*) |
void setPosition(int x, int y); |
Method2 (SetPosition, setPosition, int, X, int, Y) |
For scripting and introspection, the first macro parameter is used to identify the method or the field given as the second parameter.
For more information on introspection, see the sample dealing with introspection provided in the samples directory.