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

  1.  
  2. /*
  3.  * This file was generated by the SOM Compiler.
  4.  * FileName: fmi.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_SOMPAsciiMediaInterface_xh
  26. #define SOM_SOMPAsciiMediaInterface_xh
  27.  
  28. class SOMPAsciiMediaInterface;
  29.  
  30. /*
  31.  *  The AsciiMediaInterface class is responsible for providing the
  32.  *  interface to the file system. The numeric data it writes is in
  33.  *  ASCII format.
  34.  */
  35.  
  36. #define SOMPAsciiMediaInterface_MajorVersion 2
  37. #define SOMPAsciiMediaInterface_MinorVersion 1
  38.  
  39. /* C++ SOM defs */
  40. #include <somcls.xh>
  41. #include <somcm.xh>
  42.  
  43. /* C++ parent defs */
  44. #ifndef SOM_SOMPFileMediaAbstract_xh
  45. #include <fma.xh>
  46. #endif
  47.  
  48. #ifndef SOMPAsciiMediaInterface_API
  49. #define SOMPAsciiMediaInterface_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. typedef
  61. struct SOMPAsciiMediaInterface_mediaFlags_Type {
  62. octet  open_for_read;
  63. /*
  64.  *  1=read only
  65.  */
  66.  
  67. octet  open_for_readwrite;
  68. /*
  69.  *  1=read/write
  70.  */
  71.  
  72. octet  create_if_nonexistent;
  73. /*
  74.  *  1=create if file nonexistent
  75.  */
  76.  
  77. octet  share;
  78. /*
  79.  *  1=allow multiple readers
  80.  */
  81.  
  82. } SOMPAsciiMediaInterface_mediaFlags_Type, SOMPAsciiMediaInterface_mediaFlagsType;
  83. typedef
  84. struct SOMPAsciiMediaInterface_mediaInfo_Type {
  85. string  Name;
  86. /*
  87.  *  file name
  88.  */
  89.  
  90. SOMPAsciiMediaInterface_mediaFlagsType Flags;
  91. /*
  92.  *  flags, see mediaFlagsType
  93.  */
  94.  
  95. unsigned short  unix_file_permissions;
  96. /*
  97.  *  file permissions (unused on OS/2)
  98.  */
  99.  
  100. } SOMPAsciiMediaInterface_mediaInfo_Type, SOMPAsciiMediaInterface_mediaInfoType;
  101.  
  102. #ifndef SOM_DONT_USE_SHORT_NAMES
  103. #ifndef SOMTGD_mediaFlagsType
  104.     #ifdef mediaFlagsType
  105.         #undef mediaFlagsType
  106.         #define SOMTGD_mediaFlagsType 1
  107.     #else
  108.         #define mediaFlagsType SOMPAsciiMediaInterface_mediaFlagsType
  109.     #endif /* mediaFlagsType */
  110. #endif /* SOMTGD_mediaFlagsType */
  111. #endif /* SOM_DONT_USE_SHORT_NAMES */
  112.  
  113. #ifndef SOM_DONT_USE_SHORT_NAMES
  114. #ifndef SOMTGD_mediaInfoType
  115.     #ifdef mediaInfoType
  116.         #undef mediaInfoType
  117.         #define SOMTGD_mediaInfoType 1
  118.     #else
  119.         #define mediaInfoType SOMPAsciiMediaInterface_mediaInfoType
  120.     #endif /* mediaInfoType */
  121. #endif /* SOMTGD_mediaInfoType */
  122. #endif /* SOM_DONT_USE_SHORT_NAMES */
  123.  
  124. /*
  125.  * End of bindings for IDL types.
  126.  */
  127.  
  128. /* A procedure to create the SOMPAsciiMediaInterface Class */
  129. SOMEXTERN SOMClass * SOMLINK SOMPAsciiMediaInterfaceNewClass(
  130.         integer4 majorVersion,
  131.         integer4 minorVersion);
  132.  
  133. /* The API to the SOMPAsciiMediaInterface class object, and the methods it introduces. */
  134. SOMEXTERN struct SOMPAsciiMediaInterfaceClassDataStructure {
  135.     SOMClass *classObject;
  136.     somMToken sompStat;
  137.     somMToken sompTruncate;
  138.     somMToken sompQueryBlockSize;
  139.     somMToken sompGetMediaName;
  140.     somMToken sompInitSpecific;
  141. } SOMDLINK SOMPAsciiMediaInterfaceClassData;
  142. #define _SOMPAsciiMediaInterface SOMPAsciiMediaInterfaceClassData.classObject
  143.  
  144. /* The API to parentMtabs for SOMPAsciiMediaInterface, and the instance data it introduces. */
  145. SOMEXTERN struct SOMPAsciiMediaInterfaceCClassDataStructure {
  146.     somMethodTabs parentMtab;
  147.     somDToken              instanceDataToken;
  148. } SOMDLINK SOMPAsciiMediaInterfaceCClassData;
  149.  
  150. /*
  151.  * -- Typedefs for SOMPAsciiMediaInterface Method Procedures
  152.  */
  153. SOMEXTERN {
  154. typedef void   SOMLINK somTP_SOMPAsciiMediaInterface_sompInitSpecific(SOMPAsciiMediaInterface *somSelf, Environment *ev, 
  155.         SOMPAsciiMediaInterface_mediaInfoType* mediaInfo);
  156. typedef somTP_SOMPAsciiMediaInterface_sompInitSpecific *somTD_SOMPAsciiMediaInterface_sompInitSpecific;
  157. typedef void   SOMLINK somTP_SOMPAsciiMediaInterface_sompStat(SOMPAsciiMediaInterface *somSelf, Environment *ev, 
  158.         SOMPStatDef_sompstat* fileStats);
  159. typedef somTP_SOMPAsciiMediaInterface_sompStat *somTD_SOMPAsciiMediaInterface_sompStat;
  160. typedef unsigned long   SOMLINK somTP_SOMPAsciiMediaInterface_sompQueryBlockSize(SOMPAsciiMediaInterface *somSelf, Environment *ev);
  161. typedef somTP_SOMPAsciiMediaInterface_sompQueryBlockSize *somTD_SOMPAsciiMediaInterface_sompQueryBlockSize;
  162. typedef string   SOMLINK somTP_SOMPAsciiMediaInterface_sompGetMediaName(SOMPAsciiMediaInterface *somSelf, Environment *ev, 
  163.         string toBuffer);
  164. typedef somTP_SOMPAsciiMediaInterface_sompGetMediaName *somTD_SOMPAsciiMediaInterface_sompGetMediaName;
  165.  
  166. /*
  167.  * -- Typedefs for Reintroduced Wrapper Methods
  168.  */
  169. typedef void   SOMLINK somTP_SOMPAsciiMediaInterface_sompInitReadWrite(SOMPAsciiMediaInterface *somSelf, Environment *ev, 
  170.         string mediaInfo);
  171. typedef somTP_SOMPAsciiMediaInterface_sompInitReadWrite *somTD_SOMPAsciiMediaInterface_sompInitReadWrite;
  172. typedef void   SOMLINK somTP_SOMPAsciiMediaInterface_sompInitReadOnly(SOMPAsciiMediaInterface *somSelf, Environment *ev, 
  173.         string mediaInfo);
  174. typedef somTP_SOMPAsciiMediaInterface_sompInitReadOnly *somTD_SOMPAsciiMediaInterface_sompInitReadOnly;
  175. typedef void   SOMLINK somTP_SOMPAsciiMediaInterface_sompSeekPosition(SOMPAsciiMediaInterface *somSelf, Environment *ev, 
  176.         long offset);
  177. typedef somTP_SOMPAsciiMediaInterface_sompSeekPosition *somTD_SOMPAsciiMediaInterface_sompSeekPosition;
  178. typedef void   SOMLINK somTP_SOMPAsciiMediaInterface_sompSeekPositionRel(SOMPAsciiMediaInterface *somSelf, Environment *ev, 
  179.         long offset);
  180. typedef somTP_SOMPAsciiMediaInterface_sompSeekPositionRel *somTD_SOMPAsciiMediaInterface_sompSeekPositionRel;
  181. typedef long   SOMLINK somTP_SOMPAsciiMediaInterface_sompGetOffset(SOMPAsciiMediaInterface *somSelf, Environment *ev);
  182. typedef somTP_SOMPAsciiMediaInterface_sompGetOffset *somTD_SOMPAsciiMediaInterface_sompGetOffset;
  183. typedef void   SOMLINK somTP_SOMPAsciiMediaInterface_sompReadBytes(SOMPAsciiMediaInterface *somSelf, Environment *ev, 
  184.         string byteStream, 
  185.         long length);
  186. typedef somTP_SOMPAsciiMediaInterface_sompReadBytes *somTD_SOMPAsciiMediaInterface_sompReadBytes;
  187. typedef void   SOMLINK somTP_SOMPAsciiMediaInterface_sompWriteBytes(SOMPAsciiMediaInterface *somSelf, Environment *ev, 
  188.         string byteStream, 
  189.         long length);
  190. typedef somTP_SOMPAsciiMediaInterface_sompWriteBytes *somTD_SOMPAsciiMediaInterface_sompWriteBytes;
  191. typedef void   SOMLINK somTP_SOMPAsciiMediaInterface_sompWriteOctet(SOMPAsciiMediaInterface *somSelf, Environment *ev, 
  192.         octet i1);
  193. typedef somTP_SOMPAsciiMediaInterface_sompWriteOctet *somTD_SOMPAsciiMediaInterface_sompWriteOctet;
  194. typedef void   SOMLINK somTP_SOMPAsciiMediaInterface_sompWriteShort(SOMPAsciiMediaInterface *somSelf, Environment *ev, 
  195.         short i2);
  196. typedef somTP_SOMPAsciiMediaInterface_sompWriteShort *somTD_SOMPAsciiMediaInterface_sompWriteShort;
  197. typedef void   SOMLINK somTP_SOMPAsciiMediaInterface_sompWriteUnsignedShort(SOMPAsciiMediaInterface *somSelf, Environment *ev, 
  198.         unsigned short u2);
  199. typedef somTP_SOMPAsciiMediaInterface_sompWriteUnsignedShort *somTD_SOMPAsciiMediaInterface_sompWriteUnsignedShort;
  200. typedef void   SOMLINK somTP_SOMPAsciiMediaInterface_sompWriteLong(SOMPAsciiMediaInterface *somSelf, Environment *ev, 
  201.         long i4);
  202. typedef somTP_SOMPAsciiMediaInterface_sompWriteLong *somTD_SOMPAsciiMediaInterface_sompWriteLong;
  203. typedef void   SOMLINK somTP_SOMPAsciiMediaInterface_sompWriteUnsignedLong(SOMPAsciiMediaInterface *somSelf, Environment *ev, 
  204.         unsigned long u4);
  205. typedef somTP_SOMPAsciiMediaInterface_sompWriteUnsignedLong *somTD_SOMPAsciiMediaInterface_sompWriteUnsignedLong;
  206. typedef void   SOMLINK somTP_SOMPAsciiMediaInterface_sompWriteDouble(SOMPAsciiMediaInterface *somSelf, Environment *ev, 
  207.         double f8);
  208. typedef somTP_SOMPAsciiMediaInterface_sompWriteDouble *somTD_SOMPAsciiMediaInterface_sompWriteDouble;
  209. typedef void   SOMLINK somTP_SOMPAsciiMediaInterface_sompWriteFloat(SOMPAsciiMediaInterface *somSelf, Environment *ev, 
  210.         float f4);
  211. typedef somTP_SOMPAsciiMediaInterface_sompWriteFloat *somTD_SOMPAsciiMediaInterface_sompWriteFloat;
  212. typedef void   SOMLINK somTP_SOMPAsciiMediaInterface_sompWriteCharacter(SOMPAsciiMediaInterface *somSelf, Environment *ev, 
  213.         char c);
  214. typedef somTP_SOMPAsciiMediaInterface_sompWriteCharacter *somTD_SOMPAsciiMediaInterface_sompWriteCharacter;
  215. typedef void   SOMLINK somTP_SOMPAsciiMediaInterface_sompWriteSomobject(SOMPAsciiMediaInterface *somSelf, Environment *ev, 
  216.         SOMObject* so, 
  217.         SOMObject* parentObject);
  218. typedef somTP_SOMPAsciiMediaInterface_sompWriteSomobject *somTD_SOMPAsciiMediaInterface_sompWriteSomobject;
  219. typedef void   SOMLINK somTP_SOMPAsciiMediaInterface_sompWriteString(SOMPAsciiMediaInterface *somSelf, Environment *ev, 
  220.         string wstring);
  221. typedef somTP_SOMPAsciiMediaInterface_sompWriteString *somTD_SOMPAsciiMediaInterface_sompWriteString;
  222. typedef void   SOMLINK somTP_SOMPAsciiMediaInterface_sompReadOctet(SOMPAsciiMediaInterface *somSelf, Environment *ev, 
  223.         octet* i1);
  224. typedef somTP_SOMPAsciiMediaInterface_sompReadOctet *somTD_SOMPAsciiMediaInterface_sompReadOctet;
  225. typedef void   SOMLINK somTP_SOMPAsciiMediaInterface_sompReadShort(SOMPAsciiMediaInterface *somSelf, Environment *ev, 
  226.         short* i2);
  227. typedef somTP_SOMPAsciiMediaInterface_sompReadShort *somTD_SOMPAsciiMediaInterface_sompReadShort;
  228. typedef void   SOMLINK somTP_SOMPAsciiMediaInterface_sompReadUnsignedShort(SOMPAsciiMediaInterface *somSelf, Environment *ev, 
  229.         unsigned short* u2);
  230. typedef somTP_SOMPAsciiMediaInterface_sompReadUnsignedShort *somTD_SOMPAsciiMediaInterface_sompReadUnsignedShort;
  231. typedef void   SOMLINK somTP_SOMPAsciiMediaInterface_sompReadLong(SOMPAsciiMediaInterface *somSelf, Environment *ev, 
  232.         long* i4);
  233. typedef somTP_SOMPAsciiMediaInterface_sompReadLong *somTD_SOMPAsciiMediaInterface_sompReadLong;
  234. typedef void   SOMLINK somTP_SOMPAsciiMediaInterface_sompReadUnsignedLong(SOMPAsciiMediaInterface *somSelf, Environment *ev, 
  235.         unsigned long* i4);
  236. typedef somTP_SOMPAsciiMediaInterface_sompReadUnsignedLong *somTD_SOMPAsciiMediaInterface_sompReadUnsignedLong;
  237. typedef void   SOMLINK somTP_SOMPAsciiMediaInterface_sompReadDouble(SOMPAsciiMediaInterface *somSelf, Environment *ev, 
  238.         double* f8);
  239. typedef somTP_SOMPAsciiMediaInterface_sompReadDouble *somTD_SOMPAsciiMediaInterface_sompReadDouble;
  240. typedef void   SOMLINK somTP_SOMPAsciiMediaInterface_sompReadFloat(SOMPAsciiMediaInterface *somSelf, Environment *ev, 
  241.         float* f4);
  242. typedef somTP_SOMPAsciiMediaInterface_sompReadFloat *somTD_SOMPAsciiMediaInterface_sompReadFloat;
  243. typedef void   SOMLINK somTP_SOMPAsciiMediaInterface_sompReadCharacter(SOMPAsciiMediaInterface *somSelf, Environment *ev, 
  244.         char* c);
  245. typedef somTP_SOMPAsciiMediaInterface_sompReadCharacter *somTD_SOMPAsciiMediaInterface_sompReadCharacter;
  246. typedef void   SOMLINK somTP_SOMPAsciiMediaInterface_sompReadSomobject(SOMPAsciiMediaInterface *somSelf, Environment *ev, 
  247.         SOMObject** so);
  248. typedef somTP_SOMPAsciiMediaInterface_sompReadSomobject *somTD_SOMPAsciiMediaInterface_sompReadSomobject;
  249. typedef void   SOMLINK somTP_SOMPAsciiMediaInterface_sompReadString(SOMPAsciiMediaInterface *somSelf, Environment *ev, 
  250.         string* rstring);
  251. typedef somTP_SOMPAsciiMediaInterface_sompReadString *somTD_SOMPAsciiMediaInterface_sompReadString;
  252. typedef void   SOMLINK somTP_SOMPAsciiMediaInterface_sompReadStringToBuffer(SOMPAsciiMediaInterface *somSelf, Environment *ev, 
  253.         string buffer, 
  254.         long bufsize);
  255. typedef somTP_SOMPAsciiMediaInterface_sompReadStringToBuffer *somTD_SOMPAsciiMediaInterface_sompReadStringToBuffer;
  256. typedef void   SOMLINK somTP_SOMPAsciiMediaInterface_sompWriteLine(SOMPAsciiMediaInterface *somSelf, Environment *ev, 
  257.         string buffer);
  258. typedef somTP_SOMPAsciiMediaInterface_sompWriteLine *somTD_SOMPAsciiMediaInterface_sompWriteLine;
  259. typedef void   SOMLINK somTP_SOMPAsciiMediaInterface_sompReadLine(SOMPAsciiMediaInterface *somSelf, Environment *ev, 
  260.         string buffer, 
  261.         long bufsize);
  262. typedef somTP_SOMPAsciiMediaInterface_sompReadLine *somTD_SOMPAsciiMediaInterface_sompReadLine;
  263. typedef void   SOMLINK somTP_SOMPAsciiMediaInterface_sompWriteTypeCode(SOMPAsciiMediaInterface *somSelf, Environment *ev, 
  264.         TypeCode tc);
  265. typedef somTP_SOMPAsciiMediaInterface_sompWriteTypeCode *somTD_SOMPAsciiMediaInterface_sompWriteTypeCode;
  266. typedef void   SOMLINK somTP_SOMPAsciiMediaInterface_sompReadTypeCode(SOMPAsciiMediaInterface *somSelf, Environment *ev, 
  267.         TypeCode* tc);
  268. typedef somTP_SOMPAsciiMediaInterface_sompReadTypeCode *somTD_SOMPAsciiMediaInterface_sompReadTypeCode;
  269. typedef void   SOMLINK somTP_SOMPAsciiMediaInterface_sompOpen(SOMPAsciiMediaInterface *somSelf, Environment *ev);
  270. typedef somTP_SOMPAsciiMediaInterface_sompOpen *somTD_SOMPAsciiMediaInterface_sompOpen;
  271. typedef void   SOMLINK somTP_SOMPAsciiMediaInterface_sompClose(SOMPAsciiMediaInterface *somSelf, Environment *ev);
  272. typedef somTP_SOMPAsciiMediaInterface_sompClose *somTD_SOMPAsciiMediaInterface_sompClose;
  273. typedef void   SOMLINK somTP_SOMPAsciiMediaInterface_somDefaultInit(SOMPAsciiMediaInterface *somSelf, 
  274.         som3InitCtrl* ctrl);
  275. typedef somTP_SOMPAsciiMediaInterface_somDefaultInit *somTD_SOMPAsciiMediaInterface_somDefaultInit;
  276. typedef void   SOMLINK somTP_SOMPAsciiMediaInterface_somDestruct(SOMPAsciiMediaInterface *somSelf, 
  277.         octet doFree, 
  278.         som3DestructCtrl* ctrl);
  279. typedef somTP_SOMPAsciiMediaInterface_somDestruct *somTD_SOMPAsciiMediaInterface_somDestruct;
  280. typedef void   SOMLINK somTP_SOMPAsciiMediaInterface_somDefaultCopyInit(SOMPAsciiMediaInterface *somSelf, 
  281.         som3InitCtrl* ctrl, 
  282.         SOMObject* fromObj);
  283. typedef somTP_SOMPAsciiMediaInterface_somDefaultCopyInit *somTD_SOMPAsciiMediaInterface_somDefaultCopyInit;
  284. typedef SOMPAsciiMediaInterface*   SOMLINK somTP_SOMPAsciiMediaInterface_somDefaultAssign(SOMPAsciiMediaInterface *somSelf, 
  285.         som3AssignCtrl* ctrl, 
  286.         SOMObject* fromObj);
  287. typedef somTP_SOMPAsciiMediaInterface_somDefaultAssign *somTD_SOMPAsciiMediaInterface_somDefaultAssign;
  288. typedef void   SOMLINK somTP_SOMPAsciiMediaInterface_somDefaultConstCopyInit(SOMPAsciiMediaInterface *somSelf, 
  289.         som3InitCtrl* ctrl, 
  290.         SOMObject* fromObj);
  291. typedef somTP_SOMPAsciiMediaInterface_somDefaultConstCopyInit *somTD_SOMPAsciiMediaInterface_somDefaultConstCopyInit;
  292. typedef void   SOMLINK somTP_SOMPAsciiMediaInterface_somDefaultVCopyInit(SOMPAsciiMediaInterface *somSelf, 
  293.         som3InitCtrl* ctrl, 
  294.         SOMObject* fromObj);
  295. typedef somTP_SOMPAsciiMediaInterface_somDefaultVCopyInit *somTD_SOMPAsciiMediaInterface_somDefaultVCopyInit;
  296. typedef void   SOMLINK somTP_SOMPAsciiMediaInterface_somDefaultConstVCopyInit(SOMPAsciiMediaInterface *somSelf, 
  297.         som3InitCtrl* ctrl, 
  298.         SOMObject* fromObj);
  299. typedef somTP_SOMPAsciiMediaInterface_somDefaultConstVCopyInit *somTD_SOMPAsciiMediaInterface_somDefaultConstVCopyInit;
  300. typedef SOMPAsciiMediaInterface*   SOMLINK somTP_SOMPAsciiMediaInterface_somDefaultConstAssign(SOMPAsciiMediaInterface *somSelf, 
  301.         som3AssignCtrl* ctrl, 
  302.         SOMObject* fromObj);
  303. typedef somTP_SOMPAsciiMediaInterface_somDefaultConstAssign *somTD_SOMPAsciiMediaInterface_somDefaultConstAssign;
  304. typedef SOMPAsciiMediaInterface*   SOMLINK somTP_SOMPAsciiMediaInterface_somDefaultVAssign(SOMPAsciiMediaInterface *somSelf, 
  305.         som3AssignCtrl* ctrl, 
  306.         SOMObject* fromObj);
  307. typedef somTP_SOMPAsciiMediaInterface_somDefaultVAssign *somTD_SOMPAsciiMediaInterface_somDefaultVAssign;
  308. typedef SOMPAsciiMediaInterface*   SOMLINK somTP_SOMPAsciiMediaInterface_somDefaultConstVAssign(SOMPAsciiMediaInterface *somSelf, 
  309.         som3AssignCtrl* ctrl, 
  310.         SOMObject* fromObj);
  311. typedef somTP_SOMPAsciiMediaInterface_somDefaultConstVAssign *somTD_SOMPAsciiMediaInterface_somDefaultConstVAssign;
  312. typedef void   SOMLINK somTP_SOMPAsciiMediaInterface_somInit(SOMPAsciiMediaInterface *somSelf);
  313. typedef somTP_SOMPAsciiMediaInterface_somInit *somTD_SOMPAsciiMediaInterface_somInit;
  314. typedef void   SOMLINK somTP_SOMPAsciiMediaInterface_somFree(SOMPAsciiMediaInterface *somSelf);
  315. typedef somTP_SOMPAsciiMediaInterface_somFree *somTD_SOMPAsciiMediaInterface_somFree;
  316. typedef void   SOMLINK somTP_SOMPAsciiMediaInterface_somUninit(SOMPAsciiMediaInterface *somSelf);
  317. typedef somTP_SOMPAsciiMediaInterface_somUninit *somTD_SOMPAsciiMediaInterface_somUninit;
  318. typedef SOMClass*   SOMLINK somTP_SOMPAsciiMediaInterface_somGetClass(SOMPAsciiMediaInterface *somSelf);
  319. typedef somTP_SOMPAsciiMediaInterface_somGetClass *somTD_SOMPAsciiMediaInterface_somGetClass;
  320. typedef string   SOMLINK somTP_SOMPAsciiMediaInterface_somGetClassName(SOMPAsciiMediaInterface *somSelf);
  321. typedef somTP_SOMPAsciiMediaInterface_somGetClassName *somTD_SOMPAsciiMediaInterface_somGetClassName;
  322. typedef long   SOMLINK somTP_SOMPAsciiMediaInterface_somGetSize(SOMPAsciiMediaInterface *somSelf);
  323. typedef somTP_SOMPAsciiMediaInterface_somGetSize *somTD_SOMPAsciiMediaInterface_somGetSize;
  324. typedef boolean   SOMLINK somTP_SOMPAsciiMediaInterface_somIsA(SOMPAsciiMediaInterface *somSelf, 
  325.         SOMClass* aClassObj);
  326. typedef somTP_SOMPAsciiMediaInterface_somIsA *somTD_SOMPAsciiMediaInterface_somIsA;
  327. typedef boolean   SOMLINK somTP_SOMPAsciiMediaInterface_somIsInstanceOf(SOMPAsciiMediaInterface *somSelf, 
  328.         SOMClass* aClassObj);
  329. typedef somTP_SOMPAsciiMediaInterface_somIsInstanceOf *somTD_SOMPAsciiMediaInterface_somIsInstanceOf;
  330. typedef boolean   SOMLINK somTP_SOMPAsciiMediaInterface_somRespondsTo(SOMPAsciiMediaInterface *somSelf, 
  331.         somId mId);
  332. typedef somTP_SOMPAsciiMediaInterface_somRespondsTo *somTD_SOMPAsciiMediaInterface_somRespondsTo;
  333. typedef boolean   SOMLINK somTP_SOMPAsciiMediaInterface_somDispatch(SOMPAsciiMediaInterface *somSelf, 
  334.         somToken* retValue, 
  335.         somId methodId, 
  336.         va_list ap);
  337. typedef somTP_SOMPAsciiMediaInterface_somDispatch *somTD_SOMPAsciiMediaInterface_somDispatch;
  338. typedef boolean   SOMLINK somTP_SOMPAsciiMediaInterface_somClassDispatch(SOMPAsciiMediaInterface *somSelf, 
  339.         SOMClass* clsObj, 
  340.         somToken* retValue, 
  341.         somId methodId, 
  342.         va_list ap);
  343. typedef somTP_SOMPAsciiMediaInterface_somClassDispatch *somTD_SOMPAsciiMediaInterface_somClassDispatch;
  344. typedef boolean   SOMLINK somTP_SOMPAsciiMediaInterface_somCastObj(SOMPAsciiMediaInterface *somSelf, 
  345.         SOMClass* cls);
  346. typedef somTP_SOMPAsciiMediaInterface_somCastObj *somTD_SOMPAsciiMediaInterface_somCastObj;
  347. typedef boolean   SOMLINK somTP_SOMPAsciiMediaInterface_somResetObj(SOMPAsciiMediaInterface *somSelf);
  348. typedef somTP_SOMPAsciiMediaInterface_somResetObj *somTD_SOMPAsciiMediaInterface_somResetObj;
  349. typedef void   SOMLINK somTP_SOMPAsciiMediaInterface_somDispatchV(SOMPAsciiMediaInterface *somSelf, 
  350.         somId methodId, 
  351.         somId descriptor, 
  352.         va_list ap);
  353. typedef somTP_SOMPAsciiMediaInterface_somDispatchV *somTD_SOMPAsciiMediaInterface_somDispatchV;
  354. typedef long   SOMLINK somTP_SOMPAsciiMediaInterface_somDispatchL(SOMPAsciiMediaInterface *somSelf, 
  355.         somId methodId, 
  356.         somId descriptor, 
  357.         va_list ap);
  358. typedef somTP_SOMPAsciiMediaInterface_somDispatchL *somTD_SOMPAsciiMediaInterface_somDispatchL;
  359. typedef void*   SOMLINK somTP_SOMPAsciiMediaInterface_somDispatchA(SOMPAsciiMediaInterface *somSelf, 
  360.         somId methodId, 
  361.         somId descriptor, 
  362.         va_list ap);
  363. typedef somTP_SOMPAsciiMediaInterface_somDispatchA *somTD_SOMPAsciiMediaInterface_somDispatchA;
  364. typedef double   SOMLINK somTP_SOMPAsciiMediaInterface_somDispatchD(SOMPAsciiMediaInterface *somSelf, 
  365.         somId methodId, 
  366.         somId descriptor, 
  367.         va_list ap);
  368. typedef somTP_SOMPAsciiMediaInterface_somDispatchD *somTD_SOMPAsciiMediaInterface_somDispatchD;
  369. typedef SOMObject*   SOMLINK somTP_SOMPAsciiMediaInterface_somPrintSelf(SOMPAsciiMediaInterface *somSelf);
  370. typedef somTP_SOMPAsciiMediaInterface_somPrintSelf *somTD_SOMPAsciiMediaInterface_somPrintSelf;
  371. typedef void   SOMLINK somTP_SOMPAsciiMediaInterface_somDumpSelf(SOMPAsciiMediaInterface *somSelf, 
  372.         long level);
  373. typedef somTP_SOMPAsciiMediaInterface_somDumpSelf *somTD_SOMPAsciiMediaInterface_somDumpSelf;
  374. typedef void   SOMLINK somTP_SOMPAsciiMediaInterface_somDumpSelfInt(SOMPAsciiMediaInterface *somSelf, 
  375.         long level);
  376. typedef somTP_SOMPAsciiMediaInterface_somDumpSelfInt *somTD_SOMPAsciiMediaInterface_somDumpSelfInt;
  377. }
  378.  
  379. #endif /* SOMPAsciiMediaInterface_API */
  380.  
  381.  
  382. /*
  383.  * -- This emitter treats Method Tokens as Thunks by default.
  384.  * -- Use the sc modifier "nothunks" to change this default
  385.  */
  386. #undef somresolve_
  387. #define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
  388.  
  389. /*
  390.  * -- The C++ Wrapper Class for SOMPAsciiMediaInterface
  391.  */
  392. class SOMPAsciiMediaInterface : public SOMPFileMediaAbstract
  393. {
  394. /*
  395.  *  The AsciiMediaInterface class is responsible for providing the
  396.  *  interface to the file system. The numeric data it writes is in
  397.  *  ASCII format.
  398.  */
  399. public:
  400.  
  401. // SOMPAsciiMediaInterface::new creates the class object if necessary, and then uses somNewNoInit
  402. // to allocate memory and create the object. Initialization is in ctors.
  403. void *operator new(size_t)
  404. {
  405.    if (!_SOMPAsciiMediaInterface) SOMPAsciiMediaInterfaceNewClass(SOMPAsciiMediaInterface_MajorVersion,SOMPAsciiMediaInterface_MinorVersion);
  406.    return (void*)
  407.       SOM_Resolve(_SOMPAsciiMediaInterface,SOMClass,somNewNoInit)
  408.          ((SOMClass *)((void*)_SOMPAsciiMediaInterface));
  409. }
  410.  
  411. // SOMPAsciiMediaInterface::delete uses somDestruct.
  412. void operator delete(void * obj)
  413. {
  414.    if (obj && *(void**)obj) {
  415.       SOM_Resolve(obj,SOMObject,somFree)
  416.          ((SOMObject*)obj);
  417.    }
  418. }
  419.  
  420. SOMPAsciiMediaInterface& operator=(SOMPAsciiMediaInterface& fromObj)
  421. {
  422.    this->somDefaultAssign(0,(SOMObject*)((void*)&fromObj));
  423.    return *this;
  424. }
  425.  
  426. SOMPAsciiMediaInterface()
  427. {
  428.    if (*(void**)this != 
  429.        ((somParentMtabStructPtr)
  430.         (SOMPAsciiMediaInterfaceCClassData.parentMtab))->mtab)
  431.       return;
  432.    ((SOMObject*)((void*)this))->somDefaultInit(0);
  433. }
  434.  
  435. SOMPAsciiMediaInterface(SOMPAsciiMediaInterface* fromObj)
  436. {
  437.    if (*(void**)this != 
  438.        ((somParentMtabStructPtr)
  439.         (SOMPAsciiMediaInterfaceCClassData.parentMtab))->mtab)
  440.       return;
  441.    ((SOMObject*)((void*)this))->somDefaultCopyInit(0,((SOMObject*)((void*)fromObj)));
  442. }
  443.  
  444. #ifdef __IBMCPP__
  445. #pragma info(nocnv,nopar)
  446. #endif
  447. SOMPAsciiMediaInterface(const SOMPAsciiMediaInterface* fromObj)
  448. {
  449.    if (*(void**)this != 
  450.        ((somParentMtabStructPtr)
  451.         (SOMPAsciiMediaInterfaceCClassData.parentMtab))->mtab)
  452.       return;
  453.    ((SOMObject*)((void*)this))->somDefaultConstCopyInit(0,((SOMObject*)((void*)fromObj)));
  454. }
  455. #ifdef __IBMCPP__
  456. #pragma info(restore)
  457. #endif
  458.  
  459.  
  460. /* method: sompInitSpecific */
  461. void   sompInitSpecific(Environment *ev, 
  462.         SOMPAsciiMediaInterface_mediaInfoType* mediaInfo)
  463. {
  464. /*
  465.  *  Initialize MediaInterface with specific permissions and/or flags.
  466.  */
  467.    SOM_ResolveD(this,SOMPAsciiMediaInterface,SOMPAsciiMediaInterface,sompInitSpecific)
  468.     (this, ev,mediaInfo);
  469. }
  470.  
  471.  
  472. /* method: sompStat */
  473. void   sompStat(Environment *ev, 
  474.         SOMPStatDef_sompstat* fileStats)
  475. {
  476. /*
  477.  *  Fills the stat structure for the file associated with this object.
  478.  */
  479.    SOM_ResolveD(this,SOMPAsciiMediaInterface,SOMPAsciiMediaInterface,sompStat)
  480.     (this, ev,fileStats);
  481. }
  482.  
  483.  
  484. /* method: sompQueryBlockSize */
  485. unsigned long   sompQueryBlockSize(Environment *ev)
  486. {
  487. /*
  488.  *  This method returns an optimal block size for I/O operations. This
  489.  *  method would likely be called prior to allocating a buffer to be used
  490.  *  for reading/writing.
  491.  */
  492.    return SOM_ResolveD(this,SOMPAsciiMediaInterface,SOMPAsciiMediaInterface,sompQueryBlockSize)
  493.     (this, ev);
  494. }
  495.  
  496.  
  497. /* method: sompGetMediaName */
  498. string   sompGetMediaName(Environment *ev, 
  499.         string toBuffer)
  500. {
  501. /*
  502.  *  Puts the name of the file for the fmi object into toBuffer and returns
  503.  *  the address of the buffer.  The buffer must be allocated (and freed)
  504.  *  by the client.
  505.  */
  506.    return SOM_ResolveD(this,SOMPAsciiMediaInterface,SOMPAsciiMediaInterface,sompGetMediaName)
  507.     (this, ev,toBuffer);
  508. }
  509.  
  510.  
  511. /*
  512.  * Reintroduce inherited methods
  513.  */
  514.  
  515. /* method: sompInitReadWrite */
  516. void   sompInitReadWrite(Environment *ev, 
  517.         string mediaInfo)
  518. {
  519. /*
  520.  *  Initialize the media interface for read-write access.
  521.  */
  522.    SOM_ResolveD(this,SOMPAsciiMediaInterface,SOMPFileMediaAbstract,sompInitReadWrite)
  523.     (this, ev,mediaInfo);
  524. }
  525.  
  526.  
  527. /* method: sompInitReadOnly */
  528. void   sompInitReadOnly(Environment *ev, 
  529.         string mediaInfo)
  530. {
  531. /*
  532.  *  Initialize the media interface for read-only access.
  533.  */
  534.    SOM_ResolveD(this,SOMPAsciiMediaInterface,SOMPFileMediaAbstract,sompInitReadOnly)
  535.     (this, ev,mediaInfo);
  536. }
  537.  
  538.  
  539. /* method: sompSeekPosition */
  540. void   sompSeekPosition(Environment *ev, 
  541.         long offset)
  542. {
  543. /*
  544.  *  Position the media to an offset.  Any further reading
  545.  *  or writing will begin from that point.  Reading and writing
  546.  *  implicitly repositions the file, so usually this is not needed.
  547.  */
  548.    SOM_ResolveD(this,SOMPAsciiMediaInterface,SOMPFileMediaAbstract,sompSeekPosition)
  549.     (this, ev,offset);
  550. }
  551.  
  552.  
  553. /* method: sompSeekPositionRel */
  554. void   sompSeekPositionRel(Environment *ev, 
  555.         long offset)
  556. {
  557. /*
  558.  *  Like Position, but offset is relative to current.
  559.  */
  560.    SOM_ResolveD(this,SOMPAsciiMediaInterface,SOMPFileMediaAbstract,sompSeekPositionRel)
  561.     (this, ev,offset);
  562. }
  563.  
  564.  
  565. /* method: sompGetOffset */
  566. long   sompGetOffset(Environment *ev)
  567. {
  568. /*
  569.  *  Returns the current offset within the file.
  570.  */
  571.    return SOM_ResolveD(this,SOMPAsciiMediaInterface,SOMPFileMediaAbstract,sompGetOffset)
  572.     (this, ev);
  573. }
  574.  
  575.  
  576. /* method: sompReadBytes */
  577. void   sompReadBytes(Environment *ev, 
  578.         string byteStream, 
  579.         long length)
  580. {
  581. /*
  582.  *  Read a byte stream of the given length from the media.
  583.  */
  584.    SOM_ResolveD(this,SOMPAsciiMediaInterface,SOMPFileMediaAbstract,sompReadBytes)
  585.     (this, ev,byteStream,length);
  586. }
  587.  
  588.  
  589. /* method: sompWriteBytes */
  590. void   sompWriteBytes(Environment *ev, 
  591.         string byteStream, 
  592.         long length)
  593. {
  594. /*
  595.  *  Write a byte stream of the given length to the media.
  596.  */
  597.    SOM_ResolveD(this,SOMPAsciiMediaInterface,SOMPFileMediaAbstract,sompWriteBytes)
  598.     (this, ev,byteStream,length);
  599. }
  600.  
  601.  
  602. /* method: sompWriteOctet */
  603. void   sompWriteOctet(Environment *ev, 
  604.         octet i1)
  605. {
  606. /*
  607.  *  Writes the given 8-bit integer
  608.  */
  609.    SOM_ResolveD(this,SOMPAsciiMediaInterface,SOMPFileMediaAbstract,sompWriteOctet)
  610.     (this, ev,i1);
  611. }
  612.  
  613.  
  614. /* method: sompWriteShort */
  615. void   sompWriteShort(Environment *ev, 
  616.         short i2)
  617. {
  618. /*
  619.  *  Writes the given short integer
  620.  */
  621.    SOM_ResolveD(this,SOMPAsciiMediaInterface,SOMPFileMediaAbstract,sompWriteShort)
  622.     (this, ev,i2);
  623. }
  624.  
  625.  
  626. /* method: sompWriteUnsignedShort */
  627. void   sompWriteUnsignedShort(Environment *ev, 
  628.         unsigned short u2)
  629. {
  630. /*
  631.  *  Writes the given unsigned short integer
  632.  */
  633.    SOM_ResolveD(this,SOMPAsciiMediaInterface,SOMPFileMediaAbstract,sompWriteUnsignedShort)
  634.     (this, ev,u2);
  635. }
  636.  
  637.  
  638. /* method: sompWriteLong */
  639. void   sompWriteLong(Environment *ev, 
  640.         long i4)
  641. {
  642. /*
  643.  *  Writes the given long integer
  644.  */
  645.    SOM_ResolveD(this,SOMPAsciiMediaInterface,SOMPFileMediaAbstract,sompWriteLong)
  646.     (this, ev,i4);
  647. }
  648.  
  649.  
  650. /* method: sompWriteUnsignedLong */
  651. void   sompWriteUnsignedLong(Environment *ev, 
  652.         unsigned long u4)
  653. {
  654. /*
  655.  *  Writes the given unsigned long integer
  656.  */
  657.    SOM_ResolveD(this,SOMPAsciiMediaInterface,SOMPFileMediaAbstract,sompWriteUnsignedLong)
  658.     (this, ev,u4);
  659. }
  660.  
  661.  
  662. /* method: sompWriteDouble */
  663. void   sompWriteDouble(Environment *ev, 
  664.         double f8)
  665. {
  666. /*
  667.  *  Writes the given double-precision float
  668.  */
  669.    SOM_ResolveD(this,SOMPAsciiMediaInterface,SOMPFileMediaAbstract,sompWriteDouble)
  670.     (this, ev,f8);
  671. }
  672.  
  673.  
  674. /* method: sompWriteFloat */
  675. void   sompWriteFloat(Environment *ev, 
  676.         float f4)
  677. {
  678. /*
  679.  *  Writes the given float
  680.  */
  681.    SOM_ResolveD(this,SOMPAsciiMediaInterface,SOMPFileMediaAbstract,sompWriteFloat)
  682.     (this, ev,f4);
  683. }
  684.  
  685.  
  686. /* method: sompWriteCharacter */
  687. void   sompWriteCharacter(Environment *ev, 
  688.         char c)
  689. {
  690. /*
  691.  *  Writes the given character
  692.  */
  693.    SOM_ResolveD(this,SOMPAsciiMediaInterface,SOMPFileMediaAbstract,sompWriteCharacter)
  694.     (this, ev,c);
  695. }
  696.  
  697.  
  698. /* method: sompWriteSomobject */
  699. void   sompWriteSomobject(Environment *ev, 
  700.         SOMObject* so, 
  701.         SOMObject* parentObject)
  702. {
  703. /*
  704.  *  Writes the given object.  Uses parentObject to determine whether relative
  705.  *  Ids are used.  If object (so) has no persistent parent, client passes
  706.  *  NULL parentObject.
  707.  */
  708.    SOM_ResolveD(this,SOMPAsciiMediaInterface,SOMPFileMediaAbstract,sompWriteSomobject)
  709.     (this, ev,so,parentObject);
  710. }
  711.  
  712.  
  713. /* method: sompWriteString */
  714. void   sompWriteString(Environment *ev, 
  715.         string wstring)
  716. {
  717. /*
  718.  *  Writes the given string to the media.
  719.  * 
  720.  */
  721.    SOM_ResolveD(this,SOMPAsciiMediaInterface,SOMPFileMediaAbstract,sompWriteString)
  722.     (this, ev,wstring);
  723. }
  724.  
  725.  
  726. /* method: sompReadOctet */
  727. void   sompReadOctet(Environment *ev, 
  728.         octet* i1)
  729. {
  730. /*
  731.  *  Reads an 8-bit integer into memory at given the pointer
  732.  */
  733.    SOM_ResolveD(this,SOMPAsciiMediaInterface,SOMPFileMediaAbstract,sompReadOctet)
  734.     (this, ev,i1);
  735. }
  736.  
  737.  
  738. /* method: sompReadShort */
  739. void   sompReadShort(Environment *ev, 
  740.         short* i2)
  741. {
  742. /*
  743.  *  Reads a short integer into memory at given the pointer
  744.  */
  745.    SOM_ResolveD(this,SOMPAsciiMediaInterface,SOMPFileMediaAbstract,sompReadShort)
  746.     (this, ev,i2);
  747. }
  748.  
  749.  
  750. /* method: sompReadUnsignedShort */
  751. void   sompReadUnsignedShort(Environment *ev, 
  752.         unsigned short* u2)
  753. {
  754. /*
  755.  *  Reads an unsigned short integer into memory at given the pointer
  756.  */
  757.    SOM_ResolveD(this,SOMPAsciiMediaInterface,SOMPFileMediaAbstract,sompReadUnsignedShort)
  758.     (this, ev,u2);
  759. }
  760.  
  761.  
  762. /* method: sompReadLong */
  763. void   sompReadLong(Environment *ev, 
  764.         long* i4)
  765. {
  766. /*
  767.  *  Reads a long integer into memory at given the pointer
  768.  */
  769.    SOM_ResolveD(this,SOMPAsciiMediaInterface,SOMPFileMediaAbstract,sompReadLong)
  770.     (this, ev,i4);
  771. }
  772.  
  773.  
  774. /* method: sompReadUnsignedLong */
  775. void   sompReadUnsignedLong(Environment *ev, 
  776.         unsigned long* i4)
  777. {
  778. /*
  779.  *  Reads a long integer into memory at given the pointer
  780.  */
  781.    SOM_ResolveD(this,SOMPAsciiMediaInterface,SOMPFileMediaAbstract,sompReadUnsignedLong)
  782.     (this, ev,i4);
  783. }
  784.  
  785.  
  786. /* method: sompReadDouble */
  787. void   sompReadDouble(Environment *ev, 
  788.         double* f8)
  789. {
  790. /*
  791.  *  Reads a float into memory at given the pointer
  792.  */
  793.    SOM_ResolveD(this,SOMPAsciiMediaInterface,SOMPFileMediaAbstract,sompReadDouble)
  794.     (this, ev,f8);
  795. }
  796.  
  797.  
  798. /* method: sompReadFloat */
  799. void   sompReadFloat(Environment *ev, 
  800.         float* f4)
  801. {
  802. /*
  803.  *  Reads a float into memory at given the pointer
  804.  */
  805.    SOM_ResolveD(this,SOMPAsciiMediaInterface,SOMPFileMediaAbstract,sompReadFloat)
  806.     (this, ev,f4);
  807. }
  808.  
  809.  
  810. /* method: sompReadCharacter */
  811. void   sompReadCharacter(Environment *ev, 
  812.         char* c)
  813. {
  814. /*
  815.  *  Reads a character into memory at given the pointer
  816.  */
  817.    SOM_ResolveD(this,SOMPAsciiMediaInterface,SOMPFileMediaAbstract,sompReadCharacter)
  818.     (this, ev,c);
  819. }
  820.  
  821.  
  822. /* method: sompReadSomobject */
  823. void   sompReadSomobject(Environment *ev, 
  824.         SOMObject** so)
  825. {
  826. /*
  827.  *  Instantiates and returns a new object of the class specified in
  828.  *  the file. Standard SOM objects are simply instantiated. Persistent
  829.  *  objects are instantiated and marked for restoration.
  830.  */
  831.    SOM_ResolveD(this,SOMPAsciiMediaInterface,SOMPFileMediaAbstract,sompReadSomobject)
  832.     (this, ev,so);
  833. }
  834.  
  835.  
  836. /* method: sompReadString */
  837. void   sompReadString(Environment *ev, 
  838.         string* rstring)
  839. {
  840. /*
  841.  *  Read and allocate a string. Input is a pointer to a string. The input
  842.  *  pointer is modified to point to a newly allocated buffer which
  843.  *  will contain the string read from the media.
  844.  *  Callers are responsible for freeing the returned buffer with SOMFree.
  845.  *  If you want to read a string into a predefined buffer,
  846.  *  use sompReadStringToBuffer.
  847.  * 
  848.  *  This method can be used to read strings which were stored by
  849.  *  sompWriteString.
  850.  */
  851.    SOM_ResolveD(this,SOMPAsciiMediaInterface,SOMPFileMediaAbstract,sompReadString)
  852.     (this, ev,rstring);
  853. }
  854.  
  855.  
  856. /* method: sompReadStringToBuffer */
  857. void   sompReadStringToBuffer(Environment *ev, 
  858.         string buffer, 
  859.         long bufsize)
  860. {
  861. /*
  862.  *  Read a string into the preallocated buffer given. The size of the
  863.  *  buffer is given in <bufsize>. If the string read is larger than
  864.  *  bufsize it is truncated to fit in bufsize.
  865.  * 
  866.  *  This method can be used to read strings which were stored by
  867.  *  sompWriteString.
  868.  */
  869.    SOM_ResolveD(this,SOMPAsciiMediaInterface,SOMPFileMediaAbstract,sompReadStringToBuffer)
  870.     (this, ev,buffer,bufsize);
  871. }
  872.  
  873.  
  874. /* method: sompWriteLine */
  875. void   sompWriteLine(Environment *ev, 
  876.         string buffer)
  877. {
  878. /*
  879.  *  Writes the given string in <buffer> at the current position.
  880.  *  The terminating null character (\0) is not written.
  881.  * 
  882.  *  This method does NOT append a newline character (\n) to the
  883.  *  given string before writing. If the user of this method intends to
  884.  *  restore this <buffer> of data with sompReadLine, the user must
  885.  *  put the newline character in the <buffer> before calling this
  886.  *  method.
  887.  */
  888.    SOM_ResolveD(this,SOMPAsciiMediaInterface,SOMPFileMediaAbstract,sompWriteLine)
  889.     (this, ev,buffer);
  890. }
  891.  
  892.  
  893. /* method: sompReadLine */
  894. void   sompReadLine(Environment *ev, 
  895.         string buffer, 
  896.         long bufsize)
  897. {
  898. /*
  899.  *  Read a string up to and including the first newline character (\n)
  900.  *  into the preallocated buffer given.
  901.  *  Use this method for reading strings stored with sompWriteLine.
  902.  * 
  903.  *  The size of the buffer is given in <bufsize>. If the string read is
  904.  *  larger than bufsize it is truncated to fit in bufsize.
  905.  * 
  906.  *  The characters read are stored in <buffer>, and a null character (\0)
  907.  *  is appended. The newline character, if read, is included in the string.
  908.  */
  909.    SOM_ResolveD(this,SOMPAsciiMediaInterface,SOMPFileMediaAbstract,sompReadLine)
  910.     (this, ev,buffer,bufsize);
  911. }
  912.  
  913.  
  914. /* method: sompWriteTypeCode */
  915. void   sompWriteTypeCode(Environment *ev, 
  916.         TypeCode tc)
  917. {
  918. /*
  919.  *  Writes a restoreable version of an IDL type code. Restore with
  920.  *  sompReadTypeCode().
  921.  */
  922.    SOM_ResolveD(this,SOMPAsciiMediaInterface,SOMPFileMediaAbstract,sompWriteTypeCode)
  923.     (this, ev,tc);
  924. }
  925.  
  926.  
  927. /* method: sompReadTypeCode */
  928. void   sompReadTypeCode(Environment *ev, 
  929.         TypeCode* tc)
  930. {
  931. /*
  932.  *  Restores an IDL type code that was stored with sompWriteTypeCode().
  933.  */
  934.    SOM_ResolveD(this,SOMPAsciiMediaInterface,SOMPFileMediaAbstract,sompReadTypeCode)
  935.     (this, ev,tc);
  936. }
  937.  
  938.  
  939. /* method: sompOpen */
  940. void   sompOpen(Environment *ev)
  941. {
  942.    SOM_ResolveD(this,SOMPAsciiMediaInterface,SOMPMediaInterfaceAbstract,sompOpen)
  943.     (this, ev);
  944. }
  945.  
  946.  
  947. /* method: sompClose */
  948. void   sompClose(Environment *ev)
  949. {
  950.    SOM_ResolveD(this,SOMPAsciiMediaInterface,SOMPMediaInterfaceAbstract,sompClose)
  951.     (this, ev);
  952. }
  953.  
  954.  
  955. /* initializer method: somDefaultInit */
  956. void   somDefaultInit(som3InitCtrl* ctrl)
  957. {
  958. /*
  959.  *  A default initializer for a SOM object. Passing a null ctrl
  960.  *  indicates to the receiver that its class is the class of the
  961.  *  object being initialized, whereby the initializer will determine
  962.  *  an appropriate control structure.
  963.  */
  964.    SOM_ResolveD(this,SOMPAsciiMediaInterface,SOMObject,somDefaultInit)
  965.     (this,ctrl);
  966. }
  967.  
  968.  
  969. /* method: somDestruct */
  970. void   somDestruct(octet doFree, 
  971.         som3DestructCtrl* ctrl)
  972. {
  973. /*
  974.  *  The default destructor for a SOM object. A nonzero <doFree>
  975.  *  indicates that the object storage should be freed by the
  976.  *  object's class (via somDeallocate) after uninitialization.
  977.  *  As with somDefaultInit, a null ctrl can be passed.
  978.  */
  979.    SOM_ResolveD(this,SOMPAsciiMediaInterface,SOMObject,somDestruct)
  980.     (this,doFree,ctrl);
  981. }
  982.  
  983.  
  984. /* initializer method: somDefaultCopyInit */
  985. void   somDefaultCopyInit(som3InitCtrl* ctrl, 
  986.         SOMObject* fromObj)
  987. {
  988. /*
  989.  *  A default copy constructor. Use this to make copies of objects for
  990.  *  calling methods with "by-value" argument semantics.
  991.  */
  992.    SOM_ResolveD(this,SOMPAsciiMediaInterface,SOMObject,somDefaultCopyInit)
  993.     (this,ctrl,fromObj);
  994. }
  995.  
  996.  
  997. /* method: somDefaultAssign */
  998. SOMPAsciiMediaInterface*  somDefaultAssign(som3AssignCtrl* ctrl, 
  999.         SOMObject* fromObj)
  1000. {
  1001. /*
  1002.  *  A default assignment operator. Use this to "assign" the state of one
  1003.  *  object to another.
  1004.  */
  1005.    return SOM_ResolveD(this,SOMPAsciiMediaInterface,SOMObject,somDefaultAssign)
  1006.     (this,ctrl,fromObj);
  1007. }
  1008.  
  1009.  
  1010. /* initializer method: somDefaultConstCopyInit */
  1011. void   somDefaultConstCopyInit(som3InitCtrl* ctrl, 
  1012.         SOMObject* fromObj)
  1013. {
  1014. /*
  1015.  *  A default copy constructor that uses a const fromObj.
  1016.  */
  1017.    SOM_ResolveD(this,SOMPAsciiMediaInterface,SOMObject,somDefaultConstCopyInit)
  1018.     (this,ctrl,fromObj);
  1019. }
  1020.  
  1021.  
  1022. /* initializer method: somDefaultVCopyInit */
  1023. void   somDefaultVCopyInit(som3InitCtrl* ctrl, 
  1024.         SOMObject* fromObj)
  1025. {
  1026. /*
  1027.  *  A default copy constructor that uses a volatile fromObj.
  1028.  */
  1029.    SOM_ResolveD(this,SOMPAsciiMediaInterface,SOMObject,somDefaultVCopyInit)
  1030.     (this,ctrl,fromObj);
  1031. }
  1032.  
  1033.  
  1034. /* initializer method: somDefaultConstVCopyInit */
  1035. void   somDefaultConstVCopyInit(som3InitCtrl* ctrl, 
  1036.         SOMObject* fromObj)
  1037. {
  1038. /*
  1039.  *  A default copy constructor that uses a const volatile fromObj.
  1040.  */
  1041.    SOM_ResolveD(this,SOMPAsciiMediaInterface,SOMObject,somDefaultConstVCopyInit)
  1042.     (this,ctrl,fromObj);
  1043. }
  1044.  
  1045.  
  1046. /* method: somDefaultConstAssign */
  1047. SOMPAsciiMediaInterface*  somDefaultConstAssign(som3AssignCtrl* ctrl, 
  1048.         SOMObject* fromObj)
  1049. {
  1050. /*
  1051.  *  A default assignment operator that uses a const fromObj.
  1052.  */
  1053.    return SOM_ResolveD(this,SOMPAsciiMediaInterface,SOMObject,somDefaultConstAssign)
  1054.     (this,ctrl,fromObj);
  1055. }
  1056.  
  1057.  
  1058. /* method: somDefaultVAssign */
  1059. SOMPAsciiMediaInterface*  somDefaultVAssign(som3AssignCtrl* ctrl, 
  1060.         SOMObject* fromObj)
  1061. {
  1062. /*
  1063.  *  A default assignment operator that uses a volatile fromObj.
  1064.  */
  1065.    return SOM_ResolveD(this,SOMPAsciiMediaInterface,SOMObject,somDefaultVAssign)
  1066.     (this,ctrl,fromObj);
  1067. }
  1068.  
  1069.  
  1070. /* method: somDefaultConstVAssign */
  1071. SOMPAsciiMediaInterface*  somDefaultConstVAssign(som3AssignCtrl* ctrl, 
  1072.         SOMObject* fromObj)
  1073. {
  1074. /*
  1075.  *  A default assignment operator that uses a const volatile fromObj.
  1076.  */
  1077.    return SOM_ResolveD(this,SOMPAsciiMediaInterface,SOMObject,somDefaultConstVAssign)
  1078.     (this,ctrl,fromObj);
  1079. }
  1080.  
  1081.  
  1082. /* method: somInit */
  1083. void   somInit()
  1084. {
  1085. /*
  1086.  *  Obsolete but still supported. Override somDefaultInit instead of somInit.
  1087.  */
  1088.    SOM_ResolveD(this,SOMPAsciiMediaInterface,SOMObject,somInit)
  1089.     (this);
  1090. }
  1091.  
  1092.  
  1093. /* method: somFree */
  1094. void   somFree()
  1095. {
  1096. /*
  1097.  *  Use as directed by framework implementations.
  1098.  */
  1099.    SOM_ResolveD(this,SOMPAsciiMediaInterface,SOMObject,somFree)
  1100.     (this);
  1101. }
  1102.  
  1103.  
  1104. /* method: somUninit */
  1105. void   somUninit()
  1106. {
  1107. /*
  1108.  *  Obsolete but still supported. Override somDestruct instead of somUninit.
  1109.  */
  1110.    SOM_ResolveD(this,SOMPAsciiMediaInterface,SOMObject,somUninit)
  1111.     (this);
  1112. }
  1113.  
  1114.  
  1115. /* method: somGetClass */
  1116. SOMClass*   somGetClass()
  1117. {
  1118. /*
  1119.  *  Return the receiver's class.
  1120.  */
  1121.    return SOM_ResolveD(this,SOMPAsciiMediaInterface,SOMObject,somGetClass)
  1122.     (this);
  1123. }
  1124.  
  1125.  
  1126. /* method: somGetClassName */
  1127. string   somGetClassName()
  1128. {
  1129. /*
  1130.  *  Return the name of the receiver's class.
  1131.  */
  1132.    return SOM_ResolveD(this,SOMPAsciiMediaInterface,SOMObject,somGetClassName)
  1133.     (this);
  1134. }
  1135.  
  1136.  
  1137. /* method: somGetSize */
  1138. long   somGetSize()
  1139. {
  1140. /*
  1141.  *  Return the size of the receiver.
  1142.  */
  1143.    return SOM_ResolveD(this,SOMPAsciiMediaInterface,SOMObject,somGetSize)
  1144.     (this);
  1145. }
  1146.  
  1147.  
  1148. /* method: somIsA */
  1149. boolean   somIsA(SOMClass* aClassObj)
  1150. {
  1151. /*
  1152.  *  Returns 1 (true) if the receiver responds to methods
  1153.  *  introduced by <aClassObj>, and 0 (false) otherwise.
  1154.  */
  1155.    return SOM_ResolveD(this,SOMPAsciiMediaInterface,SOMObject,somIsA)
  1156.     (this,aClassObj);
  1157. }
  1158.  
  1159.  
  1160. /* method: somIsInstanceOf */
  1161. boolean   somIsInstanceOf(SOMClass* aClassObj)
  1162. {
  1163. /*
  1164.  *  Returns 1 (true) if the receiver is an instance of
  1165.  *  <aClassObj> and 0 (false) otherwise.
  1166.  */
  1167.    return SOM_ResolveD(this,SOMPAsciiMediaInterface,SOMObject,somIsInstanceOf)
  1168.     (this,aClassObj);
  1169. }
  1170.  
  1171.  
  1172. /* method: somRespondsTo */
  1173. boolean   somRespondsTo(somId mId)
  1174. {
  1175. /*
  1176.  *  Returns 1 (true) if the indicated method can be invoked
  1177.  *  on the receiver and 0 (false) otherwise.
  1178.  */
  1179.    return SOM_ResolveD(this,SOMPAsciiMediaInterface,SOMObject,somRespondsTo)
  1180.     (this,mId);
  1181. }
  1182.  
  1183.  
  1184. /* va_list method: somDispatch */
  1185.  
  1186. /*
  1187.  *  This method provides a generic, class-specific dispatch mechanism.
  1188.  *  It accepts as input <retValue> a pointer to the memory area to be
  1189.  *  loaded with the result of dispatching the method indicated by
  1190.  *  <methodId> using the arguments in <ap>. <ap> contains the object
  1191.  *  on which the method is to be invoked as the first argument.
  1192.  */
  1193. /* the va_list invocation form */
  1194. boolean   SOMPAsciiMediaInterface_somDispatch(somToken* retValue, 
  1195.         somId methodId, 
  1196.         va_list ap)
  1197. {return SOM_ResolveD(this,SOMPAsciiMediaInterface,SOMObject,somDispatch)
  1198.     (this,retValue,methodId,ap);
  1199. }
  1200.  
  1201. /* the varargs invocation form */
  1202. boolean   somDispatch(somToken* retValue, 
  1203.         somId methodId, 
  1204.         ...)
  1205. {
  1206. /*
  1207.  *  This method provides a generic, class-specific dispatch mechanism.
  1208.  *  It accepts as input <retValue> a pointer to the memory area to be
  1209.  *  loaded with the result of dispatching the method indicated by
  1210.  *  <methodId> using the arguments in <ap>. <ap> contains the object
  1211.  *  on which the method is to be invoked as the first argument.
  1212.  */
  1213.    va_list ap;
  1214.    va_start(ap, methodId);
  1215.    boolean __somResult = 
  1216.       SOM_ResolveD(this,SOMPAsciiMediaInterface,SOMObject,somDispatch)
  1217.     (this,retValue,methodId,ap);
  1218.    va_end(ap);
  1219.    return __somResult;
  1220. }
  1221.  
  1222.  
  1223. /* va_list method: somClassDispatch */
  1224.  
  1225. /*
  1226.  *  Like somDispatch, but method resolution for static methods is done
  1227.  *  according to the clsObj instance method table.
  1228.  */
  1229. /* the va_list invocation form */
  1230. boolean   SOMPAsciiMediaInterface_somClassDispatch(SOMClass* clsObj, 
  1231.         somToken* retValue, 
  1232.         somId methodId, 
  1233.         va_list ap)
  1234. {return SOM_ResolveD(this,SOMPAsciiMediaInterface,SOMObject,somClassDispatch)
  1235.     (this,clsObj,retValue,methodId,ap);
  1236. }
  1237.  
  1238. /* the varargs invocation form */
  1239. boolean   somClassDispatch(SOMClass* clsObj, 
  1240.         somToken* retValue, 
  1241.         somId methodId, 
  1242.         ...)
  1243. {
  1244. /*
  1245.  *  Like somDispatch, but method resolution for static methods is done
  1246.  *  according to the clsObj instance method table.
  1247.  */
  1248.    va_list ap;
  1249.    va_start(ap, methodId);
  1250.    boolean __somResult = 
  1251.       SOM_ResolveD(this,SOMPAsciiMediaInterface,SOMObject,somClassDispatch)
  1252.     (this,clsObj,retValue,methodId,ap);
  1253.    va_end(ap);
  1254.    return __somResult;
  1255. }
  1256.  
  1257.  
  1258. /* method: somCastObj */
  1259. boolean   somCastObj(SOMClass* cls)
  1260. {
  1261. /*
  1262.  *  cast the receiving object to cls (which must be an ancestor of the
  1263.  *  objects true class. Returns true on success.
  1264.  */
  1265.    return SOM_ResolveD(this,SOMPAsciiMediaInterface,SOMObject,somCastObj)
  1266.     (this,cls);
  1267. }
  1268.  
  1269.  
  1270. /* method: somResetObj */
  1271. boolean   somResetObj()
  1272. {
  1273. /*
  1274.  *  reset an object to its true class. Returns true always.
  1275.  */
  1276.    return SOM_ResolveD(this,SOMPAsciiMediaInterface,SOMObject,somResetObj)
  1277.     (this);
  1278. }
  1279.  
  1280.  
  1281. /* va_list method: somDispatchV */
  1282.  
  1283. /*
  1284.  *  Obsolete. Use somDispatch instead.
  1285.  */
  1286. /* the va_list invocation form */
  1287. void   SOMPAsciiMediaInterface_somDispatchV(somId methodId, 
  1288.         somId descriptor, 
  1289.         va_list ap)
  1290. {   SOM_ResolveD(this,SOMPAsciiMediaInterface,SOMObject,somDispatchV)
  1291.     (this,methodId,descriptor,ap);
  1292. }
  1293.  
  1294. /* the varargs invocation form */
  1295. void   somDispatchV(somId methodId, 
  1296.         somId descriptor, 
  1297.         ...)
  1298. {
  1299. /*
  1300.  *  Obsolete. Use somDispatch instead.
  1301.  */
  1302.    va_list ap;
  1303.    va_start(ap, descriptor);
  1304.    SOM_ResolveD(this,SOMPAsciiMediaInterface,SOMObject,somDispatchV)
  1305.     (this,methodId,descriptor,ap);
  1306.    va_end(ap);
  1307. }
  1308.  
  1309.  
  1310. /* va_list method: somDispatchL */
  1311.  
  1312. /*
  1313.  *  Obsolete. Use somDispatch instead.
  1314.  */
  1315. /* the va_list invocation form */
  1316. long   SOMPAsciiMediaInterface_somDispatchL(somId methodId, 
  1317.         somId descriptor, 
  1318.         va_list ap)
  1319. {return SOM_ResolveD(this,SOMPAsciiMediaInterface,SOMObject,somDispatchL)
  1320.     (this,methodId,descriptor,ap);
  1321. }
  1322.  
  1323. /* the varargs invocation form */
  1324. long   somDispatchL(somId methodId, 
  1325.         somId descriptor, 
  1326.         ...)
  1327. {
  1328. /*
  1329.  *  Obsolete. Use somDispatch instead.
  1330.  */
  1331.    va_list ap;
  1332.    va_start(ap, descriptor);
  1333.    long __somResult = 
  1334.       SOM_ResolveD(this,SOMPAsciiMediaInterface,SOMObject,somDispatchL)
  1335.     (this,methodId,descriptor,ap);
  1336.    va_end(ap);
  1337.    return __somResult;
  1338. }
  1339.  
  1340.  
  1341. /* va_list method: somDispatchA */
  1342.  
  1343. /*
  1344.  *  Obsolete. Use somDispatch instead.
  1345.  */
  1346. /* the va_list invocation form */
  1347. void*   SOMPAsciiMediaInterface_somDispatchA(somId methodId, 
  1348.         somId descriptor, 
  1349.         va_list ap)
  1350. {return SOM_ResolveD(this,SOMPAsciiMediaInterface,SOMObject,somDispatchA)
  1351.     (this,methodId,descriptor,ap);
  1352. }
  1353.  
  1354. /* the varargs invocation form */
  1355. void*   somDispatchA(somId methodId, 
  1356.         somId descriptor, 
  1357.         ...)
  1358. {
  1359. /*
  1360.  *  Obsolete. Use somDispatch instead.
  1361.  */
  1362.    va_list ap;
  1363.    va_start(ap, descriptor);
  1364.    void* __somResult = 
  1365.       SOM_ResolveD(this,SOMPAsciiMediaInterface,SOMObject,somDispatchA)
  1366.     (this,methodId,descriptor,ap);
  1367.    va_end(ap);
  1368.    return __somResult;
  1369. }
  1370.  
  1371.  
  1372. /* va_list method: somDispatchD */
  1373.  
  1374. /*
  1375.  *  Obsolete. Use somDispatch instead.
  1376.  */
  1377. /* the va_list invocation form */
  1378. double   SOMPAsciiMediaInterface_somDispatchD(somId methodId, 
  1379.         somId descriptor, 
  1380.         va_list ap)
  1381. {return SOM_ResolveD(this,SOMPAsciiMediaInterface,SOMObject,somDispatchD)
  1382.     (this,methodId,descriptor,ap);
  1383. }
  1384.  
  1385. /* the varargs invocation form */
  1386. double   somDispatchD(somId methodId, 
  1387.         somId descriptor, 
  1388.         ...)
  1389. {
  1390. /*
  1391.  *  Obsolete. Use somDispatch instead.
  1392.  */
  1393.    va_list ap;
  1394.    va_start(ap, descriptor);
  1395.    double __somResult = 
  1396.       SOM_ResolveD(this,SOMPAsciiMediaInterface,SOMObject,somDispatchD)
  1397.     (this,methodId,descriptor,ap);
  1398.    va_end(ap);
  1399.    return __somResult;
  1400. }
  1401.  
  1402.  
  1403. /* method: somPrintSelf */
  1404. SOMObject*   somPrintSelf()
  1405. {
  1406. /*
  1407.  *  Uses <SOMOutCharRoutine> to write a brief string with identifying
  1408.  *  information about this object.  The default implementation just gives
  1409.  *  the object's class name and its address in memory.
  1410.  *  <self> is returned.
  1411.  */
  1412.    return SOM_ResolveD(this,SOMPAsciiMediaInterface,SOMObject,somPrintSelf)
  1413.     (this);
  1414. }
  1415.  
  1416.  
  1417. /* method: somDumpSelf */
  1418. void   somDumpSelf(long level)
  1419. {
  1420. /*
  1421.  *  Uses <SOMOutCharRoutine> to write a detailed description of this object
  1422.  *  and its current state.
  1423.  * 
  1424.  *  <level> indicates the nesting level for describing compound objects
  1425.  *  it must be greater than or equal to zero.  All lines in the
  1426.  *  description will be preceeded by <2*level> spaces.
  1427.  * 
  1428.  *  This routine only actually writes the data that concerns the object
  1429.  *  as a whole, such as class, and uses <somDumpSelfInt> to describe
  1430.  *  the object's current state.  This approach allows readable
  1431.  *  descriptions of compound objects to be constructed.
  1432.  * 
  1433.  *  Generally it is not necessary to override this method, if it is
  1434.  *  overriden it generally must be completely replaced.
  1435.  */
  1436.    SOM_ResolveD(this,SOMPAsciiMediaInterface,SOMObject,somDumpSelf)
  1437.     (this,level);
  1438. }
  1439.  
  1440.  
  1441. /* method: somDumpSelfInt */
  1442. void   somDumpSelfInt(long level)
  1443. {
  1444. /*
  1445.  *  Uses <SOMOutCharRoutine> to write in the current state of this object.
  1446.  *  Generally this method will need to be overridden.  When overriding
  1447.  *  it, begin by calling the parent class form of this method and then
  1448.  *  write in a description of your class's instance data. This will
  1449.  *  result in a description of all the object's instance data going
  1450.  *  from its root ancestor class to its specific class.
  1451.  */
  1452.    SOM_ResolveD(this,SOMPAsciiMediaInterface,SOMObject,somDumpSelfInt)
  1453.     (this,level);
  1454. }
  1455.  
  1456.  
  1457.  
  1458. };   /* SOMPAsciiMediaInterface */
  1459.  
  1460.  
  1461.  
  1462. #endif       /* SOM_SOMPAsciiMediaInterface_xh */
  1463.