2-5
SOM Kernel Quick Reference
C/C++ Macros
(see somcdev.h)
Note: Macro arguments are given using C argument declaration syntax for arguments
that are C expressions (for example,, “string className” denotes an argument expression
that evaluates to a char* value in C), whereas macro arguments that are simply tokens
manipulated by the preprocessor in order to create C expressions are identified with
the prefix <token>.
void SOM_Assert (
boolean expression,
long errorCode);
Asserts that a boolean condition is true — that is, a C/C++ expression evaluates to a non-zero value.
void SOM_ClassLibrary (
string “ libname.dll ”);
Identifies the file name of the DLL for a SOM class library in a Windows LibMain function.
Environment * SOM_CreateLocalEnvironment ();
Creates and initializes a local Environment structure that can be passed to methods as the Environment argument.
void SOM_DestroyLocalEnvironment ( Environment * ev);
Destroys a local Environment structure; calls somExceptionFree and SOMFree.
void SOM_Error (
long errorCode);
Reports an error condition.
void SOM_Expect (
boolean expression);
Asserts that a boolean condition is expected to be true.
SOMClass SOM_GetClass (
SOMObject objPtr);
Returns a pointer to the class object of which a SOM object is an instance. Invokes no methods.
void SOM_InitEnvironment (
Environment * ev);
Initializes a locally declared Environment structure that can be passed to methods as the Environment argument.
SOMClassMgr SOM_MainProgram ( );
Identifies an application as a SOM program and registers an end-of-program exit procedure to release SOM
resources when the application terminates.
SOM_NoTrace (
<token> className,
<token> methodName);
Used to turn off method debugging. The macro arguments are not C/C++ expressions,
but simply text used by the preprocessor to create expressions.
somMethodPtr SOM_ParentNumResolve (
<token> className,
long parentNum,
somMethodTabs mtabs,
<token> methodName);
Obtains a pointer to a method procedure from a list of method tables. Used by C and C++ implementation bindings
to implement parent method calls.
Commenti su questo manuale