home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / warptlk3.zip / TOOLKIT / SOM / INCLUDE / SOMOBJ.SC < prev    next >
Text File  |  1995-08-24  |  9KB  |  226 lines

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