home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / tolkit45.zip / os2tk45 / som / include / srkset.xh < prev    next >
Text File  |  1999-02-22  |  23KB  |  802 lines

  1.  
  2. /*
  3.  * This file was generated by the SOM Compiler.
  4.  * FileName: srkset.xh.
  5.  * Generated using:
  6.  *     SOM Precompiler somipc: 2.29.1.17
  7.  *     SOM Emitter emitxh: 2.47
  8.  */
  9.  
  10. /*
  11.  *    COMPONENT_NAME: somp
  12.  * 
  13.  *    ORIGINS: 27
  14.  * 
  15.  * 
  16.  *     25H7912  (C)  COPYRIGHT International Business Machines Corp. 1992,1996,1996
  17.  *    All Rights Reserved
  18.  *    Licensed Materials - Property of IBM
  19.  *    US Government Users Restricted Rights - Use, duplication or
  20.  *    disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  21.  * 
  22.  * 
  23.  *   21055    [04/12/96]  partha    make the dict.idl include come from private
  24.  */
  25.  
  26.  
  27. #ifndef SOM_SOMPKeyedSet_xh
  28. #define SOM_SOMPKeyedSet_xh
  29.  
  30. class SOMPKeyedSet;
  31.  
  32. /*
  33.  *  A set of objects identified by a key.
  34.  */
  35.  
  36. #define SOMPKeyedSet_MajorVersion 2
  37. #define SOMPKeyedSet_MinorVersion 1
  38.  
  39. /* C++ SOM defs */
  40. #include <somcls.xh>
  41. #include <somcm.xh>
  42.  
  43. /* C++ parent defs */
  44. #ifndef SOM_SOMObject_xh
  45. #include <somobj.xh>
  46. #endif
  47.  
  48. #ifndef SOMPKeyedSet_API
  49. #define SOMPKeyedSet_API
  50. /*
  51.  * -- The Class API
  52.  */
  53.  
  54. /*
  55.  * Start of bindings for IDL types
  56.  */
  57.  
  58. class SOMClass;
  59. class SOMObject;
  60.  
  61. /*
  62.  * End of bindings for IDL types.
  63.  */
  64.  
  65. /* A procedure to create the SOMPKeyedSet Class */
  66. SOMEXTERN SOMClass * SOMLINK SOMPKeyedSetNewClass(
  67.         integer4 majorVersion,
  68.         integer4 minorVersion);
  69.  
  70. /* The API to the SOMPKeyedSet class object, and the methods it introduces. */
  71. SOMEXTERN struct SOMPKeyedSetClassDataStructure {
  72.     SOMClass *classObject;
  73.     somMToken sompGetFirstObject;
  74. } SOMDLINK SOMPKeyedSetClassData;
  75. #define _SOMPKeyedSet SOMPKeyedSetClassData.classObject
  76.  
  77. /* The API to parentMtabs for SOMPKeyedSet, and the instance data it introduces. */
  78. SOMEXTERN struct SOMPKeyedSetCClassDataStructure {
  79.     somMethodTabs parentMtab;
  80.     somDToken              instanceDataToken;
  81. } SOMDLINK SOMPKeyedSetCClassData;
  82.  
  83. /*
  84.  * -- Typedefs for SOMPKeyedSet Method Procedures
  85.  */
  86. SOMEXTERN {
  87. typedef SOMObject*   SOMLINK somTP_SOMPKeyedSet_sompGetFirstObject(SOMPKeyedSet *somSelf, Environment *ev);
  88. typedef somTP_SOMPKeyedSet_sompGetFirstObject *somTD_SOMPKeyedSet_sompGetFirstObject;
  89.  
  90. /*
  91.  * -- Typedefs for Reintroduced Wrapper Methods
  92.  */
  93. typedef void   SOMLINK somTP_SOMPKeyedSet_somDefaultInit(SOMPKeyedSet *somSelf, 
  94.         som3InitCtrl* ctrl);
  95. typedef somTP_SOMPKeyedSet_somDefaultInit *somTD_SOMPKeyedSet_somDefaultInit;
  96. typedef void   SOMLINK somTP_SOMPKeyedSet_somDestruct(SOMPKeyedSet *somSelf, 
  97.         octet doFree, 
  98.         som3DestructCtrl* ctrl);
  99. typedef somTP_SOMPKeyedSet_somDestruct *somTD_SOMPKeyedSet_somDestruct;
  100. typedef void   SOMLINK somTP_SOMPKeyedSet_somDefaultCopyInit(SOMPKeyedSet *somSelf, 
  101.         som3InitCtrl* ctrl, 
  102.         SOMObject* fromObj);
  103. typedef somTP_SOMPKeyedSet_somDefaultCopyInit *somTD_SOMPKeyedSet_somDefaultCopyInit;
  104. typedef SOMPKeyedSet*   SOMLINK somTP_SOMPKeyedSet_somDefaultAssign(SOMPKeyedSet *somSelf, 
  105.         som3AssignCtrl* ctrl, 
  106.         SOMObject* fromObj);
  107. typedef somTP_SOMPKeyedSet_somDefaultAssign *somTD_SOMPKeyedSet_somDefaultAssign;
  108. typedef void   SOMLINK somTP_SOMPKeyedSet_somDefaultConstCopyInit(SOMPKeyedSet *somSelf, 
  109.         som3InitCtrl* ctrl, 
  110.         SOMObject* fromObj);
  111. typedef somTP_SOMPKeyedSet_somDefaultConstCopyInit *somTD_SOMPKeyedSet_somDefaultConstCopyInit;
  112. typedef void   SOMLINK somTP_SOMPKeyedSet_somDefaultVCopyInit(SOMPKeyedSet *somSelf, 
  113.         som3InitCtrl* ctrl, 
  114.         SOMObject* fromObj);
  115. typedef somTP_SOMPKeyedSet_somDefaultVCopyInit *somTD_SOMPKeyedSet_somDefaultVCopyInit;
  116. typedef void   SOMLINK somTP_SOMPKeyedSet_somDefaultConstVCopyInit(SOMPKeyedSet *somSelf, 
  117.         som3InitCtrl* ctrl, 
  118.         SOMObject* fromObj);
  119. typedef somTP_SOMPKeyedSet_somDefaultConstVCopyInit *somTD_SOMPKeyedSet_somDefaultConstVCopyInit;
  120. typedef SOMPKeyedSet*   SOMLINK somTP_SOMPKeyedSet_somDefaultConstAssign(SOMPKeyedSet *somSelf, 
  121.         som3AssignCtrl* ctrl, 
  122.         SOMObject* fromObj);
  123. typedef somTP_SOMPKeyedSet_somDefaultConstAssign *somTD_SOMPKeyedSet_somDefaultConstAssign;
  124. typedef SOMPKeyedSet*   SOMLINK somTP_SOMPKeyedSet_somDefaultVAssign(SOMPKeyedSet *somSelf, 
  125.         som3AssignCtrl* ctrl, 
  126.         SOMObject* fromObj);
  127. typedef somTP_SOMPKeyedSet_somDefaultVAssign *somTD_SOMPKeyedSet_somDefaultVAssign;
  128. typedef SOMPKeyedSet*   SOMLINK somTP_SOMPKeyedSet_somDefaultConstVAssign(SOMPKeyedSet *somSelf, 
  129.         som3AssignCtrl* ctrl, 
  130.         SOMObject* fromObj);
  131. typedef somTP_SOMPKeyedSet_somDefaultConstVAssign *somTD_SOMPKeyedSet_somDefaultConstVAssign;
  132. typedef void   SOMLINK somTP_SOMPKeyedSet_somInit(SOMPKeyedSet *somSelf);
  133. typedef somTP_SOMPKeyedSet_somInit *somTD_SOMPKeyedSet_somInit;
  134. typedef void   SOMLINK somTP_SOMPKeyedSet_somFree(SOMPKeyedSet *somSelf);
  135. typedef somTP_SOMPKeyedSet_somFree *somTD_SOMPKeyedSet_somFree;
  136. typedef void   SOMLINK somTP_SOMPKeyedSet_somUninit(SOMPKeyedSet *somSelf);
  137. typedef somTP_SOMPKeyedSet_somUninit *somTD_SOMPKeyedSet_somUninit;
  138. typedef SOMClass*   SOMLINK somTP_SOMPKeyedSet_somGetClass(SOMPKeyedSet *somSelf);
  139. typedef somTP_SOMPKeyedSet_somGetClass *somTD_SOMPKeyedSet_somGetClass;
  140. typedef string   SOMLINK somTP_SOMPKeyedSet_somGetClassName(SOMPKeyedSet *somSelf);
  141. typedef somTP_SOMPKeyedSet_somGetClassName *somTD_SOMPKeyedSet_somGetClassName;
  142. typedef long   SOMLINK somTP_SOMPKeyedSet_somGetSize(SOMPKeyedSet *somSelf);
  143. typedef somTP_SOMPKeyedSet_somGetSize *somTD_SOMPKeyedSet_somGetSize;
  144. typedef boolean   SOMLINK somTP_SOMPKeyedSet_somIsA(SOMPKeyedSet *somSelf, 
  145.         SOMClass* aClassObj);
  146. typedef somTP_SOMPKeyedSet_somIsA *somTD_SOMPKeyedSet_somIsA;
  147. typedef boolean   SOMLINK somTP_SOMPKeyedSet_somIsInstanceOf(SOMPKeyedSet *somSelf, 
  148.         SOMClass* aClassObj);
  149. typedef somTP_SOMPKeyedSet_somIsInstanceOf *somTD_SOMPKeyedSet_somIsInstanceOf;
  150. typedef boolean   SOMLINK somTP_SOMPKeyedSet_somRespondsTo(SOMPKeyedSet *somSelf, 
  151.         somId mId);
  152. typedef somTP_SOMPKeyedSet_somRespondsTo *somTD_SOMPKeyedSet_somRespondsTo;
  153. typedef boolean   SOMLINK somTP_SOMPKeyedSet_somDispatch(SOMPKeyedSet *somSelf, 
  154.         somToken* retValue, 
  155.         somId methodId, 
  156.         va_list ap);
  157. typedef somTP_SOMPKeyedSet_somDispatch *somTD_SOMPKeyedSet_somDispatch;
  158. typedef boolean   SOMLINK somTP_SOMPKeyedSet_somClassDispatch(SOMPKeyedSet *somSelf, 
  159.         SOMClass* clsObj, 
  160.         somToken* retValue, 
  161.         somId methodId, 
  162.         va_list ap);
  163. typedef somTP_SOMPKeyedSet_somClassDispatch *somTD_SOMPKeyedSet_somClassDispatch;
  164. typedef boolean   SOMLINK somTP_SOMPKeyedSet_somCastObj(SOMPKeyedSet *somSelf, 
  165.         SOMClass* cls);
  166. typedef somTP_SOMPKeyedSet_somCastObj *somTD_SOMPKeyedSet_somCastObj;
  167. typedef boolean   SOMLINK somTP_SOMPKeyedSet_somResetObj(SOMPKeyedSet *somSelf);
  168. typedef somTP_SOMPKeyedSet_somResetObj *somTD_SOMPKeyedSet_somResetObj;
  169. typedef void   SOMLINK somTP_SOMPKeyedSet_somDispatchV(SOMPKeyedSet *somSelf, 
  170.         somId methodId, 
  171.         somId descriptor, 
  172.         va_list ap);
  173. typedef somTP_SOMPKeyedSet_somDispatchV *somTD_SOMPKeyedSet_somDispatchV;
  174. typedef long   SOMLINK somTP_SOMPKeyedSet_somDispatchL(SOMPKeyedSet *somSelf, 
  175.         somId methodId, 
  176.         somId descriptor, 
  177.         va_list ap);
  178. typedef somTP_SOMPKeyedSet_somDispatchL *somTD_SOMPKeyedSet_somDispatchL;
  179. typedef void*   SOMLINK somTP_SOMPKeyedSet_somDispatchA(SOMPKeyedSet *somSelf, 
  180.         somId methodId, 
  181.         somId descriptor, 
  182.         va_list ap);
  183. typedef somTP_SOMPKeyedSet_somDispatchA *somTD_SOMPKeyedSet_somDispatchA;
  184. typedef double   SOMLINK somTP_SOMPKeyedSet_somDispatchD(SOMPKeyedSet *somSelf, 
  185.         somId methodId, 
  186.         somId descriptor, 
  187.         va_list ap);
  188. typedef somTP_SOMPKeyedSet_somDispatchD *somTD_SOMPKeyedSet_somDispatchD;
  189. typedef SOMObject*   SOMLINK somTP_SOMPKeyedSet_somPrintSelf(SOMPKeyedSet *somSelf);
  190. typedef somTP_SOMPKeyedSet_somPrintSelf *somTD_SOMPKeyedSet_somPrintSelf;
  191. typedef void   SOMLINK somTP_SOMPKeyedSet_somDumpSelf(SOMPKeyedSet *somSelf, 
  192.         long level);
  193. typedef somTP_SOMPKeyedSet_somDumpSelf *somTD_SOMPKeyedSet_somDumpSelf;
  194. typedef void   SOMLINK somTP_SOMPKeyedSet_somDumpSelfInt(SOMPKeyedSet *somSelf, 
  195.         long level);
  196. typedef somTP_SOMPKeyedSet_somDumpSelfInt *somTD_SOMPKeyedSet_somDumpSelfInt;
  197. }
  198.  
  199. #endif /* SOMPKeyedSet_API */
  200.  
  201.  
  202. /*
  203.  * -- This emitter treats Method Tokens as Thunks by default.
  204.  * -- Use the sc modifier "nothunks" to change this default
  205.  */
  206. #undef somresolve_
  207. #define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
  208.  
  209. /*
  210.  * -- The C++ Wrapper Class for SOMPKeyedSet
  211.  */
  212. class SOMPKeyedSet : public SOMObject
  213. {
  214. /*
  215.  *  A set of objects identified by a key.
  216.  */
  217. public:
  218.  
  219. // SOMPKeyedSet::new creates the class object if necessary, and then uses somNewNoInit
  220. // to allocate memory and create the object. Initialization is in ctors.
  221. void *operator new(size_t)
  222. {
  223.    if (!_SOMPKeyedSet) SOMPKeyedSetNewClass(SOMPKeyedSet_MajorVersion,SOMPKeyedSet_MinorVersion);
  224.    return (void*)
  225.       SOM_Resolve(_SOMPKeyedSet,SOMClass,somNewNoInit)
  226.          ((SOMClass *)((void*)_SOMPKeyedSet));
  227. }
  228.  
  229. // SOMPKeyedSet::delete uses somDestruct.
  230. void operator delete(void * obj)
  231. {
  232.    if (obj && *(void**)obj) {
  233.       SOM_Resolve(obj,SOMObject,somFree)
  234.          ((SOMObject*)obj);
  235.    }
  236. }
  237.  
  238. SOMPKeyedSet& operator=(SOMPKeyedSet& fromObj)
  239. {
  240.    this->somDefaultAssign(0,(SOMObject*)((void*)&fromObj));
  241.    return *this;
  242. }
  243.  
  244. SOMPKeyedSet()
  245. {
  246.    if (*(void**)this != 
  247.        ((somParentMtabStructPtr)
  248.         (SOMPKeyedSetCClassData.parentMtab))->mtab)
  249.       return;
  250.    ((SOMObject*)((void*)this))->somDefaultInit(0);
  251. }
  252.  
  253. SOMPKeyedSet(SOMPKeyedSet* fromObj)
  254. {
  255.    if (*(void**)this != 
  256.        ((somParentMtabStructPtr)
  257.         (SOMPKeyedSetCClassData.parentMtab))->mtab)
  258.       return;
  259.    ((SOMObject*)((void*)this))->somDefaultCopyInit(0,((SOMObject*)((void*)fromObj)));
  260. }
  261.  
  262. #ifdef __IBMCPP__
  263. #pragma info(nocnv,nopar)
  264. #endif
  265. SOMPKeyedSet(const SOMPKeyedSet* fromObj)
  266. {
  267.    if (*(void**)this != 
  268.        ((somParentMtabStructPtr)
  269.         (SOMPKeyedSetCClassData.parentMtab))->mtab)
  270.       return;
  271.    ((SOMObject*)((void*)this))->somDefaultConstCopyInit(0,((SOMObject*)((void*)fromObj)));
  272. }
  273. #ifdef __IBMCPP__
  274. #pragma info(restore)
  275. #endif
  276.  
  277.  
  278. /* method: sompGetFirstObject */
  279. SOMObject*   sompGetFirstObject(Environment *ev)
  280. {
  281. /*
  282.  *  Get first object in this set.
  283.  *  If set is empty, returns NULL.
  284.  */
  285.    return SOM_ResolveD(this,SOMPKeyedSet,SOMPKeyedSet,sompGetFirstObject)
  286.     (this, ev);
  287. }
  288.  
  289.  
  290. /*
  291.  * Reintroduce inherited methods
  292.  */
  293.  
  294. /* initializer method: somDefaultInit */
  295. void   somDefaultInit(som3InitCtrl* ctrl)
  296. {
  297. /*
  298.  *  A default initializer for a SOM object. Passing a null ctrl
  299.  *  indicates to the receiver that its class is the class of the
  300.  *  object being initialized, whereby the initializer will determine
  301.  *  an appropriate control structure.
  302.  */
  303.    SOM_ResolveD(this,SOMPKeyedSet,SOMObject,somDefaultInit)
  304.     (this,ctrl);
  305. }
  306.  
  307.  
  308. /* method: somDestruct */
  309. void   somDestruct(octet doFree, 
  310.         som3DestructCtrl* ctrl)
  311. {
  312. /*
  313.  *  The default destructor for a SOM object. A nonzero <doFree>
  314.  *  indicates that the object storage should be freed by the
  315.  *  object's class (via somDeallocate) after uninitialization.
  316.  *  As with somDefaultInit, a null ctrl can be passed.
  317.  */
  318.    SOM_ResolveD(this,SOMPKeyedSet,SOMObject,somDestruct)
  319.     (this,doFree,ctrl);
  320. }
  321.  
  322.  
  323. /* initializer method: somDefaultCopyInit */
  324. void   somDefaultCopyInit(som3InitCtrl* ctrl, 
  325.         SOMObject* fromObj)
  326. {
  327. /*
  328.  *  A default copy constructor. Use this to make copies of objects for
  329.  *  calling methods with "by-value" argument semantics.
  330.  */
  331.    SOM_ResolveD(this,SOMPKeyedSet,SOMObject,somDefaultCopyInit)
  332.     (this,ctrl,fromObj);
  333. }
  334.  
  335.  
  336. /* method: somDefaultAssign */
  337. SOMPKeyedSet*  somDefaultAssign(som3AssignCtrl* ctrl, 
  338.         SOMObject* fromObj)
  339. {
  340. /*
  341.  *  A default assignment operator. Use this to "assign" the state of one
  342.  *  object to another.
  343.  */
  344.    return SOM_ResolveD(this,SOMPKeyedSet,SOMObject,somDefaultAssign)
  345.     (this,ctrl,fromObj);
  346. }
  347.  
  348.  
  349. /* initializer method: somDefaultConstCopyInit */
  350. void   somDefaultConstCopyInit(som3InitCtrl* ctrl, 
  351.         SOMObject* fromObj)
  352. {
  353. /*
  354.  *  A default copy constructor that uses a const fromObj.
  355.  */
  356.    SOM_ResolveD(this,SOMPKeyedSet,SOMObject,somDefaultConstCopyInit)
  357.     (this,ctrl,fromObj);
  358. }
  359.  
  360.  
  361. /* initializer method: somDefaultVCopyInit */
  362. void   somDefaultVCopyInit(som3InitCtrl* ctrl, 
  363.         SOMObject* fromObj)
  364. {
  365. /*
  366.  *  A default copy constructor that uses a volatile fromObj.
  367.  */
  368.    SOM_ResolveD(this,SOMPKeyedSet,SOMObject,somDefaultVCopyInit)
  369.     (this,ctrl,fromObj);
  370. }
  371.  
  372.  
  373. /* initializer method: somDefaultConstVCopyInit */
  374. void   somDefaultConstVCopyInit(som3InitCtrl* ctrl, 
  375.         SOMObject* fromObj)
  376. {
  377. /*
  378.  *  A default copy constructor that uses a const volatile fromObj.
  379.  */
  380.    SOM_ResolveD(this,SOMPKeyedSet,SOMObject,somDefaultConstVCopyInit)
  381.     (this,ctrl,fromObj);
  382. }
  383.  
  384.  
  385. /* method: somDefaultConstAssign */
  386. SOMPKeyedSet*  somDefaultConstAssign(som3AssignCtrl* ctrl, 
  387.         SOMObject* fromObj)
  388. {
  389. /*
  390.  *  A default assignment operator that uses a const fromObj.
  391.  */
  392.    return SOM_ResolveD(this,SOMPKeyedSet,SOMObject,somDefaultConstAssign)
  393.     (this,ctrl,fromObj);
  394. }
  395.  
  396.  
  397. /* method: somDefaultVAssign */
  398. SOMPKeyedSet*  somDefaultVAssign(som3AssignCtrl* ctrl, 
  399.         SOMObject* fromObj)
  400. {
  401. /*
  402.  *  A default assignment operator that uses a volatile fromObj.
  403.  */
  404.    return SOM_ResolveD(this,SOMPKeyedSet,SOMObject,somDefaultVAssign)
  405.     (this,ctrl,fromObj);
  406. }
  407.  
  408.  
  409. /* method: somDefaultConstVAssign */
  410. SOMPKeyedSet*  somDefaultConstVAssign(som3AssignCtrl* ctrl, 
  411.         SOMObject* fromObj)
  412. {
  413. /*
  414.  *  A default assignment operator that uses a const volatile fromObj.
  415.  */
  416.    return SOM_ResolveD(this,SOMPKeyedSet,SOMObject,somDefaultConstVAssign)
  417.     (this,ctrl,fromObj);
  418. }
  419.  
  420.  
  421. /* method: somInit */
  422. void   somInit()
  423. {
  424. /*
  425.  *  Obsolete but still supported. Override somDefaultInit instead of somInit.
  426.  */
  427.    SOM_ResolveD(this,SOMPKeyedSet,SOMObject,somInit)
  428.     (this);
  429. }
  430.  
  431.  
  432. /* method: somFree */
  433. void   somFree()
  434. {
  435. /*
  436.  *  Use as directed by framework implementations.
  437.  */
  438.    SOM_ResolveD(this,SOMPKeyedSet,SOMObject,somFree)
  439.     (this);
  440. }
  441.  
  442.  
  443. /* method: somUninit */
  444. void   somUninit()
  445. {
  446. /*
  447.  *  Obsolete but still supported. Override somDestruct instead of somUninit.
  448.  */
  449.    SOM_ResolveD(this,SOMPKeyedSet,SOMObject,somUninit)
  450.     (this);
  451. }
  452.  
  453.  
  454. /* method: somGetClass */
  455. SOMClass*   somGetClass()
  456. {
  457. /*
  458.  *  Return the receiver's class.
  459.  */
  460.    return SOM_ResolveD(this,SOMPKeyedSet,SOMObject,somGetClass)
  461.     (this);
  462. }
  463.  
  464.  
  465. /* method: somGetClassName */
  466. string   somGetClassName()
  467. {
  468. /*
  469.  *  Return the name of the receiver's class.
  470.  */
  471.    return SOM_ResolveD(this,SOMPKeyedSet,SOMObject,somGetClassName)
  472.     (this);
  473. }
  474.  
  475.  
  476. /* method: somGetSize */
  477. long   somGetSize()
  478. {
  479. /*
  480.  *  Return the size of the receiver.
  481.  */
  482.    return SOM_ResolveD(this,SOMPKeyedSet,SOMObject,somGetSize)
  483.     (this);
  484. }
  485.  
  486.  
  487. /* method: somIsA */
  488. boolean   somIsA(SOMClass* aClassObj)
  489. {
  490. /*
  491.  *  Returns 1 (true) if the receiver responds to methods
  492.  *  introduced by <aClassObj>, and 0 (false) otherwise.
  493.  */
  494.    return SOM_ResolveD(this,SOMPKeyedSet,SOMObject,somIsA)
  495.     (this,aClassObj);
  496. }
  497.  
  498.  
  499. /* method: somIsInstanceOf */
  500. boolean   somIsInstanceOf(SOMClass* aClassObj)
  501. {
  502. /*
  503.  *  Returns 1 (true) if the receiver is an instance of
  504.  *  <aClassObj> and 0 (false) otherwise.
  505.  */
  506.    return SOM_ResolveD(this,SOMPKeyedSet,SOMObject,somIsInstanceOf)
  507.     (this,aClassObj);
  508. }
  509.  
  510.  
  511. /* method: somRespondsTo */
  512. boolean   somRespondsTo(somId mId)
  513. {
  514. /*
  515.  *  Returns 1 (true) if the indicated method can be invoked
  516.  *  on the receiver and 0 (false) otherwise.
  517.  */
  518.    return SOM_ResolveD(this,SOMPKeyedSet,SOMObject,somRespondsTo)
  519.     (this,mId);
  520. }
  521.  
  522.  
  523. /* va_list method: somDispatch */
  524.  
  525. /*
  526.  *  This method provides a generic, class-specific dispatch mechanism.
  527.  *  It accepts as input <retValue> a pointer to the memory area to be
  528.  *  loaded with the result of dispatching the method indicated by
  529.  *  <methodId> using the arguments in <ap>. <ap> contains the object
  530.  *  on which the method is to be invoked as the first argument.
  531.  */
  532. /* the va_list invocation form */
  533. boolean   SOMPKeyedSet_somDispatch(somToken* retValue, 
  534.         somId methodId, 
  535.         va_list ap)
  536. {return SOM_ResolveD(this,SOMPKeyedSet,SOMObject,somDispatch)
  537.     (this,retValue,methodId,ap);
  538. }
  539.  
  540. /* the varargs invocation form */
  541. boolean   somDispatch(somToken* retValue, 
  542.         somId methodId, 
  543.         ...)
  544. {
  545. /*
  546.  *  This method provides a generic, class-specific dispatch mechanism.
  547.  *  It accepts as input <retValue> a pointer to the memory area to be
  548.  *  loaded with the result of dispatching the method indicated by
  549.  *  <methodId> using the arguments in <ap>. <ap> contains the object
  550.  *  on which the method is to be invoked as the first argument.
  551.  */
  552.    va_list ap;
  553.    va_start(ap, methodId);
  554.    boolean __somResult = 
  555.       SOM_ResolveD(this,SOMPKeyedSet,SOMObject,somDispatch)
  556.     (this,retValue,methodId,ap);
  557.    va_end(ap);
  558.    return __somResult;
  559. }
  560.  
  561.  
  562. /* va_list method: somClassDispatch */
  563.  
  564. /*
  565.  *  Like somDispatch, but method resolution for static methods is done
  566.  *  according to the clsObj instance method table.
  567.  */
  568. /* the va_list invocation form */
  569. boolean   SOMPKeyedSet_somClassDispatch(SOMClass* clsObj, 
  570.         somToken* retValue, 
  571.         somId methodId, 
  572.         va_list ap)
  573. {return SOM_ResolveD(this,SOMPKeyedSet,SOMObject,somClassDispatch)
  574.     (this,clsObj,retValue,methodId,ap);
  575. }
  576.  
  577. /* the varargs invocation form */
  578. boolean   somClassDispatch(SOMClass* clsObj, 
  579.         somToken* retValue, 
  580.         somId methodId, 
  581.         ...)
  582. {
  583. /*
  584.  *  Like somDispatch, but method resolution for static methods is done
  585.  *  according to the clsObj instance method table.
  586.  */
  587.    va_list ap;
  588.    va_start(ap, methodId);
  589.    boolean __somResult = 
  590.       SOM_ResolveD(this,SOMPKeyedSet,SOMObject,somClassDispatch)
  591.     (this,clsObj,retValue,methodId,ap);
  592.    va_end(ap);
  593.    return __somResult;
  594. }
  595.  
  596.  
  597. /* method: somCastObj */
  598. boolean   somCastObj(SOMClass* cls)
  599. {
  600. /*
  601.  *  cast the receiving object to cls (which must be an ancestor of the
  602.  *  objects true class. Returns true on success.
  603.  */
  604.    return SOM_ResolveD(this,SOMPKeyedSet,SOMObject,somCastObj)
  605.     (this,cls);
  606. }
  607.  
  608.  
  609. /* method: somResetObj */
  610. boolean   somResetObj()
  611. {
  612. /*
  613.  *  reset an object to its true class. Returns true always.
  614.  */
  615.    return SOM_ResolveD(this,SOMPKeyedSet,SOMObject,somResetObj)
  616.     (this);
  617. }
  618.  
  619.  
  620. /* va_list method: somDispatchV */
  621.  
  622. /*
  623.  *  Obsolete. Use somDispatch instead.
  624.  */
  625. /* the va_list invocation form */
  626. void   SOMPKeyedSet_somDispatchV(somId methodId, 
  627.         somId descriptor, 
  628.         va_list ap)
  629. {   SOM_ResolveD(this,SOMPKeyedSet,SOMObject,somDispatchV)
  630.     (this,methodId,descriptor,ap);
  631. }
  632.  
  633. /* the varargs invocation form */
  634. void   somDispatchV(somId methodId, 
  635.         somId descriptor, 
  636.         ...)
  637. {
  638. /*
  639.  *  Obsolete. Use somDispatch instead.
  640.  */
  641.    va_list ap;
  642.    va_start(ap, descriptor);
  643.    SOM_ResolveD(this,SOMPKeyedSet,SOMObject,somDispatchV)
  644.     (this,methodId,descriptor,ap);
  645.    va_end(ap);
  646. }
  647.  
  648.  
  649. /* va_list method: somDispatchL */
  650.  
  651. /*
  652.  *  Obsolete. Use somDispatch instead.
  653.  */
  654. /* the va_list invocation form */
  655. long   SOMPKeyedSet_somDispatchL(somId methodId, 
  656.         somId descriptor, 
  657.         va_list ap)
  658. {return SOM_ResolveD(this,SOMPKeyedSet,SOMObject,somDispatchL)
  659.     (this,methodId,descriptor,ap);
  660. }
  661.  
  662. /* the varargs invocation form */
  663. long   somDispatchL(somId methodId, 
  664.         somId descriptor, 
  665.         ...)
  666. {
  667. /*
  668.  *  Obsolete. Use somDispatch instead.
  669.  */
  670.    va_list ap;
  671.    va_start(ap, descriptor);
  672.    long __somResult = 
  673.       SOM_ResolveD(this,SOMPKeyedSet,SOMObject,somDispatchL)
  674.     (this,methodId,descriptor,ap);
  675.    va_end(ap);
  676.    return __somResult;
  677. }
  678.  
  679.  
  680. /* va_list method: somDispatchA */
  681.  
  682. /*
  683.  *  Obsolete. Use somDispatch instead.
  684.  */
  685. /* the va_list invocation form */
  686. void*   SOMPKeyedSet_somDispatchA(somId methodId, 
  687.         somId descriptor, 
  688.         va_list ap)
  689. {return SOM_ResolveD(this,SOMPKeyedSet,SOMObject,somDispatchA)
  690.     (this,methodId,descriptor,ap);
  691. }
  692.  
  693. /* the varargs invocation form */
  694. void*   somDispatchA(somId methodId, 
  695.         somId descriptor, 
  696.         ...)
  697. {
  698. /*
  699.  *  Obsolete. Use somDispatch instead.
  700.  */
  701.    va_list ap;
  702.    va_start(ap, descriptor);
  703.    void* __somResult = 
  704.       SOM_ResolveD(this,SOMPKeyedSet,SOMObject,somDispatchA)
  705.     (this,methodId,descriptor,ap);
  706.    va_end(ap);
  707.    return __somResult;
  708. }
  709.  
  710.  
  711. /* va_list method: somDispatchD */
  712.  
  713. /*
  714.  *  Obsolete. Use somDispatch instead.
  715.  */
  716. /* the va_list invocation form */
  717. double   SOMPKeyedSet_somDispatchD(somId methodId, 
  718.         somId descriptor, 
  719.         va_list ap)
  720. {return SOM_ResolveD(this,SOMPKeyedSet,SOMObject,somDispatchD)
  721.     (this,methodId,descriptor,ap);
  722. }
  723.  
  724. /* the varargs invocation form */
  725. double   somDispatchD(somId methodId, 
  726.         somId descriptor, 
  727.         ...)
  728. {
  729. /*
  730.  *  Obsolete. Use somDispatch instead.
  731.  */
  732.    va_list ap;
  733.    va_start(ap, descriptor);
  734.    double __somResult = 
  735.       SOM_ResolveD(this,SOMPKeyedSet,SOMObject,somDispatchD)
  736.     (this,methodId,descriptor,ap);
  737.    va_end(ap);
  738.    return __somResult;
  739. }
  740.  
  741.  
  742. /* method: somPrintSelf */
  743. SOMObject*   somPrintSelf()
  744. {
  745. /*
  746.  *  Uses <SOMOutCharRoutine> to write a brief string with identifying
  747.  *  information about this object.  The default implementation just gives
  748.  *  the object's class name and its address in memory.
  749.  *  <self> is returned.
  750.  */
  751.    return SOM_ResolveD(this,SOMPKeyedSet,SOMObject,somPrintSelf)
  752.     (this);
  753. }
  754.  
  755.  
  756. /* method: somDumpSelf */
  757. void   somDumpSelf(long level)
  758. {
  759. /*
  760.  *  Uses <SOMOutCharRoutine> to write a detailed description of this object
  761.  *  and its current state.
  762.  * 
  763.  *  <level> indicates the nesting level for describing compound objects
  764.  *  it must be greater than or equal to zero.  All lines in the
  765.  *  description will be preceeded by <2*level> spaces.
  766.  * 
  767.  *  This routine only actually writes the data that concerns the object
  768.  *  as a whole, such as class, and uses <somDumpSelfInt> to describe
  769.  *  the object's current state.  This approach allows readable
  770.  *  descriptions of compound objects to be constructed.
  771.  * 
  772.  *  Generally it is not necessary to override this method, if it is
  773.  *  overriden it generally must be completely replaced.
  774.  */
  775.    SOM_ResolveD(this,SOMPKeyedSet,SOMObject,somDumpSelf)
  776.     (this,level);
  777. }
  778.  
  779.  
  780. /* method: somDumpSelfInt */
  781. void   somDumpSelfInt(long level)
  782. {
  783. /*
  784.  *  Uses <SOMOutCharRoutine> to write in the current state of this object.
  785.  *  Generally this method will need to be overridden.  When overriding
  786.  *  it, begin by calling the parent class form of this method and then
  787.  *  write in a description of your class's instance data. This will
  788.  *  result in a description of all the object's instance data going
  789.  *  from its root ancestor class to its specific class.
  790.  */
  791.    SOM_ResolveD(this,SOMPKeyedSet,SOMObject,somDumpSelfInt)
  792.     (this,level);
  793. }
  794.  
  795.  
  796.  
  797. };   /* SOMPKeyedSet */
  798.  
  799.  
  800.  
  801. #endif       /* SOM_SOMPKeyedSet_xh */
  802.