Jump to content

SOMObject: Difference between revisions

From EDM2
Prokushev (talk | contribs)
Some links added
No edit summary
 
(19 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<pre>
[[image:SOMObjectChart.png|thumb]]
interface SOMObject
SOMObject is the root class for all SOM classes. That is, all SOM classes must be subclasses of SOMObject or of some other class derived from SOMObject. SOMObject introduces no instance data, so objects whose classes inherit from SOMObject incur no size increase. They do inherit a suite of methods that provide the behaviour required of all SOM objects. Three of these methods are typically overridden by any subclass that has instance data- somDefaultInit, somDestruct, and somDumpSelfInt. See the descriptions of these methods for further information.
// This is the SOM root class, all SOM classes must be descended from
// <SOMObject>. <SOMObject> has no instance data so there is no
// per-instance cost to to being descended from it.


{
SOMObject defines the behaviour common to all SOM objects.
* '''File stem:''' somobj
* '''Base:''' None.
* '''Metaclass :''' SOMClass
* '''Ancestor Classes:'''  None
* '''Class definition file:''' somobj.idl


  //### Typedefs
==Methods==
The following list shows all the SOMObject methods.


  typedef sequence <[[OS2 API:SOMObject|SOMObject]]> SOMObjectSequence;
;Group - Initialization/Termination
  // a sequence of SOM Objects
* [[somFree]]
* [[somDefaultInit]]
* [[somDestruct]]
* [[somInit]]
* [[somUninit]]
* [[somDefaultAssign]]
* [[somDefaultConstAssign]]
* [[somDefaultConstCopyInit]]
* [[somDefaultCopyInit]]


  typedef sequence <octet> BooleanSequence;
;Group - Access
  // a sequence of booleans.
* [[somGetClass]]
* [[somGetClassName]]
* [[somGetSize]]


  struct somObjectOffset {
;Group - Testing
    [[OS2 API:SOMObject|SOMObject]] obj;
* [[somIsA]]
    long    offset;
* [[somIsInstanceOf]]
  };
* [[somRespondsTo]]
  // a structure to describe an object-related offset
  typedef sequence <somObjectOffset> somObjectOffsets;
  // a sequence of object-related offsets


;Group - Dynamic
*somDispatchA
*somDispatchD
*somDispatchL
*somDispatchV
* [[somDispatch]]
* [[somClassDispatch]]
* [[somCastObj]]
* [[somResetObj]]


  //###  Initialization / Termination
;Group - Developer Support
* [[somDumpSelf]]
* [[somDumpSelfInt]]
* [[somPrintSelf]]


  void [[OS2 API:somDefaultInit|somDefaultInit]](in som3InitCtrl *ctrl);
==Overridden methods==
  // A default initializer for a SOM object. Passing a null ctrl
There are currently no overridden methods defined for the SOMObject class.
  // indicates to the receiver that its class is the class of the
  // object being initialized, whereby the initializer will determine
  // an appropriate control structure.


  void [[OS2 API:somDestruct|somDestruct]](in octet doFree, in som3DestructCtrl *ctrl);
==Interface SOMObject==
  // The default destructor for a SOM object. A nonzero <doFree>
interface SOMObject
  // indicates that the object storage should be freed by the
// This is the SOM root class, all SOM classes must be descended from
  // object's class (via somDeallocate) after uninitialization.
// <SOMObject>. <SOMObject> has no instance data so there is no
  // As with somDefaultInit, a null ctrl can be passed.
// per-instance cost to being descended from it.
 
  void [[OS2 API:somDefaultCopyInit|somDefaultCopyInit]](in som3InitCtrl *ctrl, in [[OS2 API:SOMObject|SOMObject]] fromObj);
{
  // A default copy constructor. Use this to make copies of objects for
  //### Typedefs
  // calling methods with "by-value" argument semantics.
 
  typedef sequence <SOMObject> SOMObjectSequence;
  [[OS2 API:SOMObject|SOMObject]] [[OS2 API:somDefaultAssign|somDefaultAssign]](in som3AssignCtrl *ctrl, in [[OS2 API:SOMObject|SOMObject]] fromObj);
  // a sequence of SOM Objects
  // A default assignment operator. Use this to "assign" the state of one
  // object to another.
  typedef sequence <octet> BooleanSequence;
 
  // a sequence of booleans.
  //### etc.
 
  struct somObjectOffset {
  void [[OS2 API:somDefaultConstCopyInit|somDefaultConstCopyInit]](in som3InitCtrl *ctrl, in [[OS2 API:SOMObject|SOMObject]] fromObj);
      SOMObject obj;
  // A default copy constructor that uses a const fromObj.
      long    offset;
 
  };
  void [[OS2 API:somDefaultVCopyInit|somDefaultVCopyInit]](in som3InitCtrl *ctrl, in [[OS2 API:SOMObject|SOMObject]] fromObj);
  // a structure to describe an object-related offset
  // A default copy constructor that uses a volatile fromObj.
  typedef sequence <somObjectOffset> somObjectOffsets;
 
  // a sequence of object-related offsets
  void [[OS2 API:somDefaultConstVCopyInit|somDefaultConstVCopyInit]](in som3InitCtrl *ctrl, in [[OS2 API:SOMObject|SOMObject]] fromObj);
  // A default copy constructor that uses a const volatile fromObj.
  //###  Initialization / Termination
 
  [[OS2 API:SOMObject|SOMObject [[OS2 API:somDefaultConstAssign|somDefaultConstAssign]](in som3AssignCtrl *ctrl,
  void somDefaultInit(in som3InitCtrl *ctrl);
                                  in [[OS2 API:SOMObject|SOMObject]] fromObj);
  // A default initializer for a SOM object. Passing a null ctrl
  // A default assignment operator that uses a const fromObj.
  // indicates to the receiver that its class is the class of the
 
  // object being initialized, whereby the initializer will determine
  [[OS2 API:SOMObject|SOMObject]] [[OS2 API:somDefaultVAssign|somDefaultVAssign]](in som3AssignCtrl *ctrl, in [[OS2 API:SOMObject|SOMObject]] fromObj);
  // an appropriate control structure.
  // A default assignment operator that uses a volatile fromObj.
 
  void somDestruct(in octet doFree, in som3DestructCtrl *ctrl);
  [[OS2 API:SOMObject|SOMObject]] [[OS2 API:somDefaultConstVAssign|somDefaultConstVAssign]](in som3AssignCtrl *ctrl,
  // The default destructor for a SOM object. A nonzero <doFree>
                                  in [[OS2 API:SOMObject|SOMObject]] fromObj);
  // indicates that the object storage should be freed by the
  // A default assignment operator that uses a const volatile fromObj.
  // object's class (via somDeallocate) after uninitialization.
 
  // As with somDefaultInit, a null ctrl can be passed.
  void [[OS2 API:somInit|somInit]]();
  // Obsolete but still supported. Override somDefaultInit instead of somInit.
  void somDefaultCopyInit(in som3InitCtrl *ctrl, in SOMObject fromObj);
 
  // A default copy constructor. Use this to make copies of objects for
  void [[OS2 API:somFree|somFree]]();
  // calling methods with "by-value" argument semantics.
  // Use as directed by framework implementations.
 
  SOMObject somDefaultAssign(in som3AssignCtrl *ctrl, in SOMObject fromObj);
  void [[OS2 API:somUninit|somUninit]]();
  // A default assignment operator. Use this to "assign" the state of one
  // Obsolete but still supported. Override somDestruct instead of somUninit.
  // object to another.
 
  //### Access
  //### etc.
 
  [[OS2 API:SOMClass|SOMClass]] [[OS2 API:somGetClass|somGetClass]]();
  void somDefaultConstCopyInit(in som3InitCtrl *ctrl, in SOMObject fromObj);
  // Return the receiver's class.
  // A default copy constructor that uses a const fromObj.
 
  string [[OS2 API:somGetClassName();
  void somDefaultVCopyInit(in som3InitCtrl *ctrl, in SOMObject fromObj);
  // Return the name of the receiver's class.
  // A default copy constructor that uses a volatile fromObj.
 
  long [[OS2 API:somGetSize();
  void somDefaultConstVCopyInit(in som3InitCtrl *ctrl, in SOMObject fromObj);
  // Return the size of the receiver.
  // A default copy constructor that uses a const volatile fromObj.
 
  //### Testing Group
  SOMObject somDefaultConstAssign(in som3AssignCtrl *ctrl,
 
                                  in SOMObject fromObj);
  boolean [[OS2 API:somIsA(in [[OS2 API:SOMClass aClassObj);
  // A default assignment operator that uses a const fromObj.
  // Returns 1 (true) if the receiver responds to methods
  // introduced by <aClassObj>, and 0 (false) otherwise.
  SOMObject somDefaultVAssign(in som3AssignCtrl *ctrl, in SOMObject fromObj);
 
  // A default assignment operator that uses a volatile fromObj.
  boolean [[OS2 API:somIsInstanceOf(in [[OS2 API:SOMClass aClassObj);
  // Returns 1 (true) if the receiver is an instance of
  SOMObject somDefaultConstVAssign(in som3AssignCtrl *ctrl,
  // <aClassObj> and 0 (false) otherwise.
                                    in SOMObject fromObj);
 
  // A default assignment operator that uses a const volatile fromObj.
  boolean [[OS2 API:somRespondsTo(in somId mId);
  // Returns 1 (true) if the indicated method can be invoked
  void somInit();
  // on the receiver and 0 (false) otherwise.
  // Obsolete but still supported. Override somDefaultInit instead of somInit.
 
  //### Dynamic
  void somFree();
 
  // Use as directed by framework implementations.
  boolean [[OS2 API:somDispatch(out somToken retValue,
                  in somId methodId,
  void somUninit();
                  in va_list ap);
  // Obsolete but still supported. Override somDestruct instead of somUninit.
  // This method provides a generic, class-specific dispatch mechanism.
  // It accepts as input <retValue> a pointer to the memory area to be
  //### Access
  // loaded with the result of dispatching the method indicated by
  // <methodId> using the arguments in <ap>. <ap> contains the object
  SOMClass somGetClass();
  // on which the method is to be invoked as the first argument.
  // Return the receiver's class.
 
  boolean [[OS2 API:somClassDispatch(in SOMClass clsObj,
  string somGetClassName();
                        out somToken retValue,
  // Return the name of the receiver's class.
                        in somId methodId,
                        in va_list ap);
  long somGetSize();
  // Like somDispatch, but method resolution for static methods is done
  // Return the size of the receiver.
  // according to the clsObj instance method table.
 
  //### Testing Group
 
  boolean [[OS2 API:somCastObj(in [[OS2 API:SOMClass cls);
  boolean somIsA(in SOMClass aClassObj);
  // cast the receiving object to cls (which must be an ancestor of the
  // Returns 1 (true) if the receiver responds to methods
  // objects true class. Returns true on success.
  // introduced by <aClassObj>, and 0 (false) otherwise.
 
  boolean [[OS2 API:somResetObj();
  boolean somIsInstanceOf(in SOMClass aClassObj);
  // reset an object to its true class. Returns true always.
  // Returns 1 (true) if the receiver is an instance of
 
  // <aClassObj> and 0 (false) otherwise.
 
  void [[OS2 API:somDispatchV(in somId methodId,
  boolean somRespondsTo(in somId mId);
                    in somId descriptor,
  // Returns 1 (true) if the indicated method can be invoked
  // on the receiver and 0 (false) otherwise.
  //### Dynamic
  boolean somDispatch(out somToken retValue,
                    in somId methodId,
                     in va_list ap);
                     in va_list ap);
  // Obsolete. Use somDispatch instead.
  // This method provides a generic, class-specific dispatch mechanism.
 
  // It accepts as input <retValue> a pointer to the memory area to be
  long [[OS2 API:somDispatchL(in somId methodId,
  // loaded with the result of dispatching the method indicated by
                    in somId descriptor,
  // <methodId> using the arguments in <ap>. <ap> contains the object
                    in va_list ap);
  // on which the method is to be invoked as the first argument.
  // Obsolete. Use somDispatch instead.
 
  boolean somClassDispatch(in SOMClass clsObj,
  void* [[OS2 API:somDispatchA(in somId methodId,
                        out somToken retValue,
                        in somId methodId,
                        in va_list ap);
  // Like somDispatch, but method resolution for static methods is done
  // according to the clsObj instance method table.
  boolean somCastObj(in SOMClass cls);
  // cast the receiving object to cls (which must be an ancestor of the
  // objects true class. Returns true on success.
  boolean somResetObj();
  // reset an object to its true class. Returns true always.
  void somDispatchV(in somId methodId,
                    in somId descriptor,
                    in va_list ap);
  // Obsolete. Use somDispatch instead.
  long somDispatchL(in somId methodId,
                     in somId descriptor,
                     in somId descriptor,
                     in va_list ap);
                     in va_list ap);
  // Obsolete. Use somDispatch instead.
  // Obsolete. Use somDispatch instead.
 
  double [[OS2 API:somDispatchD(in somId methodId,
  void* somDispatchA(in somId methodId,
                       in somId descriptor,
                       in somId descriptor,
                       in va_list ap);
                       in va_list ap);
  // Obsolete. Use somDispatch instead.
  // Obsolete. Use somDispatch instead.
 
  //### Development Support
  double somDispatchD(in somId methodId,
 
                      in somId descriptor,
  [[OS2 API:SOMObject [[OS2 API:somPrintSelf();
                      in va_list ap);
  // Uses <SOMOutCharRoutine> to write a brief string with identifying
  // Obsolete. Use somDispatch instead.
  // information about this object.  The default implementation just gives
  // the object's class name and its address in memory.
  //### Development Support
  // <self> is returned.
 
  SOMObject somPrintSelf();
  void [[OS2 API:somDumpSelf(in long level);
  // Uses <SOMOutCharRoutine> to write a brief string with identifying
  // Uses <SOMOutCharRoutine> to write a detailed description of this object
  // information about this object.  The default implementation just gives
  // and its current state.
  // the object's class name and its address in memory.
  //
  // <self> is returned.
  // <level> indicates the nesting level for describing compound objects
  // it must be greater than or equal to zero.  All lines in the
  void somDumpSelf(in long level);
  // description will be preceeded by <2*level> spaces.
  // Uses <SOMOutCharRoutine> to write a detailed description of this object
  //
  // and its current state.
  // This routine only actually writes the data that concerns the object
  //
  // as a whole, such as class, and uses <somDumpSelfInt> to describe
  // <level> indicates the nesting level for describing compound objects
  // the object's current state.  This approach allows readable
  // it must be greater than or equal to zero.  All lines in the
  // descriptions of compound objects to be constructed.
  // description will be preceeded by <2*level> spaces.
  //
  //
  // Generally it is not necessary to override this method, if it is
  // This routine only actually writes the data that concerns the object
  // overriden it generally must be completely replaced.
  // as a whole, such as class, and uses <somDumpSelfInt> to describe
 
  // the object's current state.  This approach allows readable
  void [[OS2 API:somDumpSelfInt(in long level);
  // descriptions of compound objects to be constructed.
  // Uses <SOMOutCharRoutine> to write in the current state of this object.
  //
  // Generally this method will need to be overridden.  When overriding
  // Generally it is not necessary to override this method, if it is
  // it, begin by calling the parent class form of this method and then
  // overriden it generally must be completely replaced.
  // write in a description of your class's instance data. This will
  // result in a description of all the object's instance data going
  void somDumpSelfInt(in long level);
  // from its root ancestor class to its specific class.
  // Uses <SOMOutCharRoutine> to write in the current state of this object.
 
  // Generally this method will need to be overridden.  When overriding
 
  // it, begin by calling the parent class form of this method and then
#ifdef __SOMIDL__
  // write in a description of your class's instance data. This will
  implementation {
  // result in a description of all the object's instance data going
    releaseorder: somInit,somUninit,somFree,somDefaultVCopyInit,
  // from its root ancestor class to its specific class.
                  somGetClassName,somGetClass,somIsA,somRespondsTo,
                  somIsInstanceOf,somGetSize,somDumpSelf,somDumpSelfInt,
#ifdef __SOMIDL__
                  somPrintSelf,somDefaultConstVCopyInit,somDispatchV,
  implementation {
                  somDispatchL,somDispatchA,
    releaseorder: somInit,somUninit,somFree,somDefaultVCopyInit,
                  somDispatchD,somDispatch,somClassDispatch,
                  somGetClassName,somGetClass,somIsA,somRespondsTo,
                  somCastObj, somResetObj, somDefaultInit, somDestruct,
                  somIsInstanceOf,somGetSize,somDumpSelf,somDumpSelfInt,
                  somPrivate1, somPrivate2,
                  somPrintSelf,somDefaultConstVCopyInit,somDispatchV,
                  somDefaultCopyInit, somDefaultConstCopyInit, somDefaultAssign,
                  somDispatchL,somDispatchA,
                  somDefaultConstAssign, somDefaultVAssign,
                  somDispatchD,somDispatch,somClassDispatch,
                  somDefaultConstVAssign;
                  somCastObj, somResetObj, somDefaultInit, somDestruct,
 
                  somPrivate1, somPrivate2,
 
                  somDefaultCopyInit, somDefaultConstCopyInit, somDefaultAssign,
    // Class Modifiers
                  somDefaultConstAssign, somDefaultVAssign,
    callstyle = oidl;
                  somDefaultConstVAssign;
    externalstem = somob;
    majorversion = 1;
    // Class Modifiers
#ifndef SOMPCALL
    callstyle = oidl;
    minorversion = 5; // for som2.5 kernel
    externalstem = somob;
#else
    majorversion = 1;
    minorversion = 6; // for som2.5 kernel with pcall
#ifndef SOMPCALL
#endif
    minorversion = 5; // for som2.5 kernel
    filestem = somobj;
#else
    dllname = "som.dll";
    minorversion = 6; // for som2.5 kernel with pcall
 
#endif
    // Public Method Modifiers
    filestem = somobj;
    somDefaultInit: init;
    dllname = "som.dll";
    somDefaultCopyInit: init;
    somDefaultConstCopyInit: init;
    // Public Method Modifiers
    somDefaultVCopyInit: init;
    somDefaultInit: init;
    somDefaultConstVCopyInit: init;
    somDefaultCopyInit: init;
 
    somDefaultConstCopyInit: init;
    somDefaultInit: caller_owns_parameters = "ctrl";
    somDefaultVCopyInit: init;
    somDestruct: caller_owns_parameters = "ctrl";
    somDefaultConstVCopyInit: init;
    somDefaultCopyInit: caller_owns_parameters = "ctrl";
    somDefaultAssign: caller_owns_parameters = "ctrl";
    somDefaultInit: caller_owns_parameters = "ctrl";
    somDefaultConstCopyInit: caller_owns_parameters = "ctrl";
    somDestruct: caller_owns_parameters = "ctrl";
    somDefaultVCopyInit: caller_owns_parameters = "ctrl";
    somDefaultCopyInit: caller_owns_parameters = "ctrl";
    somDefaultConstVCopyInit: caller_owns_parameters = "ctrl";
    somDefaultAssign: caller_owns_parameters = "ctrl";
    somDefaultConstAssign: caller_owns_parameters = "ctrl";
    somDefaultConstCopyInit: caller_owns_parameters = "ctrl";
    somDefaultVAssign: caller_owns_parameters = "ctrl";
    somDefaultVCopyInit: caller_owns_parameters = "ctrl";
    somDefaultConstVAssign: caller_owns_parameters = "ctrl";
    somDefaultConstVCopyInit: caller_owns_parameters = "ctrl";
    somRespondsTo: caller_owns_parameters = "mId";
    somDefaultConstAssign: caller_owns_parameters = "ctrl";
    somDispatch: caller_owns_parameters = "methodId, ap";
    somDefaultVAssign: caller_owns_parameters = "ctrl";
    somClassDispatch: caller_owns_parameters = "methodId, ap";
    somDefaultConstVAssign: caller_owns_parameters = "ctrl";
    somDispatchV: caller_owns_parameters = "methodId, descriptor, ap";
    somRespondsTo: caller_owns_parameters = "mId";
    somDispatchL: caller_owns_parameters = "methodId, descriptor, ap";
    somDispatch: caller_owns_parameters = "methodId, ap";
    somDispatchA: caller_owns_parameters = "methodId, descriptor, ap";
    somClassDispatch: caller_owns_parameters = "methodId, ap";
    somDispatchD: caller_owns_parameters = "methodId, descriptor, ap";
    somDispatchV: caller_owns_parameters = "methodId, descriptor, ap";
 
    somDispatchL: caller_owns_parameters = "methodId, descriptor, ap";
    somDispatchA: caller_owns_parameters = "methodId, descriptor, ap";
    somDispatchD: caller_owns_parameters = "methodId, descriptor, ap";
  };
#endif /* __SOMIDL__ */
};


  };
[[Category:SOM Classes]]
#endif /* __SOMIDL__ */
};
</pre>

Latest revision as of 23:31, 30 March 2019

SOMObject is the root class for all SOM classes. That is, all SOM classes must be subclasses of SOMObject or of some other class derived from SOMObject. SOMObject introduces no instance data, so objects whose classes inherit from SOMObject incur no size increase. They do inherit a suite of methods that provide the behaviour required of all SOM objects. Three of these methods are typically overridden by any subclass that has instance data- somDefaultInit, somDestruct, and somDumpSelfInt. See the descriptions of these methods for further information.

SOMObject defines the behaviour common to all SOM objects.

  • File stem: somobj
  • Base: None.
  • Metaclass : SOMClass
  • Ancestor Classes: None
  • Class definition file: somobj.idl

Methods

The following list shows all the SOMObject methods.

Group - Initialization/Termination
Group - Access
Group - Testing
Group - Dynamic
Group - Developer Support

Overridden methods

There are currently no overridden methods defined for the SOMObject class.

Interface SOMObject

interface SOMObject
// This is the SOM root class, all SOM classes must be descended from
// <SOMObject>. <SOMObject> has no instance data so there is no
// per-instance cost to being descended from it.

{
  //### Typedefs

  typedef sequence <SOMObject> SOMObjectSequence;
  // a sequence of SOM Objects

  typedef sequence <octet> BooleanSequence;
  // a sequence of booleans.

  struct somObjectOffset {
     SOMObject obj;
     long     offset;
  };
  // a structure to describe an object-related offset
  typedef sequence <somObjectOffset> somObjectOffsets;
  // a sequence of object-related offsets

  //###  Initialization / Termination

  void somDefaultInit(in som3InitCtrl *ctrl);
  // A default initializer for a SOM object. Passing a null ctrl
  // indicates to the receiver that its class is the class of the
  // object being initialized, whereby the initializer will determine
  // an appropriate control structure.

  void somDestruct(in octet doFree, in som3DestructCtrl *ctrl);
  // The default destructor for a SOM object. A nonzero <doFree>
  // indicates that the object storage should be freed by the
  // object's class (via somDeallocate) after uninitialization.
  // As with somDefaultInit, a null ctrl can be passed.

  void somDefaultCopyInit(in som3InitCtrl *ctrl, in SOMObject fromObj);
  // A default copy constructor. Use this to make copies of objects for
  // calling methods with "by-value" argument semantics.

  SOMObject somDefaultAssign(in som3AssignCtrl  *ctrl, in SOMObject fromObj);
  // A default assignment operator. Use this to "assign" the state of one
  // object to another.

  //### etc.

  void somDefaultConstCopyInit(in som3InitCtrl *ctrl, in SOMObject fromObj);
  // A default copy constructor that uses a const fromObj.

  void somDefaultVCopyInit(in som3InitCtrl *ctrl, in SOMObject fromObj);
  // A default copy constructor that uses a volatile fromObj.

  void somDefaultConstVCopyInit(in som3InitCtrl *ctrl, in SOMObject fromObj);
  // A default copy constructor that uses a const volatile fromObj.

  SOMObject somDefaultConstAssign(in som3AssignCtrl *ctrl,
                                  in SOMObject fromObj);
  // A default assignment operator that uses a const fromObj.

  SOMObject somDefaultVAssign(in som3AssignCtrl *ctrl, in SOMObject fromObj);
  // A default assignment operator that uses a volatile fromObj.

  SOMObject somDefaultConstVAssign(in som3AssignCtrl *ctrl,
                                   in SOMObject fromObj);
  // A default assignment operator that uses a const volatile fromObj.

  void somInit();
  // Obsolete but still supported. Override somDefaultInit instead of somInit.

  void somFree();
  // Use as directed by framework implementations.

  void somUninit();
  // Obsolete but still supported. Override somDestruct instead of somUninit.

  //### Access

  SOMClass somGetClass();
  // Return the receiver's class.

  string somGetClassName();
  // Return the name of the receiver's class.

  long somGetSize();
  // Return the size of the receiver.

  //### Testing Group

  boolean somIsA(in SOMClass aClassObj);
  // Returns 1 (true) if the receiver responds to methods
  // introduced by <aClassObj>, and 0 (false) otherwise.

  boolean somIsInstanceOf(in SOMClass aClassObj);
  // Returns 1 (true) if the receiver is an instance of
  // <aClassObj> and 0 (false) otherwise.

  boolean somRespondsTo(in somId mId);
  // Returns 1 (true) if the indicated method can be invoked
  // on the receiver and 0 (false) otherwise.

  //### Dynamic

  boolean somDispatch(out somToken retValue,
                   in somId methodId,
                   in va_list ap);
  // This method provides a generic, class-specific dispatch mechanism.
  // It accepts as input <retValue> a pointer to the memory area to be
  // loaded with the result of dispatching the method indicated by
  // <methodId> using the arguments in <ap>. <ap> contains the object
  // on which the method is to be invoked as the first argument.

  boolean somClassDispatch(in SOMClass clsObj,
                        out somToken retValue,
                        in somId methodId,
                        in va_list ap);
  // Like somDispatch, but method resolution for static methods is done
  // according to the clsObj instance method table.

  boolean somCastObj(in SOMClass cls);
  // cast the receiving object to cls (which must be an ancestor of the
  // objects true class. Returns true on success.

  boolean somResetObj();
  // reset an object to its true class. Returns true always.

  void somDispatchV(in somId methodId,
                    in somId descriptor,
                    in va_list ap);
  // Obsolete. Use somDispatch instead.

  long somDispatchL(in somId methodId,
                    in somId descriptor,
                    in va_list ap);
  // Obsolete. Use somDispatch instead.

  void* somDispatchA(in somId methodId,
                     in somId descriptor,
                     in va_list ap);
  // Obsolete. Use somDispatch instead.

  double somDispatchD(in somId methodId,
                      in somId descriptor,
                      in va_list ap);
  // Obsolete. Use somDispatch instead.

  //### Development Support

  SOMObject somPrintSelf();
  // Uses <SOMOutCharRoutine> to write a brief string with identifying
  // information about this object.  The default implementation just gives
  // the object's class name and its address in memory.
  // <self> is returned.

  void somDumpSelf(in long level);
  // Uses <SOMOutCharRoutine> to write a detailed description of this object
  // and its current state.
  //
  // <level> indicates the nesting level for describing compound objects
  // it must be greater than or equal to zero.  All lines in the
  // description will be preceeded by <2*level> spaces.
  //
  // This routine only actually writes the data that concerns the object
  // as a whole, such as class, and uses <somDumpSelfInt> to describe
  // the object's current state.  This approach allows readable
  // descriptions of compound objects to be constructed.
  //
  // Generally it is not necessary to override this method, if it is
  // overriden it generally must be completely replaced.

  void somDumpSelfInt(in long level);
  // Uses <SOMOutCharRoutine> to write in the current state of this object.
  // Generally this method will need to be overridden.  When overriding
  // it, begin by calling the parent class form of this method and then
  // write in a description of your class's instance data. This will
  // result in a description of all the object's instance data going
  // from its root ancestor class to its specific class.

#ifdef __SOMIDL__
  implementation {
    releaseorder: somInit,somUninit,somFree,somDefaultVCopyInit,
                  somGetClassName,somGetClass,somIsA,somRespondsTo,
                  somIsInstanceOf,somGetSize,somDumpSelf,somDumpSelfInt,
                  somPrintSelf,somDefaultConstVCopyInit,somDispatchV,
                  somDispatchL,somDispatchA,
                  somDispatchD,somDispatch,somClassDispatch,
                  somCastObj, somResetObj, somDefaultInit, somDestruct,
                  somPrivate1, somPrivate2,
                  somDefaultCopyInit, somDefaultConstCopyInit, somDefaultAssign,
                  somDefaultConstAssign, somDefaultVAssign,
                  somDefaultConstVAssign;

    // Class Modifiers
    callstyle = oidl;
    externalstem = somob;
    majorversion = 1;
#ifndef SOMPCALL
    minorversion = 5; // for som2.5 kernel
#else
    minorversion = 6; // for som2.5 kernel with pcall
#endif
    filestem = somobj;
    dllname = "som.dll";

    // Public Method Modifiers
    somDefaultInit: init;
    somDefaultCopyInit: init;
    somDefaultConstCopyInit: init;
    somDefaultVCopyInit: init;
    somDefaultConstVCopyInit: init;

    somDefaultInit: caller_owns_parameters = "ctrl";
    somDestruct: caller_owns_parameters = "ctrl";
    somDefaultCopyInit: caller_owns_parameters = "ctrl";
    somDefaultAssign: caller_owns_parameters = "ctrl";
    somDefaultConstCopyInit: caller_owns_parameters = "ctrl";
    somDefaultVCopyInit: caller_owns_parameters = "ctrl";
    somDefaultConstVCopyInit: caller_owns_parameters = "ctrl";
    somDefaultConstAssign: caller_owns_parameters = "ctrl";
    somDefaultVAssign: caller_owns_parameters = "ctrl";
    somDefaultConstVAssign: caller_owns_parameters = "ctrl";
    somRespondsTo: caller_owns_parameters = "mId";
    somDispatch: caller_owns_parameters = "methodId, ap";
    somClassDispatch: caller_owns_parameters = "methodId, ap";
    somDispatchV: caller_owns_parameters = "methodId, descriptor, ap";
    somDispatchL: caller_owns_parameters = "methodId, descriptor, ap";
    somDispatchA: caller_owns_parameters = "methodId, descriptor, ap";
    somDispatchD: caller_owns_parameters = "methodId, descriptor, ap";
  };
#endif /* __SOMIDL__ */
};