home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / som30tk.zip / som30os2.zip / include / somobj.sc < prev    next >
Text File  |  1996-12-24  |  8KB  |  214 lines

  1.  
  2. /*
  3.  * This file was generated by the SOM Compiler.
  4.  * FileName: d:\u\otp\include\somobj.sc.
  5.  * Generated using:
  6.  *     SOM Precompiler somipc: 2.29.1.19
  7.  *     SOM Emitter emitsc: 2.49
  8.  */
  9.  
  10. /*
  11.  *  96F8647, 96F8648, 96F8850 (C) Copyright IBM Corp. 1992, 1994
  12.  *  All Rights Reserved
  13.  *  Licensed Materials - Property of IBM
  14.  *   SOMObject: System Object Model root class
  15.  */
  16.  
  17. class: SOMObject, 
  18.     functionprefix = somo_, externalstem = somob, 
  19.     majorversion = 1, minorversion = 7, 
  20.     filestem = somobj;
  21.  
  22.     --  This is the SOM root class, all SOM classes must be descended from
  23.     --  <SOMObject>. <SOMObject> has no instance data so there is no
  24.     --  per-instance cost to to being descended from it.
  25.     --  a sequence of SOM Objects
  26.  
  27.  
  28. release order:
  29.     somInit, somUninit, 
  30.     somFree, somDefaultVCopyInit, 
  31.     somGetClassName, somGetClass, 
  32.     somIsA, somRespondsTo, 
  33.     somIsInstanceOf, somGetSize, 
  34.     somDumpSelf, somDumpSelfInt, 
  35.     somPrintSelf, somDefaultConstVCopyInit, 
  36.     somoPrivate1, somoPrivate2, 
  37.     somoPrivate3, somoPrivate4, 
  38.     somDispatch, somClassDispatch, 
  39.     somCastObj, somResetObj, 
  40.     somDefaultInit, somDestruct, 
  41.     somoPrivate5, somoPrivate6, 
  42.     somDefaultCopyInit, somDefaultConstCopyInit, 
  43.     somDefaultAssign, somDefaultConstAssign, 
  44.     somDefaultVAssign, somDefaultConstVAssign, 
  45.     somoPrivate7, somoPrivate8, 
  46.     somoPrivate9, somoPrivate10, 
  47.     somoPrivate11, somoPrivate12, 
  48.     somoPrivate13, somoPrivate14;
  49.  
  50. methods:
  51.  
  52.  
  53.     void   somDefaultInit(som3InitCtrl* ctrl), descriptor = ::SOMObject::somDefaultInit, init;
  54.  
  55.     --  A default initializer for a SOM object. Passing a null ctrl
  56.     --  indicates to the receiver that its class is the class of the
  57.     --  object being initialized, whereby the initializer will determine
  58.     --  an appropriate control structure.
  59.  
  60.     void   somDestruct(octet doFree,
  61.         som3DestructCtrl* ctrl), descriptor = ::SOMObject::somDestruct;
  62.  
  63.     --  The default destructor for a SOM object. A nonzero <doFree>
  64.     --  indicates that the object storage should be freed by the
  65.     --  object's class (via somDeallocate) after uninitialization.
  66.     --  As with somDefaultInit, a null ctrl can be passed.
  67.  
  68.     void   somDefaultCopyInit(som3InitCtrl* ctrl,
  69.         SOMObject* fromObj), descriptor = ::SOMObject::somDefaultCopyInit, init;
  70.  
  71.     --  A default copy constructor. Use this to make copies of objects for
  72.     --  calling methods with "by-value" argument semantics.
  73.  
  74.     SOMObject*   somDefaultAssign(som3AssignCtrl* ctrl,
  75.         SOMObject* fromObj), descriptor = ::SOMObject::somDefaultAssign;
  76.  
  77.     --  A default assignment operator. Use this to "assign" the state of one
  78.     --  object to another.
  79.  
  80.     void   somDefaultConstCopyInit(som3InitCtrl* ctrl,
  81.         SOMObject* fromObj), descriptor = ::SOMObject::somDefaultConstCopyInit, init;
  82.  
  83.     --  A default copy constructor that uses a const fromObj.
  84.  
  85.     void   somDefaultVCopyInit(som3InitCtrl* ctrl,
  86.         SOMObject* fromObj), descriptor = ::SOMObject::somDefaultVCopyInit, init;
  87.  
  88.     --  A default copy constructor that uses a volatile fromObj.
  89.  
  90.     void   somDefaultConstVCopyInit(som3InitCtrl* ctrl,
  91.         SOMObject* fromObj), descriptor = ::SOMObject::somDefaultConstVCopyInit, init;
  92.  
  93.     --  A default copy constructor that uses a const volatile fromObj.
  94.  
  95.     SOMObject*   somDefaultConstAssign(som3AssignCtrl* ctrl,
  96.         SOMObject* fromObj), descriptor = ::SOMObject::somDefaultConstAssign;
  97.  
  98.     --  A default assignment operator that uses a const fromObj.
  99.  
  100.     SOMObject*   somDefaultVAssign(som3AssignCtrl* ctrl,
  101.         SOMObject* fromObj), descriptor = ::SOMObject::somDefaultVAssign;
  102.  
  103.     --  A default assignment operator that uses a volatile fromObj.
  104.  
  105.     SOMObject*   somDefaultConstVAssign(som3AssignCtrl* ctrl,
  106.         SOMObject* fromObj), descriptor = ::SOMObject::somDefaultConstVAssign;
  107.  
  108.     --  A default assignment operator that uses a const volatile fromObj.
  109.  
  110.     void   somInit(), descriptor = ::SOMObject::somInit;
  111.  
  112.     --  Obsolete but still supported. Override somDefaultInit instead of somInit.
  113.  
  114.     void   somUninit(), descriptor = ::SOMObject::somUninit;
  115.  
  116.     --  Obsolete but still supported. Override somDestruct instead of somUninit.
  117.  
  118.     void   somFree(), descriptor = ::SOMObject::somFree;
  119.  
  120.     --  The default implementation just calls somDestruct.
  121.  
  122.     SOMClass*   somGetClass(), descriptor = ::SOMObject::somGetClass;
  123.  
  124.     --  Return the receiver's class.
  125.  
  126.     string   somGetClassName(), descriptor = ::SOMObject::somGetClassName, dual_owned_result;
  127.  
  128.     --  Return the name of the receiver's class.
  129.  
  130.     long   somGetSize(), descriptor = ::SOMObject::somGetSize;
  131.  
  132.     --  Return the size of the receiver.
  133.  
  134.     boolean   somIsA(SOMClass* aClassObj), descriptor = ::SOMObject::somIsA;
  135.  
  136.     --  Returns 1 (true) if the receiver responds to methods
  137.     --  introduced by <aClassObj>, and 0 (false) otherwise.
  138.  
  139.     boolean   somIsInstanceOf(SOMClass* aClassObj), descriptor = ::SOMObject::somIsInstanceOf;
  140.  
  141.     --  Returns 1 (true) if the receiver is an instance of
  142.     --  <aClassObj> and 0 (false) otherwise.
  143.  
  144.     boolean   somRespondsTo(somId mId), descriptor = ::SOMObject::somRespondsTo;
  145.  
  146.     --  Returns 1 (true) if the indicated method can be invoked
  147.     --  on the receiver and 0 (false) otherwise.
  148.  
  149.     boolean   somDispatch(somToken* retValue,
  150.         somId methodId,
  151.         ...), descriptor = ::SOMObject::somDispatch;
  152.  
  153.     --  This method provides a generic, class-specific dispatch mechanism.
  154.     --  It accepts as input <retValue> a pointer to the memory area to be
  155.     --  loaded with the result of dispatching the method indicated by
  156.     --  <methodId> using the arguments in <ap>. <ap> contains the object
  157.     --  on which the method is to be invoked as the first argument.
  158.     -- 
  159.     --  Default redispatch stubs invoke this method.
  160.  
  161.     boolean   somClassDispatch(SOMClass* clsObj,
  162.         somToken* retValue,
  163.         somId methodId,
  164.         ...), descriptor = ::SOMObject::somClassDispatch;
  165.  
  166.     --  Like somDispatch, but method resolution for static methods is done
  167.     --  according to the clsObj instance method table.
  168.  
  169.     boolean   somCastObj(SOMClass* castedCls), descriptor = ::SOMObject::somCastObj;
  170.  
  171.     --  Changes the behavior of the target object to that implemented
  172.     --  by castedCls. This is possible when all concrete data in castedCls
  173.     --  is also concrete in the true class of the target object.
  174.     --  Returns true (1) on success, and false (0) otherwise.
  175.  
  176.     boolean   somResetObj(), descriptor = ::SOMObject::somResetObj;
  177.  
  178.     --  reset an object to its true class. Returns true always.
  179.  
  180.     SOMObject*   somPrintSelf(), descriptor = ::SOMObject::somPrintSelf;
  181.  
  182.     --  Uses <SOMOutCharRoutine> to write a brief string with identifying
  183.     --  information about this object.  The default implementation just gives
  184.     --  the object's class name and its address in memory.
  185.     --  <self> is returned.
  186.  
  187.     void   somDumpSelf(long level), descriptor = ::SOMObject::somDumpSelf;
  188.  
  189.     --  Uses <SOMOutCharRoutine> to write a detailed description of this object
  190.     --  and its current state.
  191.     -- 
  192.     --  <level> indicates the nesting level for describing compound objects
  193.     --  it must be greater than or equal to zero.  All lines in the
  194.     --  description will be preceeded by <2*level> spaces.
  195.     -- 
  196.     --  This routine only actually writes the data that concerns the object
  197.     --  as a whole, such as class, and uses <somDumpSelfInt> to describe
  198.     --  the object's current state.  This approach allows readable
  199.     --  descriptions of compound objects to be constructed.
  200.     -- 
  201.     --  Generally it is not necessary to override this method, if it is
  202.     --  overriden it generally must be completely replaced.
  203.  
  204.     void   somDumpSelfInt(long level), descriptor = ::SOMObject::somDumpSelfInt;
  205.  
  206.     --  Uses <SOMOutCharRoutine> to write in the current state of this object.
  207.     --  Generally this method will need to be overridden.  When overriding
  208.     --  it, begin by calling the parent class form of this method and then
  209.     --  write in a description of your class's instance data. This will
  210.     --  result in a description of all the object's instance data going
  211.     --  from its root ancestor class to its specific class.
  212.  
  213. #include <somcls.sc> 
  214.