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

  1.  
  2. /*
  3.  * This file was generated by the SOM Compiler.
  4.  * FileName: fsgm.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,1994,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.  
  24.  
  25. #ifndef SOM_SOMPBinary_xh
  26. #define SOM_SOMPBinary_xh
  27.  
  28. class SOMPBinary;
  29.  
  30. /*
  31.  *  This is an IO Group Manager class which writes groups of objects
  32.  *  in a format similar to class SOMPAscii execept that this
  33.  *  class stores numeric data in binary.
  34.  */
  35.  
  36. #define SOMPBinary_MajorVersion 2
  37. #define SOMPBinary_MinorVersion 1
  38.  
  39. /* C++ SOM defs */
  40. #include <somcls.xh>
  41. #include <somcm.xh>
  42.  
  43. /* C++ parent defs */
  44. #ifndef SOM_SOMPAscii_xh
  45. #include <fsagm.xh>
  46. #endif
  47.  
  48. #ifndef SOMPBinary_API
  49. #define SOMPBinary_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. class SOMPMediaInterfaceAbstract;
  61. class SOMPIOGroup;
  62. class SOMPPersistentId;
  63. class SOMPPersistentObject;
  64.  
  65. /*
  66.  * End of bindings for IDL types.
  67.  */
  68.  
  69. /* A procedure to create the SOMPBinary Class */
  70. SOMEXTERN SOMClass * SOMLINK SOMPBinaryNewClass(
  71.         integer4 majorVersion,
  72.         integer4 minorVersion);
  73.  
  74. /* The API to the SOMPBinary class object, and the methods it introduces. */
  75. SOMEXTERN struct SOMPBinaryClassDataStructure {
  76.     SOMClass *classObject;
  77. } SOMDLINK SOMPBinaryClassData;
  78. #define _SOMPBinary SOMPBinaryClassData.classObject
  79.  
  80. /* The API to parentMtabs for SOMPBinary, and the instance data it introduces. */
  81. SOMEXTERN struct SOMPBinaryCClassDataStructure {
  82.     somMethodTabs parentMtab;
  83.     somDToken              instanceDataToken;
  84. } SOMDLINK SOMPBinaryCClassData;
  85.  
  86. /*
  87.  * -- Typedefs for SOMPBinary Method Procedures
  88.  */
  89. SOMEXTERN {
  90.  
  91. /*
  92.  * -- Typedefs for Reintroduced Wrapper Methods
  93.  */
  94. typedef void   SOMLINK somTP_SOMPBinary_sompNewMediaInterface(SOMPBinary *somSelf, Environment *ev, 
  95.         string IOInfo);
  96. typedef somTP_SOMPBinary_sompNewMediaInterface *somTD_SOMPBinary_sompNewMediaInterface;
  97. typedef SOMPMediaInterfaceAbstract*   SOMLINK somTP_SOMPBinary_sompGetMediaInterface(SOMPBinary *somSelf, Environment *ev);
  98. typedef somTP_SOMPBinary_sompGetMediaInterface *somTD_SOMPBinary_sompGetMediaInterface;
  99. typedef void   SOMLINK somTP_SOMPBinary_sompFreeMediaInterface(SOMPBinary *somSelf, Environment *ev);
  100. typedef somTP_SOMPBinary_sompFreeMediaInterface *somTD_SOMPBinary_sompFreeMediaInterface;
  101. typedef SOMPMediaInterfaceAbstract*   SOMLINK somTP_SOMPBinary_sompInstantiateMediaInterface(SOMPBinary *somSelf, Environment *ev);
  102. typedef somTP_SOMPBinary_sompInstantiateMediaInterface *somTD_SOMPBinary_sompInstantiateMediaInterface;
  103. typedef boolean   SOMLINK somTP_SOMPBinary_sompWriteGroup(SOMPBinary *somSelf, Environment *ev, 
  104.         SOMPPersistentObject* thisPo);
  105. typedef somTP_SOMPBinary_sompWriteGroup *somTD_SOMPBinary_sompWriteGroup;
  106. typedef SOMPPersistentObject*   SOMLINK somTP_SOMPBinary_sompReadGroup(SOMPBinary *somSelf, Environment *ev, 
  107.         SOMPPersistentId* objectID);
  108. typedef somTP_SOMPBinary_sompReadGroup *somTD_SOMPBinary_sompReadGroup;
  109. typedef void   SOMLINK somTP_SOMPBinary_sompReadObjectData(SOMPBinary *somSelf, Environment *ev, 
  110.         SOMPPersistentObject* thisPo);
  111. typedef somTP_SOMPBinary_sompReadObjectData *somTD_SOMPBinary_sompReadObjectData;
  112. typedef void   SOMLINK somTP_SOMPBinary_sompDeleteObjectFromGroup(SOMPBinary *somSelf, Environment *ev, 
  113.         SOMPPersistentId* objectID);
  114. typedef somTP_SOMPBinary_sompDeleteObjectFromGroup *somTD_SOMPBinary_sompDeleteObjectFromGroup;
  115. typedef boolean   SOMLINK somTP_SOMPBinary_sompGroupExists(SOMPBinary *somSelf, Environment *ev, 
  116.         string IOInfo);
  117. typedef somTP_SOMPBinary_sompGroupExists *somTD_SOMPBinary_sompGroupExists;
  118. typedef boolean   SOMLINK somTP_SOMPBinary_sompObjectInGroup(SOMPBinary *somSelf, Environment *ev, 
  119.         SOMPPersistentId* objectID);
  120. typedef somTP_SOMPBinary_sompObjectInGroup *somTD_SOMPBinary_sompObjectInGroup;
  121. typedef boolean   SOMLINK somTP_SOMPBinary_sompMediaFormatOk(SOMPBinary *somSelf, Environment *ev, 
  122.         string mediaFormatName);
  123. typedef somTP_SOMPBinary_sompMediaFormatOk *somTD_SOMPBinary_sompMediaFormatOk;
  124. typedef void   SOMLINK somTP_SOMPBinary_somInit(SOMPBinary *somSelf);
  125. typedef somTP_SOMPBinary_somInit *somTD_SOMPBinary_somInit;
  126. typedef void   SOMLINK somTP_SOMPBinary_somUninit(SOMPBinary *somSelf);
  127. typedef somTP_SOMPBinary_somUninit *somTD_SOMPBinary_somUninit;
  128. typedef void   SOMLINK somTP_SOMPBinary_somDefaultInit(SOMPBinary *somSelf, 
  129.         som3InitCtrl* ctrl);
  130. typedef somTP_SOMPBinary_somDefaultInit *somTD_SOMPBinary_somDefaultInit;
  131. typedef void   SOMLINK somTP_SOMPBinary_somDestruct(SOMPBinary *somSelf, 
  132.         octet doFree, 
  133.         som3DestructCtrl* ctrl);
  134. typedef somTP_SOMPBinary_somDestruct *somTD_SOMPBinary_somDestruct;
  135. typedef void   SOMLINK somTP_SOMPBinary_somDefaultCopyInit(SOMPBinary *somSelf, 
  136.         som3InitCtrl* ctrl, 
  137.         SOMObject* fromObj);
  138. typedef somTP_SOMPBinary_somDefaultCopyInit *somTD_SOMPBinary_somDefaultCopyInit;
  139. typedef SOMPBinary*   SOMLINK somTP_SOMPBinary_somDefaultAssign(SOMPBinary *somSelf, 
  140.         som3AssignCtrl* ctrl, 
  141.         SOMObject* fromObj);
  142. typedef somTP_SOMPBinary_somDefaultAssign *somTD_SOMPBinary_somDefaultAssign;
  143. typedef void   SOMLINK somTP_SOMPBinary_somDefaultConstCopyInit(SOMPBinary *somSelf, 
  144.         som3InitCtrl* ctrl, 
  145.         SOMObject* fromObj);
  146. typedef somTP_SOMPBinary_somDefaultConstCopyInit *somTD_SOMPBinary_somDefaultConstCopyInit;
  147. typedef void   SOMLINK somTP_SOMPBinary_somDefaultVCopyInit(SOMPBinary *somSelf, 
  148.         som3InitCtrl* ctrl, 
  149.         SOMObject* fromObj);
  150. typedef somTP_SOMPBinary_somDefaultVCopyInit *somTD_SOMPBinary_somDefaultVCopyInit;
  151. typedef void   SOMLINK somTP_SOMPBinary_somDefaultConstVCopyInit(SOMPBinary *somSelf, 
  152.         som3InitCtrl* ctrl, 
  153.         SOMObject* fromObj);
  154. typedef somTP_SOMPBinary_somDefaultConstVCopyInit *somTD_SOMPBinary_somDefaultConstVCopyInit;
  155. typedef SOMPBinary*   SOMLINK somTP_SOMPBinary_somDefaultConstAssign(SOMPBinary *somSelf, 
  156.         som3AssignCtrl* ctrl, 
  157.         SOMObject* fromObj);
  158. typedef somTP_SOMPBinary_somDefaultConstAssign *somTD_SOMPBinary_somDefaultConstAssign;
  159. typedef SOMPBinary*   SOMLINK somTP_SOMPBinary_somDefaultVAssign(SOMPBinary *somSelf, 
  160.         som3AssignCtrl* ctrl, 
  161.         SOMObject* fromObj);
  162. typedef somTP_SOMPBinary_somDefaultVAssign *somTD_SOMPBinary_somDefaultVAssign;
  163. typedef SOMPBinary*   SOMLINK somTP_SOMPBinary_somDefaultConstVAssign(SOMPBinary *somSelf, 
  164.         som3AssignCtrl* ctrl, 
  165.         SOMObject* fromObj);
  166. typedef somTP_SOMPBinary_somDefaultConstVAssign *somTD_SOMPBinary_somDefaultConstVAssign;
  167. typedef void   SOMLINK somTP_SOMPBinary_somFree(SOMPBinary *somSelf);
  168. typedef somTP_SOMPBinary_somFree *somTD_SOMPBinary_somFree;
  169. typedef SOMClass*   SOMLINK somTP_SOMPBinary_somGetClass(SOMPBinary *somSelf);
  170. typedef somTP_SOMPBinary_somGetClass *somTD_SOMPBinary_somGetClass;
  171. typedef string   SOMLINK somTP_SOMPBinary_somGetClassName(SOMPBinary *somSelf);
  172. typedef somTP_SOMPBinary_somGetClassName *somTD_SOMPBinary_somGetClassName;
  173. typedef long   SOMLINK somTP_SOMPBinary_somGetSize(SOMPBinary *somSelf);
  174. typedef somTP_SOMPBinary_somGetSize *somTD_SOMPBinary_somGetSize;
  175. typedef boolean   SOMLINK somTP_SOMPBinary_somIsA(SOMPBinary *somSelf, 
  176.         SOMClass* aClassObj);
  177. typedef somTP_SOMPBinary_somIsA *somTD_SOMPBinary_somIsA;
  178. typedef boolean   SOMLINK somTP_SOMPBinary_somIsInstanceOf(SOMPBinary *somSelf, 
  179.         SOMClass* aClassObj);
  180. typedef somTP_SOMPBinary_somIsInstanceOf *somTD_SOMPBinary_somIsInstanceOf;
  181. typedef boolean   SOMLINK somTP_SOMPBinary_somRespondsTo(SOMPBinary *somSelf, 
  182.         somId mId);
  183. typedef somTP_SOMPBinary_somRespondsTo *somTD_SOMPBinary_somRespondsTo;
  184. typedef boolean   SOMLINK somTP_SOMPBinary_somDispatch(SOMPBinary *somSelf, 
  185.         somToken* retValue, 
  186.         somId methodId, 
  187.         va_list ap);
  188. typedef somTP_SOMPBinary_somDispatch *somTD_SOMPBinary_somDispatch;
  189. typedef boolean   SOMLINK somTP_SOMPBinary_somClassDispatch(SOMPBinary *somSelf, 
  190.         SOMClass* clsObj, 
  191.         somToken* retValue, 
  192.         somId methodId, 
  193.         va_list ap);
  194. typedef somTP_SOMPBinary_somClassDispatch *somTD_SOMPBinary_somClassDispatch;
  195. typedef boolean   SOMLINK somTP_SOMPBinary_somCastObj(SOMPBinary *somSelf, 
  196.         SOMClass* cls);
  197. typedef somTP_SOMPBinary_somCastObj *somTD_SOMPBinary_somCastObj;
  198. typedef boolean   SOMLINK somTP_SOMPBinary_somResetObj(SOMPBinary *somSelf);
  199. typedef somTP_SOMPBinary_somResetObj *somTD_SOMPBinary_somResetObj;
  200. typedef void   SOMLINK somTP_SOMPBinary_somDispatchV(SOMPBinary *somSelf, 
  201.         somId methodId, 
  202.         somId descriptor, 
  203.         va_list ap);
  204. typedef somTP_SOMPBinary_somDispatchV *somTD_SOMPBinary_somDispatchV;
  205. typedef long   SOMLINK somTP_SOMPBinary_somDispatchL(SOMPBinary *somSelf, 
  206.         somId methodId, 
  207.         somId descriptor, 
  208.         va_list ap);
  209. typedef somTP_SOMPBinary_somDispatchL *somTD_SOMPBinary_somDispatchL;
  210. typedef void*   SOMLINK somTP_SOMPBinary_somDispatchA(SOMPBinary *somSelf, 
  211.         somId methodId, 
  212.         somId descriptor, 
  213.         va_list ap);
  214. typedef somTP_SOMPBinary_somDispatchA *somTD_SOMPBinary_somDispatchA;
  215. typedef double   SOMLINK somTP_SOMPBinary_somDispatchD(SOMPBinary *somSelf, 
  216.         somId methodId, 
  217.         somId descriptor, 
  218.         va_list ap);
  219. typedef somTP_SOMPBinary_somDispatchD *somTD_SOMPBinary_somDispatchD;
  220. typedef SOMObject*   SOMLINK somTP_SOMPBinary_somPrintSelf(SOMPBinary *somSelf);
  221. typedef somTP_SOMPBinary_somPrintSelf *somTD_SOMPBinary_somPrintSelf;
  222. typedef void   SOMLINK somTP_SOMPBinary_somDumpSelf(SOMPBinary *somSelf, 
  223.         long level);
  224. typedef somTP_SOMPBinary_somDumpSelf *somTD_SOMPBinary_somDumpSelf;
  225. typedef void   SOMLINK somTP_SOMPBinary_somDumpSelfInt(SOMPBinary *somSelf, 
  226.         long level);
  227. typedef somTP_SOMPBinary_somDumpSelfInt *somTD_SOMPBinary_somDumpSelfInt;
  228. }
  229.  
  230. #endif /* SOMPBinary_API */
  231.  
  232.  
  233. /*
  234.  * -- This emitter treats Method Tokens as Thunks by default.
  235.  * -- Use the sc modifier "nothunks" to change this default
  236.  */
  237. #undef somresolve_
  238. #define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
  239.  
  240. /*
  241.  * -- The C++ Wrapper Class for SOMPBinary
  242.  */
  243. class SOMPBinary : public SOMPAscii
  244. {
  245. /*
  246.  *  This is an IO Group Manager class which writes groups of objects
  247.  *  in a format similar to class SOMPAscii execept that this
  248.  *  class stores numeric data in binary.
  249.  */
  250. public:
  251.  
  252. // SOMPBinary::new creates the class object if necessary, and then uses somNewNoInit
  253. // to allocate memory and create the object. Initialization is in ctors.
  254. void *operator new(size_t)
  255. {
  256.    if (!_SOMPBinary) SOMPBinaryNewClass(SOMPBinary_MajorVersion,SOMPBinary_MinorVersion);
  257.    return (void*)
  258.       SOM_Resolve(_SOMPBinary,SOMClass,somNewNoInit)
  259.          ((SOMClass *)((void*)_SOMPBinary));
  260. }
  261.  
  262. // SOMPBinary::delete uses somDestruct.
  263. void operator delete(void * obj)
  264. {
  265.    if (obj && *(void**)obj) {
  266.       SOM_Resolve(obj,SOMObject,somFree)
  267.          ((SOMObject*)obj);
  268.    }
  269. }
  270.  
  271. SOMPBinary& operator=(SOMPBinary& fromObj)
  272. {
  273.    this->somDefaultAssign(0,(SOMObject*)((void*)&fromObj));
  274.    return *this;
  275. }
  276.  
  277. SOMPBinary()
  278. {
  279.    if (*(void**)this != 
  280.        ((somParentMtabStructPtr)
  281.         (SOMPBinaryCClassData.parentMtab))->mtab)
  282.       return;
  283.    ((SOMObject*)((void*)this))->somDefaultInit(0);
  284. }
  285.  
  286. SOMPBinary(SOMPBinary* fromObj)
  287. {
  288.    if (*(void**)this != 
  289.        ((somParentMtabStructPtr)
  290.         (SOMPBinaryCClassData.parentMtab))->mtab)
  291.       return;
  292.    ((SOMObject*)((void*)this))->somDefaultCopyInit(0,((SOMObject*)((void*)fromObj)));
  293. }
  294.  
  295. #ifdef __IBMCPP__
  296. #pragma info(nocnv,nopar)
  297. #endif
  298. SOMPBinary(const SOMPBinary* fromObj)
  299. {
  300.    if (*(void**)this != 
  301.        ((somParentMtabStructPtr)
  302.         (SOMPBinaryCClassData.parentMtab))->mtab)
  303.       return;
  304.    ((SOMObject*)((void*)this))->somDefaultConstCopyInit(0,((SOMObject*)((void*)fromObj)));
  305. }
  306. #ifdef __IBMCPP__
  307. #pragma info(restore)
  308. #endif
  309.  
  310.  
  311. /*
  312.  * Reintroduce inherited methods
  313.  */
  314.  
  315. /* method: sompNewMediaInterface */
  316. void   sompNewMediaInterface(Environment *ev, 
  317.         string IOInfo)
  318. {
  319.    SOM_ResolveD(this,SOMPBinary,SOMPIOGroupMgrAbstract,sompNewMediaInterface)
  320.     (this, ev,IOInfo);
  321. }
  322.  
  323.  
  324. /* method: sompGetMediaInterface */
  325. SOMPMediaInterfaceAbstract*   sompGetMediaInterface(Environment *ev)
  326. {
  327.    return SOM_ResolveD(this,SOMPBinary,SOMPIOGroupMgrAbstract,sompGetMediaInterface)
  328.     (this, ev);
  329. }
  330.  
  331.  
  332. /* method: sompFreeMediaInterface */
  333. void   sompFreeMediaInterface(Environment *ev)
  334. {
  335.    SOM_ResolveD(this,SOMPBinary,SOMPIOGroupMgrAbstract,sompFreeMediaInterface)
  336.     (this, ev);
  337. }
  338.  
  339.  
  340. /* method: sompInstantiateMediaInterface */
  341. SOMPMediaInterfaceAbstract*   sompInstantiateMediaInterface(Environment *ev)
  342. {
  343.    return SOM_ResolveD(this,SOMPBinary,SOMPIOGroupMgrAbstract,sompInstantiateMediaInterface)
  344.     (this, ev);
  345. }
  346.  
  347.  
  348. /* method: sompWriteGroup */
  349. boolean   sompWriteGroup(Environment *ev, 
  350.         SOMPPersistentObject* thisPo)
  351. {
  352.    return SOM_ResolveD(this,SOMPBinary,SOMPIOGroupMgrAbstract,sompWriteGroup)
  353.     (this, ev,thisPo);
  354. }
  355.  
  356.  
  357. /* method: sompReadGroup */
  358. SOMPPersistentObject*   sompReadGroup(Environment *ev, 
  359.         SOMPPersistentId* objectID)
  360. {
  361.    return SOM_ResolveD(this,SOMPBinary,SOMPIOGroupMgrAbstract,sompReadGroup)
  362.     (this, ev,objectID);
  363. }
  364.  
  365.  
  366. /* method: sompReadObjectData */
  367. void   sompReadObjectData(Environment *ev, 
  368.         SOMPPersistentObject* thisPo)
  369. {
  370.    SOM_ResolveD(this,SOMPBinary,SOMPIOGroupMgrAbstract,sompReadObjectData)
  371.     (this, ev,thisPo);
  372. }
  373.  
  374.  
  375. /* method: sompDeleteObjectFromGroup */
  376. void   sompDeleteObjectFromGroup(Environment *ev, 
  377.         SOMPPersistentId* objectID)
  378. {
  379.    SOM_ResolveD(this,SOMPBinary,SOMPIOGroupMgrAbstract,sompDeleteObjectFromGroup)
  380.     (this, ev,objectID);
  381. }
  382.  
  383.  
  384. /* method: sompGroupExists */
  385. boolean   sompGroupExists(Environment *ev, 
  386.         string IOInfo)
  387. {
  388.    return SOM_ResolveD(this,SOMPBinary,SOMPIOGroupMgrAbstract,sompGroupExists)
  389.     (this, ev,IOInfo);
  390. }
  391.  
  392.  
  393. /* method: sompObjectInGroup */
  394. boolean   sompObjectInGroup(Environment *ev, 
  395.         SOMPPersistentId* objectID)
  396. {
  397.    return SOM_ResolveD(this,SOMPBinary,SOMPIOGroupMgrAbstract,sompObjectInGroup)
  398.     (this, ev,objectID);
  399. }
  400.  
  401.  
  402. /* method: sompMediaFormatOk */
  403. boolean   sompMediaFormatOk(Environment *ev, 
  404.         string mediaFormatName)
  405. {
  406.    return SOM_ResolveD(this,SOMPBinary,SOMPIOGroupMgrAbstract,sompMediaFormatOk)
  407.     (this, ev,mediaFormatName);
  408. }
  409.  
  410.  
  411. /* method: somInit */
  412. void   somInit()
  413. {
  414.    SOM_ResolveD(this,SOMPBinary,SOMObject,somInit)
  415.     (this);
  416. }
  417.  
  418.  
  419. /* method: somUninit */
  420. void   somUninit()
  421. {
  422.    SOM_ResolveD(this,SOMPBinary,SOMObject,somUninit)
  423.     (this);
  424. }
  425.  
  426.  
  427. /* initializer method: somDefaultInit */
  428. void   somDefaultInit(som3InitCtrl* ctrl)
  429. {
  430. /*
  431.  *  A default initializer for a SOM object. Passing a null ctrl
  432.  *  indicates to the receiver that its class is the class of the
  433.  *  object being initialized, whereby the initializer will determine
  434.  *  an appropriate control structure.
  435.  */
  436.    SOM_ResolveD(this,SOMPBinary,SOMObject,somDefaultInit)
  437.     (this,ctrl);
  438. }
  439.  
  440.  
  441. /* method: somDestruct */
  442. void   somDestruct(octet doFree, 
  443.         som3DestructCtrl* ctrl)
  444. {
  445. /*
  446.  *  The default destructor for a SOM object. A nonzero <doFree>
  447.  *  indicates that the object storage should be freed by the
  448.  *  object's class (via somDeallocate) after uninitialization.
  449.  *  As with somDefaultInit, a null ctrl can be passed.
  450.  */
  451.    SOM_ResolveD(this,SOMPBinary,SOMObject,somDestruct)
  452.     (this,doFree,ctrl);
  453. }
  454.  
  455.  
  456. /* initializer method: somDefaultCopyInit */
  457. void   somDefaultCopyInit(som3InitCtrl* ctrl, 
  458.         SOMObject* fromObj)
  459. {
  460. /*
  461.  *  A default copy constructor. Use this to make copies of objects for
  462.  *  calling methods with "by-value" argument semantics.
  463.  */
  464.    SOM_ResolveD(this,SOMPBinary,SOMObject,somDefaultCopyInit)
  465.     (this,ctrl,fromObj);
  466. }
  467.  
  468.  
  469. /* method: somDefaultAssign */
  470. SOMPBinary*  somDefaultAssign(som3AssignCtrl* ctrl, 
  471.         SOMObject* fromObj)
  472. {
  473. /*
  474.  *  A default assignment operator. Use this to "assign" the state of one
  475.  *  object to another.
  476.  */
  477.    return SOM_ResolveD(this,SOMPBinary,SOMObject,somDefaultAssign)
  478.     (this,ctrl,fromObj);
  479. }
  480.  
  481.  
  482. /* initializer method: somDefaultConstCopyInit */
  483. void   somDefaultConstCopyInit(som3InitCtrl* ctrl, 
  484.         SOMObject* fromObj)
  485. {
  486. /*
  487.  *  A default copy constructor that uses a const fromObj.
  488.  */
  489.    SOM_ResolveD(this,SOMPBinary,SOMObject,somDefaultConstCopyInit)
  490.     (this,ctrl,fromObj);
  491. }
  492.  
  493.  
  494. /* initializer method: somDefaultVCopyInit */
  495. void   somDefaultVCopyInit(som3InitCtrl* ctrl, 
  496.         SOMObject* fromObj)
  497. {
  498. /*
  499.  *  A default copy constructor that uses a volatile fromObj.
  500.  */
  501.    SOM_ResolveD(this,SOMPBinary,SOMObject,somDefaultVCopyInit)
  502.     (this,ctrl,fromObj);
  503. }
  504.  
  505.  
  506. /* initializer method: somDefaultConstVCopyInit */
  507. void   somDefaultConstVCopyInit(som3InitCtrl* ctrl, 
  508.         SOMObject* fromObj)
  509. {
  510. /*
  511.  *  A default copy constructor that uses a const volatile fromObj.
  512.  */
  513.    SOM_ResolveD(this,SOMPBinary,SOMObject,somDefaultConstVCopyInit)
  514.     (this,ctrl,fromObj);
  515. }
  516.  
  517.  
  518. /* method: somDefaultConstAssign */
  519. SOMPBinary*  somDefaultConstAssign(som3AssignCtrl* ctrl, 
  520.         SOMObject* fromObj)
  521. {
  522. /*
  523.  *  A default assignment operator that uses a const fromObj.
  524.  */
  525.    return SOM_ResolveD(this,SOMPBinary,SOMObject,somDefaultConstAssign)
  526.     (this,ctrl,fromObj);
  527. }
  528.  
  529.  
  530. /* method: somDefaultVAssign */
  531. SOMPBinary*  somDefaultVAssign(som3AssignCtrl* ctrl, 
  532.         SOMObject* fromObj)
  533. {
  534. /*
  535.  *  A default assignment operator that uses a volatile fromObj.
  536.  */
  537.    return SOM_ResolveD(this,SOMPBinary,SOMObject,somDefaultVAssign)
  538.     (this,ctrl,fromObj);
  539. }
  540.  
  541.  
  542. /* method: somDefaultConstVAssign */
  543. SOMPBinary*  somDefaultConstVAssign(som3AssignCtrl* ctrl, 
  544.         SOMObject* fromObj)
  545. {
  546. /*
  547.  *  A default assignment operator that uses a const volatile fromObj.
  548.  */
  549.    return SOM_ResolveD(this,SOMPBinary,SOMObject,somDefaultConstVAssign)
  550.     (this,ctrl,fromObj);
  551. }
  552.  
  553.  
  554. /* method: somFree */
  555. void   somFree()
  556. {
  557. /*
  558.  *  Use as directed by framework implementations.
  559.  */
  560.    SOM_ResolveD(this,SOMPBinary,SOMObject,somFree)
  561.     (this);
  562. }
  563.  
  564.  
  565. /* method: somGetClass */
  566. SOMClass*   somGetClass()
  567. {
  568. /*
  569.  *  Return the receiver's class.
  570.  */
  571.    return SOM_ResolveD(this,SOMPBinary,SOMObject,somGetClass)
  572.     (this);
  573. }
  574.  
  575.  
  576. /* method: somGetClassName */
  577. string   somGetClassName()
  578. {
  579. /*
  580.  *  Return the name of the receiver's class.
  581.  */
  582.    return SOM_ResolveD(this,SOMPBinary,SOMObject,somGetClassName)
  583.     (this);
  584. }
  585.  
  586.  
  587. /* method: somGetSize */
  588. long   somGetSize()
  589. {
  590. /*
  591.  *  Return the size of the receiver.
  592.  */
  593.    return SOM_ResolveD(this,SOMPBinary,SOMObject,somGetSize)
  594.     (this);
  595. }
  596.  
  597.  
  598. /* method: somIsA */
  599. boolean   somIsA(SOMClass* aClassObj)
  600. {
  601. /*
  602.  *  Returns 1 (true) if the receiver responds to methods
  603.  *  introduced by <aClassObj>, and 0 (false) otherwise.
  604.  */
  605.    return SOM_ResolveD(this,SOMPBinary,SOMObject,somIsA)
  606.     (this,aClassObj);
  607. }
  608.  
  609.  
  610. /* method: somIsInstanceOf */
  611. boolean   somIsInstanceOf(SOMClass* aClassObj)
  612. {
  613. /*
  614.  *  Returns 1 (true) if the receiver is an instance of
  615.  *  <aClassObj> and 0 (false) otherwise.
  616.  */
  617.    return SOM_ResolveD(this,SOMPBinary,SOMObject,somIsInstanceOf)
  618.     (this,aClassObj);
  619. }
  620.  
  621.  
  622. /* method: somRespondsTo */
  623. boolean   somRespondsTo(somId mId)
  624. {
  625. /*
  626.  *  Returns 1 (true) if the indicated method can be invoked
  627.  *  on the receiver and 0 (false) otherwise.
  628.  */
  629.    return SOM_ResolveD(this,SOMPBinary,SOMObject,somRespondsTo)
  630.     (this,mId);
  631. }
  632.  
  633.  
  634. /* va_list method: somDispatch */
  635.  
  636. /*
  637.  *  This method provides a generic, class-specific dispatch mechanism.
  638.  *  It accepts as input <retValue> a pointer to the memory area to be
  639.  *  loaded with the result of dispatching the method indicated by
  640.  *  <methodId> using the arguments in <ap>. <ap> contains the object
  641.  *  on which the method is to be invoked as the first argument.
  642.  */
  643. /* the va_list invocation form */
  644. boolean   SOMPBinary_somDispatch(somToken* retValue, 
  645.         somId methodId, 
  646.         va_list ap)
  647. {return SOM_ResolveD(this,SOMPBinary,SOMObject,somDispatch)
  648.     (this,retValue,methodId,ap);
  649. }
  650.  
  651. /* the varargs invocation form */
  652. boolean   somDispatch(somToken* retValue, 
  653.         somId methodId, 
  654.         ...)
  655. {
  656. /*
  657.  *  This method provides a generic, class-specific dispatch mechanism.
  658.  *  It accepts as input <retValue> a pointer to the memory area to be
  659.  *  loaded with the result of dispatching the method indicated by
  660.  *  <methodId> using the arguments in <ap>. <ap> contains the object
  661.  *  on which the method is to be invoked as the first argument.
  662.  */
  663.    va_list ap;
  664.    va_start(ap, methodId);
  665.    boolean __somResult = 
  666.       SOM_ResolveD(this,SOMPBinary,SOMObject,somDispatch)
  667.     (this,retValue,methodId,ap);
  668.    va_end(ap);
  669.    return __somResult;
  670. }
  671.  
  672.  
  673. /* va_list method: somClassDispatch */
  674.  
  675. /*
  676.  *  Like somDispatch, but method resolution for static methods is done
  677.  *  according to the clsObj instance method table.
  678.  */
  679. /* the va_list invocation form */
  680. boolean   SOMPBinary_somClassDispatch(SOMClass* clsObj, 
  681.         somToken* retValue, 
  682.         somId methodId, 
  683.         va_list ap)
  684. {return SOM_ResolveD(this,SOMPBinary,SOMObject,somClassDispatch)
  685.     (this,clsObj,retValue,methodId,ap);
  686. }
  687.  
  688. /* the varargs invocation form */
  689. boolean   somClassDispatch(SOMClass* clsObj, 
  690.         somToken* retValue, 
  691.         somId methodId, 
  692.         ...)
  693. {
  694. /*
  695.  *  Like somDispatch, but method resolution for static methods is done
  696.  *  according to the clsObj instance method table.
  697.  */
  698.    va_list ap;
  699.    va_start(ap, methodId);
  700.    boolean __somResult = 
  701.       SOM_ResolveD(this,SOMPBinary,SOMObject,somClassDispatch)
  702.     (this,clsObj,retValue,methodId,ap);
  703.    va_end(ap);
  704.    return __somResult;
  705. }
  706.  
  707.  
  708. /* method: somCastObj */
  709. boolean   somCastObj(SOMClass* cls)
  710. {
  711. /*
  712.  *  cast the receiving object to cls (which must be an ancestor of the
  713.  *  objects true class. Returns true on success.
  714.  */
  715.    return SOM_ResolveD(this,SOMPBinary,SOMObject,somCastObj)
  716.     (this,cls);
  717. }
  718.  
  719.  
  720. /* method: somResetObj */
  721. boolean   somResetObj()
  722. {
  723. /*
  724.  *  reset an object to its true class. Returns true always.
  725.  */
  726.    return SOM_ResolveD(this,SOMPBinary,SOMObject,somResetObj)
  727.     (this);
  728. }
  729.  
  730.  
  731. /* va_list method: somDispatchV */
  732.  
  733. /*
  734.  *  Obsolete. Use somDispatch instead.
  735.  */
  736. /* the va_list invocation form */
  737. void   SOMPBinary_somDispatchV(somId methodId, 
  738.         somId descriptor, 
  739.         va_list ap)
  740. {   SOM_ResolveD(this,SOMPBinary,SOMObject,somDispatchV)
  741.     (this,methodId,descriptor,ap);
  742. }
  743.  
  744. /* the varargs invocation form */
  745. void   somDispatchV(somId methodId, 
  746.         somId descriptor, 
  747.         ...)
  748. {
  749. /*
  750.  *  Obsolete. Use somDispatch instead.
  751.  */
  752.    va_list ap;
  753.    va_start(ap, descriptor);
  754.    SOM_ResolveD(this,SOMPBinary,SOMObject,somDispatchV)
  755.     (this,methodId,descriptor,ap);
  756.    va_end(ap);
  757. }
  758.  
  759.  
  760. /* va_list method: somDispatchL */
  761.  
  762. /*
  763.  *  Obsolete. Use somDispatch instead.
  764.  */
  765. /* the va_list invocation form */
  766. long   SOMPBinary_somDispatchL(somId methodId, 
  767.         somId descriptor, 
  768.         va_list ap)
  769. {return SOM_ResolveD(this,SOMPBinary,SOMObject,somDispatchL)
  770.     (this,methodId,descriptor,ap);
  771. }
  772.  
  773. /* the varargs invocation form */
  774. long   somDispatchL(somId methodId, 
  775.         somId descriptor, 
  776.         ...)
  777. {
  778. /*
  779.  *  Obsolete. Use somDispatch instead.
  780.  */
  781.    va_list ap;
  782.    va_start(ap, descriptor);
  783.    long __somResult = 
  784.       SOM_ResolveD(this,SOMPBinary,SOMObject,somDispatchL)
  785.     (this,methodId,descriptor,ap);
  786.    va_end(ap);
  787.    return __somResult;
  788. }
  789.  
  790.  
  791. /* va_list method: somDispatchA */
  792.  
  793. /*
  794.  *  Obsolete. Use somDispatch instead.
  795.  */
  796. /* the va_list invocation form */
  797. void*   SOMPBinary_somDispatchA(somId methodId, 
  798.         somId descriptor, 
  799.         va_list ap)
  800. {return SOM_ResolveD(this,SOMPBinary,SOMObject,somDispatchA)
  801.     (this,methodId,descriptor,ap);
  802. }
  803.  
  804. /* the varargs invocation form */
  805. void*   somDispatchA(somId methodId, 
  806.         somId descriptor, 
  807.         ...)
  808. {
  809. /*
  810.  *  Obsolete. Use somDispatch instead.
  811.  */
  812.    va_list ap;
  813.    va_start(ap, descriptor);
  814.    void* __somResult = 
  815.       SOM_ResolveD(this,SOMPBinary,SOMObject,somDispatchA)
  816.     (this,methodId,descriptor,ap);
  817.    va_end(ap);
  818.    return __somResult;
  819. }
  820.  
  821.  
  822. /* va_list method: somDispatchD */
  823.  
  824. /*
  825.  *  Obsolete. Use somDispatch instead.
  826.  */
  827. /* the va_list invocation form */
  828. double   SOMPBinary_somDispatchD(somId methodId, 
  829.         somId descriptor, 
  830.         va_list ap)
  831. {return SOM_ResolveD(this,SOMPBinary,SOMObject,somDispatchD)
  832.     (this,methodId,descriptor,ap);
  833. }
  834.  
  835. /* the varargs invocation form */
  836. double   somDispatchD(somId methodId, 
  837.         somId descriptor, 
  838.         ...)
  839. {
  840. /*
  841.  *  Obsolete. Use somDispatch instead.
  842.  */
  843.    va_list ap;
  844.    va_start(ap, descriptor);
  845.    double __somResult = 
  846.       SOM_ResolveD(this,SOMPBinary,SOMObject,somDispatchD)
  847.     (this,methodId,descriptor,ap);
  848.    va_end(ap);
  849.    return __somResult;
  850. }
  851.  
  852.  
  853. /* method: somPrintSelf */
  854. SOMObject*   somPrintSelf()
  855. {
  856. /*
  857.  *  Uses <SOMOutCharRoutine> to write a brief string with identifying
  858.  *  information about this object.  The default implementation just gives
  859.  *  the object's class name and its address in memory.
  860.  *  <self> is returned.
  861.  */
  862.    return SOM_ResolveD(this,SOMPBinary,SOMObject,somPrintSelf)
  863.     (this);
  864. }
  865.  
  866.  
  867. /* method: somDumpSelf */
  868. void   somDumpSelf(long level)
  869. {
  870. /*
  871.  *  Uses <SOMOutCharRoutine> to write a detailed description of this object
  872.  *  and its current state.
  873.  * 
  874.  *  <level> indicates the nesting level for describing compound objects
  875.  *  it must be greater than or equal to zero.  All lines in the
  876.  *  description will be preceeded by <2*level> spaces.
  877.  * 
  878.  *  This routine only actually writes the data that concerns the object
  879.  *  as a whole, such as class, and uses <somDumpSelfInt> to describe
  880.  *  the object's current state.  This approach allows readable
  881.  *  descriptions of compound objects to be constructed.
  882.  * 
  883.  *  Generally it is not necessary to override this method, if it is
  884.  *  overriden it generally must be completely replaced.
  885.  */
  886.    SOM_ResolveD(this,SOMPBinary,SOMObject,somDumpSelf)
  887.     (this,level);
  888. }
  889.  
  890.  
  891. /* method: somDumpSelfInt */
  892. void   somDumpSelfInt(long level)
  893. {
  894. /*
  895.  *  Uses <SOMOutCharRoutine> to write in the current state of this object.
  896.  *  Generally this method will need to be overridden.  When overriding
  897.  *  it, begin by calling the parent class form of this method and then
  898.  *  write in a description of your class's instance data. This will
  899.  *  result in a description of all the object's instance data going
  900.  *  from its root ancestor class to its specific class.
  901.  */
  902.    SOM_ResolveD(this,SOMPBinary,SOMObject,somDumpSelfInt)
  903.     (this,level);
  904. }
  905.  
  906.  
  907.  
  908. };   /* SOMPBinary */
  909.  
  910.  
  911.  
  912. #endif       /* SOM_SOMPBinary_xh */
  913.