Jump to content

somGetInstanceToken

From EDM2
Revision as of 16:38, 13 October 2017 by Martini (talk | contribs) (Created page with "{{DISPLAYTITLE:somGetInstanceToken}} This method returns a data access token for the instance data introduced by a class. For backward compatibility, this method does not tak...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This method returns a data access token for the instance data introduced by a class.

For backward compatibility, this method does not take an Environment parameter.

Original Class
SOMClass

Syntax

somDToken somGetInstanceToken (SOMClass receiver)

Parameters

receiver (SOMClass)
A pointer to a SOMClass object.

Return Code

rc (somDToken)
Returns a data token for the beginning of the instance data introduced by the receiver.

Remarks

This method returns a data token "pointing" to the beginning of the instance data introduced by the receiving class. This token can be passed to the function somDataResolve to locate this instance data within an an instance of the receiver class or any class derived from it. Also the instance data token for a class can be passed to the class method somGetMemberToken to get a data token for a specific instance variables introduced by the class (if the relative offset of this instance variable is known). This approach is used by C and C++ implementation bindings to support public instance data for OIDL classes (IDL classes currently have no public instance data).

A data token for the instance data introduced by a class is required by method procedures that access data introduced by the method procedure's defining class. For classes declared using OIDL and IDL, the needed token is stored in the auxiliary class data structure, which is an external data structure made statically available by the C and C++ language bindings as <className>CClassData.instanceToken. Thus, this method call is not generally used by C and C++ class implementors of classes declared using OIDL or IDL.

Example Code


Related

Functions

Methods