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

  1.  
  2. /*
  3.  * This file was generated by the SOM Compiler.
  4.  * FileName: thash.xh.
  5.  * Generated using:
  6.  *     SOM Precompiler somipc: 2.29.1.17
  7.  *     SOM Emitter emitxh: 2.47
  8.  */
  9.  
  10. /*
  11.  *    COMPONENT_NAME: somuc
  12.  * 
  13.  *    ORIGINS: 82, 81, 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.  *    Copyright ⌐ 1988, 1989 Apple Computer, Inc. All rights reserved.
  23.  * 
  24.  * CLASS_NAME: somf_THashTable
  25.  * 
  26.  * DESCRIPTION: Every Hash Table has a set of entries which associate a
  27.  *              key to a value.  Hash tables provide for fast lookup of a
  28.  *              value when given a key even if there are a large number of
  29.  *              entries in the table.  Functions are provided for the usual
  30.  *              things (insert, delete, etc.) as well as for controlling when
  31.  *              rehashing will occur, and the growth of the table when a
  32.  *              rehash occurs.
  33.  * 
  34.  */
  35.  
  36.  
  37. #ifndef SOM_somf_THashTable_xh
  38. #define SOM_somf_THashTable_xh
  39.  
  40. class somf_THashTable;
  41.  
  42. #define somf_THashTable_MajorVersion 2
  43. #define somf_THashTable_MinorVersion 1
  44.  
  45. /* C++ SOM defs */
  46. #include <somcls.xh>
  47. #include <somcm.xh>
  48.  
  49. /* C++ parent defs */
  50. #ifndef SOM_somf_MCollectible_xh
  51. #include <mcollect.xh>
  52. #endif
  53.  
  54. #ifndef somf_THashTable_API
  55. #define somf_THashTable_API
  56. /*
  57.  * -- The Class API
  58.  */
  59.  
  60. /*
  61.  * Start of bindings for IDL types
  62.  */
  63.  
  64. class SOMClass;
  65. class SOMObject;
  66. class THAssoc;
  67. #define somf_THashTable_kDefaultHashTableSize 23 /* 23 */
  68. #define somf_THashTable_kDefaultGrowthRate 20 /* 20 */
  69. #define somf_THashTable_kDefaultRehashThreshold 80 /* 80 */
  70. typedef unsigned long somf_THashTable_ETableClassification;
  71. #define somf_THashTable_kUnchecked 1UL
  72. #define somf_THashTable_kNormal 2UL
  73. #define somf_THashTable_kFast 3UL
  74.  
  75. #ifndef SOM_DONT_USE_SHORT_NAMES
  76. #ifndef SOMTGD_kDefaultHashTableSize
  77.     #ifdef kDefaultHashTableSize
  78.         #undef kDefaultHashTableSize
  79.         #define SOMTGD_kDefaultHashTableSize 1
  80.     #else
  81.         #define kDefaultHashTableSize somf_THashTable_kDefaultHashTableSize
  82.     #endif /* kDefaultHashTableSize */
  83. #endif /* SOMTGD_kDefaultHashTableSize */
  84. #ifndef SOMTGD_kDefaultGrowthRate
  85.     #ifdef kDefaultGrowthRate
  86.         #undef kDefaultGrowthRate
  87.         #define SOMTGD_kDefaultGrowthRate 1
  88.     #else
  89.         #define kDefaultGrowthRate somf_THashTable_kDefaultGrowthRate
  90.     #endif /* kDefaultGrowthRate */
  91. #endif /* SOMTGD_kDefaultGrowthRate */
  92. #ifndef SOMTGD_kDefaultRehashThreshold
  93.     #ifdef kDefaultRehashThreshold
  94.         #undef kDefaultRehashThreshold
  95.         #define SOMTGD_kDefaultRehashThreshold 1
  96.     #else
  97.         #define kDefaultRehashThreshold somf_THashTable_kDefaultRehashThreshold
  98.     #endif /* kDefaultRehashThreshold */
  99. #endif /* SOMTGD_kDefaultRehashThreshold */
  100. #ifndef SOMTGD_ETableClassification
  101.     #ifdef ETableClassification
  102.         #undef ETableClassification
  103.         #define SOMTGD_ETableClassification 1
  104.     #else
  105.         #define ETableClassification somf_THashTable_ETableClassification
  106.     #endif /* ETableClassification */
  107. #endif /* SOMTGD_ETableClassification */
  108. #endif /* SOM_DONT_USE_SHORT_NAMES */
  109.  
  110. /*
  111.  * End of bindings for IDL types.
  112.  */
  113.  
  114. /* A procedure to create the somf_THashTable Class */
  115. SOMEXTERN SOMClass * SOMLINK somf_THashTableNewClass(
  116.         integer4 majorVersion,
  117.         integer4 minorVersion);
  118.  
  119. /* The API to the somf_THashTable class object, and the methods it introduces. */
  120. SOMEXTERN struct somf_THashTableClassDataStructure {
  121.     SOMClass *classObject;
  122.     somMToken somfCount;
  123.     somMToken somfRemove;
  124.     somMToken somfDelete;
  125.     somMToken somfMember;
  126.     somMToken somfRemoveAll;
  127.     somMToken somfDeleteAll;
  128.     somMToken somfDeleteAllKeys;
  129.     somMToken somfDeleteAllValues;
  130.     somMToken somfAddMMB;
  131.     somMToken somfAddMM;
  132.     somMToken somfGrow;
  133.     somMToken somfRetrieve;
  134.     somMToken somfSetGrowthRate;
  135.     somMToken somfSetRehashThreshold;
  136.     somMToken somfGetGrowthRate;
  137.     somMToken somfGetRehashThreshold;
  138.     somMToken somfSetHashFunction;
  139.     somMToken somfGetHashFunction;
  140.     somMToken somfFind;
  141.     somMToken somfMakeNewTable;
  142.     somMToken somfCopyIn;
  143.     somMToken somfAssign;
  144.     somMToken somfTHashTableInitFLLL;
  145.     somMToken somfTHashTableInitFLL;
  146.     somMToken somfTHashTableInitFL;
  147.     somMToken somfTHashTableInitH;
  148. } SOMDLINK somf_THashTableClassData;
  149. #define _somf_THashTable somf_THashTableClassData.classObject
  150.  
  151. /* The API to parentMtabs for somf_THashTable, and the instance data it introduces. */
  152. SOMEXTERN struct somf_THashTableCClassDataStructure {
  153.     somMethodTabs parentMtab;
  154.     somDToken              instanceDataToken;
  155. } SOMDLINK somf_THashTableCClassData;
  156.  
  157. /*
  158.  * -- Typedefs for somf_THashTable Method Procedures
  159.  */
  160. SOMEXTERN {
  161. typedef somf_THashTable*   SOMLINK somTP_somf_THashTable_somfTHashTableInitFLLL(somf_THashTable *somSelf, Environment *ev, 
  162.         somf_MCollectible_somf_MCollectibleCompareFn testfn, 
  163.         long tablesize, 
  164.         long rate, 
  165.         long threshold);
  166. typedef somTP_somf_THashTable_somfTHashTableInitFLLL *somTD_somf_THashTable_somfTHashTableInitFLLL;
  167. typedef somf_THashTable*   SOMLINK somTP_somf_THashTable_somfTHashTableInitFLL(somf_THashTable *somSelf, Environment *ev, 
  168.         somf_MCollectible_somf_MCollectibleCompareFn testfn, 
  169.         long tablesize, 
  170.         long rate);
  171. typedef somTP_somf_THashTable_somfTHashTableInitFLL *somTD_somf_THashTable_somfTHashTableInitFLL;
  172. typedef somf_THashTable*   SOMLINK somTP_somf_THashTable_somfTHashTableInitFL(somf_THashTable *somSelf, Environment *ev, 
  173.         somf_MCollectible_somf_MCollectibleCompareFn testfn, 
  174.         long tablesize);
  175. typedef somTP_somf_THashTable_somfTHashTableInitFL *somTD_somf_THashTable_somfTHashTableInitFL;
  176. typedef somf_THashTable*   SOMLINK somTP_somf_THashTable_somfTHashTableInitH(somf_THashTable *somSelf, Environment *ev, 
  177.         somf_THashTable* h);
  178. typedef somTP_somf_THashTable_somfTHashTableInitH *somTD_somf_THashTable_somfTHashTableInitH;
  179. typedef void   SOMLINK somTP_somf_THashTable_somfAssign(somf_THashTable *somSelf, Environment *ev, 
  180.         somf_THashTable* source);
  181. typedef somTP_somf_THashTable_somfAssign *somTD_somf_THashTable_somfAssign;
  182. typedef long   SOMLINK somTP_somf_THashTable_somfCount(somf_THashTable *somSelf, Environment *ev);
  183. typedef somTP_somf_THashTable_somfCount *somTD_somf_THashTable_somfCount;
  184. typedef somf_MCollectible*   SOMLINK somTP_somf_THashTable_somfRemove(somf_THashTable *somSelf, Environment *ev, 
  185.         somf_MCollectible* key);
  186. typedef somTP_somf_THashTable_somfRemove *somTD_somf_THashTable_somfRemove;
  187. typedef somf_MCollectible*   SOMLINK somTP_somf_THashTable_somfDelete(somf_THashTable *somSelf, Environment *ev, 
  188.         somf_MCollectible* key);
  189. typedef somTP_somf_THashTable_somfDelete *somTD_somf_THashTable_somfDelete;
  190. typedef somf_MCollectible*   SOMLINK somTP_somf_THashTable_somfMember(somf_THashTable *somSelf, Environment *ev, 
  191.         somf_MCollectible* key);
  192. typedef somTP_somf_THashTable_somfMember *somTD_somf_THashTable_somfMember;
  193. typedef void   SOMLINK somTP_somf_THashTable_somfRemoveAll(somf_THashTable *somSelf, Environment *ev);
  194. typedef somTP_somf_THashTable_somfRemoveAll *somTD_somf_THashTable_somfRemoveAll;
  195. typedef void   SOMLINK somTP_somf_THashTable_somfDeleteAll(somf_THashTable *somSelf, Environment *ev);
  196. typedef somTP_somf_THashTable_somfDeleteAll *somTD_somf_THashTable_somfDeleteAll;
  197. typedef void   SOMLINK somTP_somf_THashTable_somfDeleteAllKeys(somf_THashTable *somSelf, Environment *ev);
  198. typedef somTP_somf_THashTable_somfDeleteAllKeys *somTD_somf_THashTable_somfDeleteAllKeys;
  199. typedef void   SOMLINK somTP_somf_THashTable_somfDeleteAllValues(somf_THashTable *somSelf, Environment *ev);
  200. typedef somTP_somf_THashTable_somfDeleteAllValues *somTD_somf_THashTable_somfDeleteAllValues;
  201. typedef somf_MCollectible*   SOMLINK somTP_somf_THashTable_somfAddMMB(somf_THashTable *somSelf, Environment *ev, 
  202.         somf_MCollectible* key, 
  203.         somf_MCollectible* value, 
  204.         boolean replace);
  205. typedef somTP_somf_THashTable_somfAddMMB *somTD_somf_THashTable_somfAddMMB;
  206. typedef somf_MCollectible*   SOMLINK somTP_somf_THashTable_somfAddMM(somf_THashTable *somSelf, Environment *ev, 
  207.         somf_MCollectible* key, 
  208.         somf_MCollectible* value);
  209. typedef somTP_somf_THashTable_somfAddMM *somTD_somf_THashTable_somfAddMM;
  210. typedef void   SOMLINK somTP_somf_THashTable_somfGrow(somf_THashTable *somSelf, Environment *ev);
  211. typedef somTP_somf_THashTable_somfGrow *somTD_somf_THashTable_somfGrow;
  212. typedef somf_MCollectible*   SOMLINK somTP_somf_THashTable_somfRetrieve(somf_THashTable *somSelf, Environment *ev, 
  213.         somf_MCollectible* key);
  214. typedef somTP_somf_THashTable_somfRetrieve *somTD_somf_THashTable_somfRetrieve;
  215. typedef void   SOMLINK somTP_somf_THashTable_somfSetGrowthRate(somf_THashTable *somSelf, Environment *ev, 
  216.         long rate);
  217. typedef somTP_somf_THashTable_somfSetGrowthRate *somTD_somf_THashTable_somfSetGrowthRate;
  218. typedef void   SOMLINK somTP_somf_THashTable_somfSetRehashThreshold(somf_THashTable *somSelf, Environment *ev, 
  219.         long threshold);
  220. typedef somTP_somf_THashTable_somfSetRehashThreshold *somTD_somf_THashTable_somfSetRehashThreshold;
  221. typedef long   SOMLINK somTP_somf_THashTable_somfGetGrowthRate(somf_THashTable *somSelf, Environment *ev);
  222. typedef somTP_somf_THashTable_somfGetGrowthRate *somTD_somf_THashTable_somfGetGrowthRate;
  223. typedef long   SOMLINK somTP_somf_THashTable_somfGetRehashThreshold(somf_THashTable *somSelf, Environment *ev);
  224. typedef somTP_somf_THashTable_somfGetRehashThreshold *somTD_somf_THashTable_somfGetRehashThreshold;
  225. typedef void   SOMLINK somTP_somf_THashTable_somfSetHashFunction(somf_THashTable *somSelf, Environment *ev, 
  226.         somf_MCollectible_somf_MCollectibleHashFn fn);
  227. typedef somTP_somf_THashTable_somfSetHashFunction *somTD_somf_THashTable_somfSetHashFunction;
  228. typedef somf_MCollectible_somf_MCollectibleHashFn   SOMLINK somTP_somf_THashTable_somfGetHashFunction(somf_THashTable *somSelf, Environment *ev);
  229. typedef somTP_somf_THashTable_somfGetHashFunction *somTD_somf_THashTable_somfGetHashFunction;
  230.  
  231. /*
  232.  * -- Typedefs for Reintroduced Wrapper Methods
  233.  */
  234. typedef somf_MCollectible*   SOMLINK somTP_somf_THashTable_somfClone(somf_THashTable *somSelf, Environment *ev);
  235. typedef somTP_somf_THashTable_somfClone *somTD_somf_THashTable_somfClone;
  236. typedef somf_MCollectible*   SOMLINK somTP_somf_THashTable_somfClonePointer(somf_THashTable *somSelf, Environment *ev, 
  237.         somf_MCollectible* clonee);
  238. typedef somTP_somf_THashTable_somfClonePointer *somTD_somf_THashTable_somfClonePointer;
  239. typedef long   SOMLINK somTP_somf_THashTable_somfHash(somf_THashTable *somSelf, Environment *ev);
  240. typedef somTP_somf_THashTable_somfHash *somTD_somf_THashTable_somfHash;
  241. typedef boolean   SOMLINK somTP_somf_THashTable_somfIsEqual(somf_THashTable *somSelf, Environment *ev, 
  242.         somf_MCollectible* obj);
  243. typedef somTP_somf_THashTable_somfIsEqual *somTD_somf_THashTable_somfIsEqual;
  244. typedef boolean   SOMLINK somTP_somf_THashTable_somfIsSame(somf_THashTable *somSelf, Environment *ev, 
  245.         somf_MCollectible* obj);
  246. typedef somTP_somf_THashTable_somfIsSame *somTD_somf_THashTable_somfIsSame;
  247. typedef boolean   SOMLINK somTP_somf_THashTable_somfIsNotEqual(somf_THashTable *somSelf, Environment *ev, 
  248.         somf_MCollectible* obj);
  249. typedef somTP_somf_THashTable_somfIsNotEqual *somTD_somf_THashTable_somfIsNotEqual;
  250. typedef void   SOMLINK somTP_somf_THashTable_somDefaultInit(somf_THashTable *somSelf, 
  251.         som3InitCtrl* ctrl);
  252. typedef somTP_somf_THashTable_somDefaultInit *somTD_somf_THashTable_somDefaultInit;
  253. typedef void   SOMLINK somTP_somf_THashTable_somDestruct(somf_THashTable *somSelf, 
  254.         octet doFree, 
  255.         som3DestructCtrl* ctrl);
  256. typedef somTP_somf_THashTable_somDestruct *somTD_somf_THashTable_somDestruct;
  257. typedef void   SOMLINK somTP_somf_THashTable_somDefaultCopyInit(somf_THashTable *somSelf, 
  258.         som3InitCtrl* ctrl, 
  259.         SOMObject* fromObj);
  260. typedef somTP_somf_THashTable_somDefaultCopyInit *somTD_somf_THashTable_somDefaultCopyInit;
  261. typedef somf_THashTable*   SOMLINK somTP_somf_THashTable_somDefaultAssign(somf_THashTable *somSelf, 
  262.         som3AssignCtrl* ctrl, 
  263.         SOMObject* fromObj);
  264. typedef somTP_somf_THashTable_somDefaultAssign *somTD_somf_THashTable_somDefaultAssign;
  265. typedef void   SOMLINK somTP_somf_THashTable_somDefaultConstCopyInit(somf_THashTable *somSelf, 
  266.         som3InitCtrl* ctrl, 
  267.         SOMObject* fromObj);
  268. typedef somTP_somf_THashTable_somDefaultConstCopyInit *somTD_somf_THashTable_somDefaultConstCopyInit;
  269. typedef void   SOMLINK somTP_somf_THashTable_somDefaultVCopyInit(somf_THashTable *somSelf, 
  270.         som3InitCtrl* ctrl, 
  271.         SOMObject* fromObj);
  272. typedef somTP_somf_THashTable_somDefaultVCopyInit *somTD_somf_THashTable_somDefaultVCopyInit;
  273. typedef void   SOMLINK somTP_somf_THashTable_somDefaultConstVCopyInit(somf_THashTable *somSelf, 
  274.         som3InitCtrl* ctrl, 
  275.         SOMObject* fromObj);
  276. typedef somTP_somf_THashTable_somDefaultConstVCopyInit *somTD_somf_THashTable_somDefaultConstVCopyInit;
  277. typedef somf_THashTable*   SOMLINK somTP_somf_THashTable_somDefaultConstAssign(somf_THashTable *somSelf, 
  278.         som3AssignCtrl* ctrl, 
  279.         SOMObject* fromObj);
  280. typedef somTP_somf_THashTable_somDefaultConstAssign *somTD_somf_THashTable_somDefaultConstAssign;
  281. typedef somf_THashTable*   SOMLINK somTP_somf_THashTable_somDefaultVAssign(somf_THashTable *somSelf, 
  282.         som3AssignCtrl* ctrl, 
  283.         SOMObject* fromObj);
  284. typedef somTP_somf_THashTable_somDefaultVAssign *somTD_somf_THashTable_somDefaultVAssign;
  285. typedef somf_THashTable*   SOMLINK somTP_somf_THashTable_somDefaultConstVAssign(somf_THashTable *somSelf, 
  286.         som3AssignCtrl* ctrl, 
  287.         SOMObject* fromObj);
  288. typedef somTP_somf_THashTable_somDefaultConstVAssign *somTD_somf_THashTable_somDefaultConstVAssign;
  289. typedef void   SOMLINK somTP_somf_THashTable_somInit(somf_THashTable *somSelf);
  290. typedef somTP_somf_THashTable_somInit *somTD_somf_THashTable_somInit;
  291. typedef void   SOMLINK somTP_somf_THashTable_somFree(somf_THashTable *somSelf);
  292. typedef somTP_somf_THashTable_somFree *somTD_somf_THashTable_somFree;
  293. typedef void   SOMLINK somTP_somf_THashTable_somUninit(somf_THashTable *somSelf);
  294. typedef somTP_somf_THashTable_somUninit *somTD_somf_THashTable_somUninit;
  295. typedef SOMClass*   SOMLINK somTP_somf_THashTable_somGetClass(somf_THashTable *somSelf);
  296. typedef somTP_somf_THashTable_somGetClass *somTD_somf_THashTable_somGetClass;
  297. typedef string   SOMLINK somTP_somf_THashTable_somGetClassName(somf_THashTable *somSelf);
  298. typedef somTP_somf_THashTable_somGetClassName *somTD_somf_THashTable_somGetClassName;
  299. typedef long   SOMLINK somTP_somf_THashTable_somGetSize(somf_THashTable *somSelf);
  300. typedef somTP_somf_THashTable_somGetSize *somTD_somf_THashTable_somGetSize;
  301. typedef boolean   SOMLINK somTP_somf_THashTable_somIsA(somf_THashTable *somSelf, 
  302.         SOMClass* aClassObj);
  303. typedef somTP_somf_THashTable_somIsA *somTD_somf_THashTable_somIsA;
  304. typedef boolean   SOMLINK somTP_somf_THashTable_somIsInstanceOf(somf_THashTable *somSelf, 
  305.         SOMClass* aClassObj);
  306. typedef somTP_somf_THashTable_somIsInstanceOf *somTD_somf_THashTable_somIsInstanceOf;
  307. typedef boolean   SOMLINK somTP_somf_THashTable_somRespondsTo(somf_THashTable *somSelf, 
  308.         somId mId);
  309. typedef somTP_somf_THashTable_somRespondsTo *somTD_somf_THashTable_somRespondsTo;
  310. typedef boolean   SOMLINK somTP_somf_THashTable_somDispatch(somf_THashTable *somSelf, 
  311.         somToken* retValue, 
  312.         somId methodId, 
  313.         va_list ap);
  314. typedef somTP_somf_THashTable_somDispatch *somTD_somf_THashTable_somDispatch;
  315. typedef boolean   SOMLINK somTP_somf_THashTable_somClassDispatch(somf_THashTable *somSelf, 
  316.         SOMClass* clsObj, 
  317.         somToken* retValue, 
  318.         somId methodId, 
  319.         va_list ap);
  320. typedef somTP_somf_THashTable_somClassDispatch *somTD_somf_THashTable_somClassDispatch;
  321. typedef boolean   SOMLINK somTP_somf_THashTable_somCastObj(somf_THashTable *somSelf, 
  322.         SOMClass* cls);
  323. typedef somTP_somf_THashTable_somCastObj *somTD_somf_THashTable_somCastObj;
  324. typedef boolean   SOMLINK somTP_somf_THashTable_somResetObj(somf_THashTable *somSelf);
  325. typedef somTP_somf_THashTable_somResetObj *somTD_somf_THashTable_somResetObj;
  326. typedef void   SOMLINK somTP_somf_THashTable_somDispatchV(somf_THashTable *somSelf, 
  327.         somId methodId, 
  328.         somId descriptor, 
  329.         va_list ap);
  330. typedef somTP_somf_THashTable_somDispatchV *somTD_somf_THashTable_somDispatchV;
  331. typedef long   SOMLINK somTP_somf_THashTable_somDispatchL(somf_THashTable *somSelf, 
  332.         somId methodId, 
  333.         somId descriptor, 
  334.         va_list ap);
  335. typedef somTP_somf_THashTable_somDispatchL *somTD_somf_THashTable_somDispatchL;
  336. typedef void*   SOMLINK somTP_somf_THashTable_somDispatchA(somf_THashTable *somSelf, 
  337.         somId methodId, 
  338.         somId descriptor, 
  339.         va_list ap);
  340. typedef somTP_somf_THashTable_somDispatchA *somTD_somf_THashTable_somDispatchA;
  341. typedef double   SOMLINK somTP_somf_THashTable_somDispatchD(somf_THashTable *somSelf, 
  342.         somId methodId, 
  343.         somId descriptor, 
  344.         va_list ap);
  345. typedef somTP_somf_THashTable_somDispatchD *somTD_somf_THashTable_somDispatchD;
  346. typedef SOMObject*   SOMLINK somTP_somf_THashTable_somPrintSelf(somf_THashTable *somSelf);
  347. typedef somTP_somf_THashTable_somPrintSelf *somTD_somf_THashTable_somPrintSelf;
  348. typedef void   SOMLINK somTP_somf_THashTable_somDumpSelf(somf_THashTable *somSelf, 
  349.         long level);
  350. typedef somTP_somf_THashTable_somDumpSelf *somTD_somf_THashTable_somDumpSelf;
  351. typedef void   SOMLINK somTP_somf_THashTable_somDumpSelfInt(somf_THashTable *somSelf, 
  352.         long level);
  353. typedef somTP_somf_THashTable_somDumpSelfInt *somTD_somf_THashTable_somDumpSelfInt;
  354. }
  355.  
  356. #endif /* somf_THashTable_API */
  357.  
  358.  
  359. /*
  360.  * -- This emitter treats Method Tokens as Thunks by default.
  361.  * -- Use the sc modifier "nothunks" to change this default
  362.  */
  363. #undef somresolve_
  364. #define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
  365.  
  366. /*
  367.  * -- The C++ Wrapper Class for somf_THashTable
  368.  */
  369. class somf_THashTable : public somf_MCollectible
  370. {
  371. public:
  372.  
  373. // somf_THashTable::new creates the class object if necessary, and then uses somNewNoInit
  374. // to allocate memory and create the object. Initialization is in ctors.
  375. void *operator new(size_t)
  376. {
  377.    if (!_somf_THashTable) somf_THashTableNewClass(somf_THashTable_MajorVersion,somf_THashTable_MinorVersion);
  378.    return (void*)
  379.       SOM_Resolve(_somf_THashTable,SOMClass,somNewNoInit)
  380.          ((SOMClass *)((void*)_somf_THashTable));
  381. }
  382.  
  383. // somf_THashTable::delete uses somDestruct.
  384. void operator delete(void * obj)
  385. {
  386.    if (obj && *(void**)obj) {
  387.       SOM_Resolve(obj,SOMObject,somFree)
  388.          ((SOMObject*)obj);
  389.    }
  390. }
  391.  
  392. somf_THashTable& operator=(somf_THashTable& fromObj)
  393. {
  394.    this->somDefaultAssign(0,(SOMObject*)((void*)&fromObj));
  395.    return *this;
  396. }
  397.  
  398. somf_THashTable()
  399. {
  400.    if (*(void**)this != 
  401.        ((somParentMtabStructPtr)
  402.         (somf_THashTableCClassData.parentMtab))->mtab)
  403.       return;
  404.    ((SOMObject*)((void*)this))->somDefaultInit(0);
  405. }
  406.  
  407. somf_THashTable(somf_THashTable* fromObj)
  408. {
  409.    if (*(void**)this != 
  410.        ((somParentMtabStructPtr)
  411.         (somf_THashTableCClassData.parentMtab))->mtab)
  412.       return;
  413.    ((SOMObject*)((void*)this))->somDefaultCopyInit(0,((SOMObject*)((void*)fromObj)));
  414. }
  415.  
  416. #ifdef __IBMCPP__
  417. #pragma info(nocnv,nopar)
  418. #endif
  419. somf_THashTable(const somf_THashTable* fromObj)
  420. {
  421.    if (*(void**)this != 
  422.        ((somParentMtabStructPtr)
  423.         (somf_THashTableCClassData.parentMtab))->mtab)
  424.       return;
  425.    ((SOMObject*)((void*)this))->somDefaultConstCopyInit(0,((SOMObject*)((void*)fromObj)));
  426. }
  427. #ifdef __IBMCPP__
  428. #pragma info(restore)
  429. #endif
  430.  
  431.  
  432. /* method: somfTHashTableInitFLLL */
  433. somf_THashTable*   somfTHashTableInitFLLL(Environment *ev, 
  434.         somf_MCollectible_somf_MCollectibleCompareFn testfn, 
  435.         long tablesize, 
  436.         long rate, 
  437.         long threshold)
  438. {
  439. /*
  440.  *  Initializes the new hash table.
  441.  */
  442.    return SOM_ResolveD(this,somf_THashTable,somf_THashTable,somfTHashTableInitFLLL)
  443.     (this, ev,testfn,tablesize,rate,threshold);
  444. }
  445.  
  446.  
  447. /* method: somfTHashTableInitFLL */
  448. somf_THashTable*   somfTHashTableInitFLL(Environment *ev, 
  449.         somf_MCollectible_somf_MCollectibleCompareFn testfn, 
  450.         long tablesize, 
  451.         long rate)
  452. {
  453. /*
  454.  *  Initializes the new hash table.
  455.  */
  456.    return SOM_ResolveD(this,somf_THashTable,somf_THashTable,somfTHashTableInitFLL)
  457.     (this, ev,testfn,tablesize,rate);
  458. }
  459.  
  460.  
  461. /* method: somfTHashTableInitFL */
  462. somf_THashTable*   somfTHashTableInitFL(Environment *ev, 
  463.         somf_MCollectible_somf_MCollectibleCompareFn testfn, 
  464.         long tablesize)
  465. {
  466. /*
  467.  *  Initializes the new hash table.
  468.  */
  469.    return SOM_ResolveD(this,somf_THashTable,somf_THashTable,somfTHashTableInitFL)
  470.     (this, ev,testfn,tablesize);
  471. }
  472.  
  473.  
  474. /* method: somfTHashTableInitH */
  475. somf_THashTable*   somfTHashTableInitH(Environment *ev, 
  476.         somf_THashTable* h)
  477. {
  478. /*
  479.  *  Initializes the new hash table.
  480.  */
  481.    return SOM_ResolveD(this,somf_THashTable,somf_THashTable,somfTHashTableInitH)
  482.     (this, ev,h);
  483. }
  484.  
  485.  
  486. /* method: somfAssign */
  487. void   somfAssign(Environment *ev, 
  488.         somf_THashTable* source)
  489. {
  490. /*
  491.  *  Assign the instance of this equal to the instance of source.
  492.  */
  493.    SOM_ResolveD(this,somf_THashTable,somf_THashTable,somfAssign)
  494.     (this, ev,source);
  495. }
  496.  
  497.  
  498. /* method: somfCount */
  499. long   somfCount(Environment *ev)
  500. {
  501. /*
  502.  *  Return the number of objects in this.
  503.  */
  504.    return SOM_ResolveD(this,somf_THashTable,somf_THashTable,somfCount)
  505.     (this, ev);
  506. }
  507.  
  508.  
  509. /* method: somfRemove */
  510. somf_MCollectible*   somfRemove(Environment *ev, 
  511.         somf_MCollectible* key)
  512. {
  513. /*
  514.  *  Remove obj from this.  Return the object which was actually removed
  515.  *  (which if you are using an IsSame test function may not be the same
  516.  *  as the object passed in only "equal").
  517.  */
  518.    return SOM_ResolveD(this,somf_THashTable,somf_THashTable,somfRemove)
  519.     (this, ev,key);
  520. }
  521.  
  522.  
  523. /* method: somfDelete */
  524. somf_MCollectible*   somfDelete(Environment *ev, 
  525.         somf_MCollectible* key)
  526. {
  527. /*
  528.  *  Remove key from this and deallocate the storage that these objects might
  529.  *  have owned (that is, the destructor function is called for each object
  530.  *  in the collection).  Return the object which was actually removed (which
  531.  *  if you are using an IsSame test function may not be the same as the object
  532.  *  passed in only "equal").
  533.  */
  534.    return SOM_ResolveD(this,somf_THashTable,somf_THashTable,somfDelete)
  535.     (this, ev,key);
  536. }
  537.  
  538.  
  539. /* method: somfMember */
  540. somf_MCollectible*   somfMember(Environment *ev, 
  541.         somf_MCollectible* key)
  542. {
  543. /*
  544.  *  Each object in this is compared to obj using the function testFn.  Return the
  545.  *  object for which testFn returned TRUE.  Return SOMF_NIL if not object was found.
  546.  */
  547.    return SOM_ResolveD(this,somf_THashTable,somf_THashTable,somfMember)
  548.     (this, ev,key);
  549. }
  550.  
  551.  
  552. /* method: somfRemoveAll */
  553. void   somfRemoveAll(Environment *ev)
  554. {
  555. /*
  556.  *  Remove all of the objects from this.
  557.  */
  558.    SOM_ResolveD(this,somf_THashTable,somf_THashTable,somfRemoveAll)
  559.     (this, ev);
  560. }
  561.  
  562.  
  563. /* method: somfDeleteAll */
  564. void   somfDeleteAll(Environment *ev)
  565. {
  566. /*
  567.  *  Remove all of the objects from this and deallocate the storage that these
  568.  *  objects might have owned (that is, the destructor function is called
  569.  *  for each object in the collection).
  570.  */
  571.    SOM_ResolveD(this,somf_THashTable,somf_THashTable,somfDeleteAll)
  572.     (this, ev);
  573. }
  574.  
  575.  
  576. /* method: somfDeleteAllKeys */
  577. void   somfDeleteAllKeys(Environment *ev)
  578. {
  579. /*
  580.  *  Remove all of the keys from this and deallocate the storage that these
  581.  *  objects might have owned (that is, the destructor function is called
  582.  *  for each object in the collection).
  583.  */
  584.    SOM_ResolveD(this,somf_THashTable,somf_THashTable,somfDeleteAllKeys)
  585.     (this, ev);
  586. }
  587.  
  588.  
  589. /* method: somfDeleteAllValues */
  590. void   somfDeleteAllValues(Environment *ev)
  591. {
  592. /*
  593.  *  Remove all of the values from this and deallocate the storage that these
  594.  *  objects might have owned (that is, the destructor function is called
  595.  *  for each object in the collection).
  596.  */
  597.    SOM_ResolveD(this,somf_THashTable,somf_THashTable,somfDeleteAllValues)
  598.     (this, ev);
  599. }
  600.  
  601.  
  602. /* method: somfAddMMB */
  603. somf_MCollectible*   somfAddMMB(Environment *ev, 
  604.         somf_MCollectible* key, 
  605.         somf_MCollectible* value, 
  606.         boolean replace)
  607. {
  608. /*
  609.  *  Add key and value to this.  If replace = TRUE, replace a copy if it already
  610.  *  exists.
  611.  */
  612.    return SOM_ResolveD(this,somf_THashTable,somf_THashTable,somfAddMMB)
  613.     (this, ev,key,value,replace);
  614. }
  615.  
  616.  
  617. /* method: somfAddMM */
  618. somf_MCollectible*   somfAddMM(Environment *ev, 
  619.         somf_MCollectible* key, 
  620.         somf_MCollectible* value)
  621. {
  622. /*
  623.  *  Add key and value to this.  Replace a copy if it already exists.
  624.  */
  625.    return SOM_ResolveD(this,somf_THashTable,somf_THashTable,somfAddMM)
  626.     (this, ev,key,value);
  627. }
  628.  
  629.  
  630. /* method: somfGrow */
  631. void   somfGrow(Environment *ev)
  632. {
  633. /*
  634.  *  Grow the Hash Table
  635.  */
  636.    SOM_ResolveD(this,somf_THashTable,somf_THashTable,somfGrow)
  637.     (this, ev);
  638. }
  639.  
  640.  
  641. /* method: somfRetrieve */
  642. somf_MCollectible*   somfRetrieve(Environment *ev, 
  643.         somf_MCollectible* key)
  644. {
  645. /*
  646.  *  Retrieve and return the value associated with key.
  647.  */
  648.    return SOM_ResolveD(this,somf_THashTable,somf_THashTable,somfRetrieve)
  649.     (this, ev,key);
  650. }
  651.  
  652.  
  653. /* method: somfSetGrowthRate */
  654. void   somfSetGrowthRate(Environment *ev, 
  655.         long rate)
  656. {
  657. /*
  658.  *  Set the growth rate of the hash table.
  659.  */
  660.    SOM_ResolveD(this,somf_THashTable,somf_THashTable,somfSetGrowthRate)
  661.     (this, ev,rate);
  662. }
  663.  
  664.  
  665. /* method: somfSetRehashThreshold */
  666. void   somfSetRehashThreshold(Environment *ev, 
  667.         long threshold)
  668. {
  669. /*
  670.  *  Set the rehash threshold of the hash table.
  671.  */
  672.    SOM_ResolveD(this,somf_THashTable,somf_THashTable,somfSetRehashThreshold)
  673.     (this, ev,threshold);
  674. }
  675.  
  676.  
  677. /* method: somfGetGrowthRate */
  678. long   somfGetGrowthRate(Environment *ev)
  679. {
  680. /*
  681.  *  Return the growth rate of the hash table.
  682.  */
  683.    return SOM_ResolveD(this,somf_THashTable,somf_THashTable,somfGetGrowthRate)
  684.     (this, ev);
  685. }
  686.  
  687.  
  688. /* method: somfGetRehashThreshold */
  689. long   somfGetRehashThreshold(Environment *ev)
  690. {
  691. /*
  692.  *  Return the rehash threshold of the hash table.
  693.  */
  694.    return SOM_ResolveD(this,somf_THashTable,somf_THashTable,somfGetRehashThreshold)
  695.     (this, ev);
  696. }
  697.  
  698.  
  699. /* method: somfSetHashFunction */
  700. void   somfSetHashFunction(Environment *ev, 
  701.         somf_MCollectible_somf_MCollectibleHashFn fn)
  702. {
  703. /*
  704.  *  Set the hash function to fn.
  705.  */
  706.    SOM_ResolveD(this,somf_THashTable,somf_THashTable,somfSetHashFunction)
  707.     (this, ev,fn);
  708. }
  709.  
  710.  
  711. /* method: somfGetHashFunction */
  712. somf_MCollectible_somf_MCollectibleHashFn   somfGetHashFunction(Environment *ev)
  713. {
  714. /*
  715.  *  Return the hash function.
  716.  */
  717.    return SOM_ResolveD(this,somf_THashTable,somf_THashTable,somfGetHashFunction)
  718.     (this, ev);
  719. }
  720.  
  721.  
  722. /*
  723.  * Reintroduce inherited methods
  724.  */
  725.  
  726. /* method: somfClone */
  727. somf_MCollectible*   somfClone(Environment *ev)
  728. {
  729. /*
  730.  *  somfClone provides a general function for creating a new instance of this.
  731.  */
  732.    return SOM_ResolveD(this,somf_THashTable,somf_MCollectible,somfClone)
  733.     (this, ev);
  734. }
  735.  
  736.  
  737. /* method: somfClonePointer */
  738. somf_MCollectible*   somfClonePointer(Environment *ev, 
  739.         somf_MCollectible* clonee)
  740. {
  741. /*
  742.  *  somfClonePointer returns a pointer to a Clone
  743.  */
  744.    return SOM_ResolveD(this,somf_THashTable,somf_MCollectible,somfClonePointer)
  745.     (this, ev,clonee);
  746. }
  747.  
  748.  
  749. /* method: somfHash */
  750. long   somfHash(Environment *ev)
  751. {
  752. /*
  753.  *  somfHash returns a value suitable for use as a hashing probe for this.
  754.  *  The default function will simply return the address of the object.
  755.  *  The default function is almost certainly not adequate if you are overriding
  756.  *  somfIsEqual because you need to make sure that all objects that "are equal"
  757.  *  to each other return the same hash value.  For example, a TText object would
  758.  *  return a hash value computed using the characters in the string instead of
  759.  *  the address of the string.
  760.  */
  761.    return SOM_ResolveD(this,somf_THashTable,somf_MCollectible,somfHash)
  762.     (this, ev);
  763. }
  764.  
  765.  
  766. /* method: somfIsEqual */
  767. boolean   somfIsEqual(Environment *ev, 
  768.         somf_MCollectible* obj)
  769. {
  770. /*
  771.  *  somfIsEqual returns TRUE if obj is isomorphic to this.  The default function
  772.  *  will give you a nasty message.  For example, the somfIsEqual method
  773.  *  for TText objects will do a string comparison.  All of the utility classes
  774.  *  allow you to specify what methods to use when comparing objects for
  775.  *  insertion, deletion, etc.
  776.  */
  777.    return SOM_ResolveD(this,somf_THashTable,somf_MCollectible,somfIsEqual)
  778.     (this, ev,obj);
  779. }
  780.  
  781.  
  782. /* method: somfIsSame */
  783. boolean   somfIsSame(Environment *ev, 
  784.         somf_MCollectible* obj)
  785. {
  786. /*
  787.  *  The default function for somfIsSame is a pointer comparison
  788.  */
  789.    return SOM_ResolveD(this,somf_THashTable,somf_MCollectible,somfIsSame)
  790.     (this, ev,obj);
  791. }
  792.  
  793.  
  794. /* method: somfIsNotEqual */
  795. boolean   somfIsNotEqual(Environment *ev, 
  796.         somf_MCollectible* obj)
  797. {
  798. /*
  799.  *  somfIsNotEqual returns TRUE if obj is NOT isomorphic to this.  It uses
  800.  *  somfIsEqual, so overriding somfIsEqual will handle the logic of somfIsNotEqual too.
  801.  */
  802.    return SOM_ResolveD(this,somf_THashTable,somf_MCollectible,somfIsNotEqual)
  803.     (this, ev,obj);
  804. }
  805.  
  806.  
  807. /* initializer method: somDefaultInit */
  808. void   somDefaultInit(som3InitCtrl* ctrl)
  809. {
  810. /*
  811.  *  A default initializer for a SOM object. Passing a null ctrl
  812.  *  indicates to the receiver that its class is the class of the
  813.  *  object being initialized, whereby the initializer will determine
  814.  *  an appropriate control structure.
  815.  */
  816.    SOM_ResolveD(this,somf_THashTable,SOMObject,somDefaultInit)
  817.     (this,ctrl);
  818. }
  819.  
  820.  
  821. /* method: somDestruct */
  822. void   somDestruct(octet doFree, 
  823.         som3DestructCtrl* ctrl)
  824. {
  825. /*
  826.  *  The default destructor for a SOM object. A nonzero <doFree>
  827.  *  indicates that the object storage should be freed by the
  828.  *  object's class (via somDeallocate) after uninitialization.
  829.  *  As with somDefaultInit, a null ctrl can be passed.
  830.  */
  831.    SOM_ResolveD(this,somf_THashTable,SOMObject,somDestruct)
  832.     (this,doFree,ctrl);
  833. }
  834.  
  835.  
  836. /* initializer method: somDefaultCopyInit */
  837. void   somDefaultCopyInit(som3InitCtrl* ctrl, 
  838.         SOMObject* fromObj)
  839. {
  840. /*
  841.  *  A default copy constructor. Use this to make copies of objects for
  842.  *  calling methods with "by-value" argument semantics.
  843.  */
  844.    SOM_ResolveD(this,somf_THashTable,SOMObject,somDefaultCopyInit)
  845.     (this,ctrl,fromObj);
  846. }
  847.  
  848.  
  849. /* method: somDefaultAssign */
  850. somf_THashTable*  somDefaultAssign(som3AssignCtrl* ctrl, 
  851.         SOMObject* fromObj)
  852. {
  853. /*
  854.  *  A default assignment operator. Use this to "assign" the state of one
  855.  *  object to another.
  856.  */
  857.    return SOM_ResolveD(this,somf_THashTable,SOMObject,somDefaultAssign)
  858.     (this,ctrl,fromObj);
  859. }
  860.  
  861.  
  862. /* initializer method: somDefaultConstCopyInit */
  863. void   somDefaultConstCopyInit(som3InitCtrl* ctrl, 
  864.         SOMObject* fromObj)
  865. {
  866. /*
  867.  *  A default copy constructor that uses a const fromObj.
  868.  */
  869.    SOM_ResolveD(this,somf_THashTable,SOMObject,somDefaultConstCopyInit)
  870.     (this,ctrl,fromObj);
  871. }
  872.  
  873.  
  874. /* initializer method: somDefaultVCopyInit */
  875. void   somDefaultVCopyInit(som3InitCtrl* ctrl, 
  876.         SOMObject* fromObj)
  877. {
  878. /*
  879.  *  A default copy constructor that uses a volatile fromObj.
  880.  */
  881.    SOM_ResolveD(this,somf_THashTable,SOMObject,somDefaultVCopyInit)
  882.     (this,ctrl,fromObj);
  883. }
  884.  
  885.  
  886. /* initializer method: somDefaultConstVCopyInit */
  887. void   somDefaultConstVCopyInit(som3InitCtrl* ctrl, 
  888.         SOMObject* fromObj)
  889. {
  890. /*
  891.  *  A default copy constructor that uses a const volatile fromObj.
  892.  */
  893.    SOM_ResolveD(this,somf_THashTable,SOMObject,somDefaultConstVCopyInit)
  894.     (this,ctrl,fromObj);
  895. }
  896.  
  897.  
  898. /* method: somDefaultConstAssign */
  899. somf_THashTable*  somDefaultConstAssign(som3AssignCtrl* ctrl, 
  900.         SOMObject* fromObj)
  901. {
  902. /*
  903.  *  A default assignment operator that uses a const fromObj.
  904.  */
  905.    return SOM_ResolveD(this,somf_THashTable,SOMObject,somDefaultConstAssign)
  906.     (this,ctrl,fromObj);
  907. }
  908.  
  909.  
  910. /* method: somDefaultVAssign */
  911. somf_THashTable*  somDefaultVAssign(som3AssignCtrl* ctrl, 
  912.         SOMObject* fromObj)
  913. {
  914. /*
  915.  *  A default assignment operator that uses a volatile fromObj.
  916.  */
  917.    return SOM_ResolveD(this,somf_THashTable,SOMObject,somDefaultVAssign)
  918.     (this,ctrl,fromObj);
  919. }
  920.  
  921.  
  922. /* method: somDefaultConstVAssign */
  923. somf_THashTable*  somDefaultConstVAssign(som3AssignCtrl* ctrl, 
  924.         SOMObject* fromObj)
  925. {
  926. /*
  927.  *  A default assignment operator that uses a const volatile fromObj.
  928.  */
  929.    return SOM_ResolveD(this,somf_THashTable,SOMObject,somDefaultConstVAssign)
  930.     (this,ctrl,fromObj);
  931. }
  932.  
  933.  
  934. /* method: somInit */
  935. void   somInit()
  936. {
  937. /*
  938.  *  Obsolete but still supported. Override somDefaultInit instead of somInit.
  939.  */
  940.    SOM_ResolveD(this,somf_THashTable,SOMObject,somInit)
  941.     (this);
  942. }
  943.  
  944.  
  945. /* method: somFree */
  946. void   somFree()
  947. {
  948. /*
  949.  *  Use as directed by framework implementations.
  950.  */
  951.    SOM_ResolveD(this,somf_THashTable,SOMObject,somFree)
  952.     (this);
  953. }
  954.  
  955.  
  956. /* method: somUninit */
  957. void   somUninit()
  958. {
  959. /*
  960.  *  Obsolete but still supported. Override somDestruct instead of somUninit.
  961.  */
  962.    SOM_ResolveD(this,somf_THashTable,SOMObject,somUninit)
  963.     (this);
  964. }
  965.  
  966.  
  967. /* method: somGetClass */
  968. SOMClass*   somGetClass()
  969. {
  970. /*
  971.  *  Return the receiver's class.
  972.  */
  973.    return SOM_ResolveD(this,somf_THashTable,SOMObject,somGetClass)
  974.     (this);
  975. }
  976.  
  977.  
  978. /* method: somGetClassName */
  979. string   somGetClassName()
  980. {
  981. /*
  982.  *  Return the name of the receiver's class.
  983.  */
  984.    return SOM_ResolveD(this,somf_THashTable,SOMObject,somGetClassName)
  985.     (this);
  986. }
  987.  
  988.  
  989. /* method: somGetSize */
  990. long   somGetSize()
  991. {
  992. /*
  993.  *  Return the size of the receiver.
  994.  */
  995.    return SOM_ResolveD(this,somf_THashTable,SOMObject,somGetSize)
  996.     (this);
  997. }
  998.  
  999.  
  1000. /* method: somIsA */
  1001. boolean   somIsA(SOMClass* aClassObj)
  1002. {
  1003. /*
  1004.  *  Returns 1 (true) if the receiver responds to methods
  1005.  *  introduced by <aClassObj>, and 0 (false) otherwise.
  1006.  */
  1007.    return SOM_ResolveD(this,somf_THashTable,SOMObject,somIsA)
  1008.     (this,aClassObj);
  1009. }
  1010.  
  1011.  
  1012. /* method: somIsInstanceOf */
  1013. boolean   somIsInstanceOf(SOMClass* aClassObj)
  1014. {
  1015. /*
  1016.  *  Returns 1 (true) if the receiver is an instance of
  1017.  *  <aClassObj> and 0 (false) otherwise.
  1018.  */
  1019.    return SOM_ResolveD(this,somf_THashTable,SOMObject,somIsInstanceOf)
  1020.     (this,aClassObj);
  1021. }
  1022.  
  1023.  
  1024. /* method: somRespondsTo */
  1025. boolean   somRespondsTo(somId mId)
  1026. {
  1027. /*
  1028.  *  Returns 1 (true) if the indicated method can be invoked
  1029.  *  on the receiver and 0 (false) otherwise.
  1030.  */
  1031.    return SOM_ResolveD(this,somf_THashTable,SOMObject,somRespondsTo)
  1032.     (this,mId);
  1033. }
  1034.  
  1035.  
  1036. /* va_list method: somDispatch */
  1037.  
  1038. /*
  1039.  *  This method provides a generic, class-specific dispatch mechanism.
  1040.  *  It accepts as input <retValue> a pointer to the memory area to be
  1041.  *  loaded with the result of dispatching the method indicated by
  1042.  *  <methodId> using the arguments in <ap>. <ap> contains the object
  1043.  *  on which the method is to be invoked as the first argument.
  1044.  */
  1045. /* the va_list invocation form */
  1046. boolean   somf_THashTable_somDispatch(somToken* retValue, 
  1047.         somId methodId, 
  1048.         va_list ap)
  1049. {return SOM_ResolveD(this,somf_THashTable,SOMObject,somDispatch)
  1050.     (this,retValue,methodId,ap);
  1051. }
  1052.  
  1053. /* the varargs invocation form */
  1054. boolean   somDispatch(somToken* retValue, 
  1055.         somId methodId, 
  1056.         ...)
  1057. {
  1058. /*
  1059.  *  This method provides a generic, class-specific dispatch mechanism.
  1060.  *  It accepts as input <retValue> a pointer to the memory area to be
  1061.  *  loaded with the result of dispatching the method indicated by
  1062.  *  <methodId> using the arguments in <ap>. <ap> contains the object
  1063.  *  on which the method is to be invoked as the first argument.
  1064.  */
  1065.    va_list ap;
  1066.    va_start(ap, methodId);
  1067.    boolean __somResult = 
  1068.       SOM_ResolveD(this,somf_THashTable,SOMObject,somDispatch)
  1069.     (this,retValue,methodId,ap);
  1070.    va_end(ap);
  1071.    return __somResult;
  1072. }
  1073.  
  1074.  
  1075. /* va_list method: somClassDispatch */
  1076.  
  1077. /*
  1078.  *  Like somDispatch, but method resolution for static methods is done
  1079.  *  according to the clsObj instance method table.
  1080.  */
  1081. /* the va_list invocation form */
  1082. boolean   somf_THashTable_somClassDispatch(SOMClass* clsObj, 
  1083.         somToken* retValue, 
  1084.         somId methodId, 
  1085.         va_list ap)
  1086. {return SOM_ResolveD(this,somf_THashTable,SOMObject,somClassDispatch)
  1087.     (this,clsObj,retValue,methodId,ap);
  1088. }
  1089.  
  1090. /* the varargs invocation form */
  1091. boolean   somClassDispatch(SOMClass* clsObj, 
  1092.         somToken* retValue, 
  1093.         somId methodId, 
  1094.         ...)
  1095. {
  1096. /*
  1097.  *  Like somDispatch, but method resolution for static methods is done
  1098.  *  according to the clsObj instance method table.
  1099.  */
  1100.    va_list ap;
  1101.    va_start(ap, methodId);
  1102.    boolean __somResult = 
  1103.       SOM_ResolveD(this,somf_THashTable,SOMObject,somClassDispatch)
  1104.     (this,clsObj,retValue,methodId,ap);
  1105.    va_end(ap);
  1106.    return __somResult;
  1107. }
  1108.  
  1109.  
  1110. /* method: somCastObj */
  1111. boolean   somCastObj(SOMClass* cls)
  1112. {
  1113. /*
  1114.  *  cast the receiving object to cls (which must be an ancestor of the
  1115.  *  objects true class. Returns true on success.
  1116.  */
  1117.    return SOM_ResolveD(this,somf_THashTable,SOMObject,somCastObj)
  1118.     (this,cls);
  1119. }
  1120.  
  1121.  
  1122. /* method: somResetObj */
  1123. boolean   somResetObj()
  1124. {
  1125. /*
  1126.  *  reset an object to its true class. Returns true always.
  1127.  */
  1128.    return SOM_ResolveD(this,somf_THashTable,SOMObject,somResetObj)
  1129.     (this);
  1130. }
  1131.  
  1132.  
  1133. /* va_list method: somDispatchV */
  1134.  
  1135. /*
  1136.  *  Obsolete. Use somDispatch instead.
  1137.  */
  1138. /* the va_list invocation form */
  1139. void   somf_THashTable_somDispatchV(somId methodId, 
  1140.         somId descriptor, 
  1141.         va_list ap)
  1142. {   SOM_ResolveD(this,somf_THashTable,SOMObject,somDispatchV)
  1143.     (this,methodId,descriptor,ap);
  1144. }
  1145.  
  1146. /* the varargs invocation form */
  1147. void   somDispatchV(somId methodId, 
  1148.         somId descriptor, 
  1149.         ...)
  1150. {
  1151. /*
  1152.  *  Obsolete. Use somDispatch instead.
  1153.  */
  1154.    va_list ap;
  1155.    va_start(ap, descriptor);
  1156.    SOM_ResolveD(this,somf_THashTable,SOMObject,somDispatchV)
  1157.     (this,methodId,descriptor,ap);
  1158.    va_end(ap);
  1159. }
  1160.  
  1161.  
  1162. /* va_list method: somDispatchL */
  1163.  
  1164. /*
  1165.  *  Obsolete. Use somDispatch instead.
  1166.  */
  1167. /* the va_list invocation form */
  1168. long   somf_THashTable_somDispatchL(somId methodId, 
  1169.         somId descriptor, 
  1170.         va_list ap)
  1171. {return SOM_ResolveD(this,somf_THashTable,SOMObject,somDispatchL)
  1172.     (this,methodId,descriptor,ap);
  1173. }
  1174.  
  1175. /* the varargs invocation form */
  1176. long   somDispatchL(somId methodId, 
  1177.         somId descriptor, 
  1178.         ...)
  1179. {
  1180. /*
  1181.  *  Obsolete. Use somDispatch instead.
  1182.  */
  1183.    va_list ap;
  1184.    va_start(ap, descriptor);
  1185.    long __somResult = 
  1186.       SOM_ResolveD(this,somf_THashTable,SOMObject,somDispatchL)
  1187.     (this,methodId,descriptor,ap);
  1188.    va_end(ap);
  1189.    return __somResult;
  1190. }
  1191.  
  1192.  
  1193. /* va_list method: somDispatchA */
  1194.  
  1195. /*
  1196.  *  Obsolete. Use somDispatch instead.
  1197.  */
  1198. /* the va_list invocation form */
  1199. void*   somf_THashTable_somDispatchA(somId methodId, 
  1200.         somId descriptor, 
  1201.         va_list ap)
  1202. {return SOM_ResolveD(this,somf_THashTable,SOMObject,somDispatchA)
  1203.     (this,methodId,descriptor,ap);
  1204. }
  1205.  
  1206. /* the varargs invocation form */
  1207. void*   somDispatchA(somId methodId, 
  1208.         somId descriptor, 
  1209.         ...)
  1210. {
  1211. /*
  1212.  *  Obsolete. Use somDispatch instead.
  1213.  */
  1214.    va_list ap;
  1215.    va_start(ap, descriptor);
  1216.    void* __somResult = 
  1217.       SOM_ResolveD(this,somf_THashTable,SOMObject,somDispatchA)
  1218.     (this,methodId,descriptor,ap);
  1219.    va_end(ap);
  1220.    return __somResult;
  1221. }
  1222.  
  1223.  
  1224. /* va_list method: somDispatchD */
  1225.  
  1226. /*
  1227.  *  Obsolete. Use somDispatch instead.
  1228.  */
  1229. /* the va_list invocation form */
  1230. double   somf_THashTable_somDispatchD(somId methodId, 
  1231.         somId descriptor, 
  1232.         va_list ap)
  1233. {return SOM_ResolveD(this,somf_THashTable,SOMObject,somDispatchD)
  1234.     (this,methodId,descriptor,ap);
  1235. }
  1236.  
  1237. /* the varargs invocation form */
  1238. double   somDispatchD(somId methodId, 
  1239.         somId descriptor, 
  1240.         ...)
  1241. {
  1242. /*
  1243.  *  Obsolete. Use somDispatch instead.
  1244.  */
  1245.    va_list ap;
  1246.    va_start(ap, descriptor);
  1247.    double __somResult = 
  1248.       SOM_ResolveD(this,somf_THashTable,SOMObject,somDispatchD)
  1249.     (this,methodId,descriptor,ap);
  1250.    va_end(ap);
  1251.    return __somResult;
  1252. }
  1253.  
  1254.  
  1255. /* method: somPrintSelf */
  1256. SOMObject*   somPrintSelf()
  1257. {
  1258. /*
  1259.  *  Uses <SOMOutCharRoutine> to write a brief string with identifying
  1260.  *  information about this object.  The default implementation just gives
  1261.  *  the object's class name and its address in memory.
  1262.  *  <self> is returned.
  1263.  */
  1264.    return SOM_ResolveD(this,somf_THashTable,SOMObject,somPrintSelf)
  1265.     (this);
  1266. }
  1267.  
  1268.  
  1269. /* method: somDumpSelf */
  1270. void   somDumpSelf(long level)
  1271. {
  1272. /*
  1273.  *  Uses <SOMOutCharRoutine> to write a detailed description of this object
  1274.  *  and its current state.
  1275.  * 
  1276.  *  <level> indicates the nesting level for describing compound objects
  1277.  *  it must be greater than or equal to zero.  All lines in the
  1278.  *  description will be preceeded by <2*level> spaces.
  1279.  * 
  1280.  *  This routine only actually writes the data that concerns the object
  1281.  *  as a whole, such as class, and uses <somDumpSelfInt> to describe
  1282.  *  the object's current state.  This approach allows readable
  1283.  *  descriptions of compound objects to be constructed.
  1284.  * 
  1285.  *  Generally it is not necessary to override this method, if it is
  1286.  *  overriden it generally must be completely replaced.
  1287.  */
  1288.    SOM_ResolveD(this,somf_THashTable,SOMObject,somDumpSelf)
  1289.     (this,level);
  1290. }
  1291.  
  1292.  
  1293. /* method: somDumpSelfInt */
  1294. void   somDumpSelfInt(long level)
  1295. {
  1296. /*
  1297.  *  Uses <SOMOutCharRoutine> to write in the current state of this object.
  1298.  *  Generally this method will need to be overridden.  When overriding
  1299.  *  it, begin by calling the parent class form of this method and then
  1300.  *  write in a description of your class's instance data. This will
  1301.  *  result in a description of all the object's instance data going
  1302.  *  from its root ancestor class to its specific class.
  1303.  */
  1304.    SOM_ResolveD(this,somf_THashTable,SOMObject,somDumpSelfInt)
  1305.     (this,level);
  1306. }
  1307.  
  1308.  
  1309.  
  1310. };   /* somf_THashTable */
  1311.  
  1312.  
  1313.  
  1314. #endif       /* SOM_somf_THashTable_xh */
  1315.