home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / srctrn.zip / SRCTRANS.XH < prev    next >
Text File  |  1994-01-11  |  5KB  |  194 lines

  1.  
  2. /*
  3.  * This file was generated by the SOM Compiler.
  4.  * FileName: srctrans.xh.
  5.  * Generated using:
  6.  *     SOM Precompiler spc: 1.22
  7.  *     SOM Emitter emitxh: 1.11
  8.  */
  9.  
  10. /*
  11.  * 
  12.  *    Source render drag/drop sample
  13.  * 
  14.  *    Author : Andrew Clinch
  15.  * 
  16.  *    Disclaimer :
  17.  *    In no event shall Andrew Clinch be liable for any damages whatsoever
  18.  *    (including, without limitation, damaged or loss of business profits, business
  19.  *    interruption, loss of business information, or other pecuniary loss) arising
  20.  *    out of the use or inability to use this sample code, even if Andrew Clinch
  21.  *    has been advised of the possibility of such damages.
  22.  * 
  23.  */
  24.  
  25. #ifndef srctrans_xh
  26. #define srctrans_xh
  27. class SrcTransient;
  28.  
  29. #define SrcTransient_MajorVersion 1
  30. #define SrcTransient_MinorVersion 1
  31.  
  32. /* C++ som defs */
  33. #include <somcls.xh>
  34.  
  35. /* C++ parent def */
  36. #ifndef wptrans_xh
  37. #include "wptrans.xh"
  38. #endif
  39.  
  40. #ifndef SrcTransient_API
  41. #define SrcTransient_API
  42. /*
  43.  * The Class API
  44.  */
  45.  
  46. /* A procedure to create the SrcTransient Class */
  47. SOMEXTERN SOMClass * SOMLINK SrcTransientNewClass(
  48.         integer4 majorVersion,
  49.         integer4 minorVersion);
  50.  
  51. /* A macro to return the SrcTransient class object */
  52. class M_SrcTransient;
  53. #define _SrcTransient ((M_SrcTransient*)SrcTransientClassData.classObject)
  54.  
  55. /* The static interface to SrcTransient and its instances */
  56. SOMEXTERN struct SrcTransientClassDataStructure {
  57.     SOMClass *classObject;
  58. } SrcTransientClassData;
  59.  
  60. /*
  61.  * -- Typedefs for Procedures that support SrcTransient Methods
  62.  */
  63. extern "C" {
  64. }
  65.  
  66.  
  67. #endif /* SrcTransient_API */
  68.  
  69.  
  70. /*
  71.  * -- The C++ Wrapper Class for SrcTransient
  72.  */
  73. class SrcTransient : public WPTransient
  74. {
  75. public:
  76.  
  77. void *operator new(size_t size)
  78. {
  79.    (void) size;
  80.    if (!SrcTransientClassData.classObject) 
  81.       SrcTransientNewClass(SrcTransient_MajorVersion,SrcTransient_MinorVersion);
  82.    return (void *)
  83.       ((somTD_SOMClass_somNew)
  84.       somResolve(SOM_TestCls((SOMAny *)(SrcTransientClassData.classObject),
  85.                              SOMClassClassData.classObject),
  86.                  SOMClassClassData.somNew))
  87.          ((SOMClass*)(SrcTransientClassData.classObject));
  88. }
  89.  
  90. void operator delete(void * obj)
  91. {
  92.    ((SOMObject *)obj)->somFree();
  93. }
  94.  
  95.  
  96. };   /* SrcTransient */
  97.  
  98.  
  99.  
  100. #endif       /* srctrans_xh */
  101.  
  102. /*
  103.  * This file was generated by the SOM Compiler.
  104.  * FileName: srctrans.xh.
  105.  * Generated using:
  106.  *     SOM Precompiler spc: 1.22
  107.  *     SOM Emitter emitxh: 1.11
  108.  */
  109. #ifndef srctrans_mxh
  110. #define srctrans_mxh
  111. class M_SrcTransient;
  112.  
  113. #define M_SrcTransient_MajorVersion 1
  114. #define M_SrcTransient_MinorVersion 1
  115.  
  116. /* C++ som defs */
  117. #include <somcls.xh>
  118.  
  119. /* C++ parent def */
  120. #ifndef wptrans_xh
  121. #include "wptrans.xh"
  122. #endif
  123.  
  124. #ifndef M_SrcTransient_API
  125. #define M_SrcTransient_API
  126. /*
  127.  * The Class API
  128.  */
  129.  
  130. /* A procedure to create the M_SrcTransient Class */
  131. SOMEXTERN SOMClass * SOMLINK M_SrcTransientNewClass(
  132.         integer4 majorVersion,
  133.         integer4 minorVersion);
  134.  
  135. /* A macro to return the M_SrcTransient class object */
  136. #define _M_SrcTransient ((SOMClass*)M_SrcTransientClassData.classObject)
  137.  
  138. /* The static interface to M_SrcTransient and its instances */
  139. SOMEXTERN struct M_SrcTransientClassDataStructure {
  140.     SOMClass *classObject;
  141.     somMToken clsQueryModuleHandle;
  142. } M_SrcTransientClassData;
  143.  
  144. /*
  145.  * -- Typedefs for Procedures that support M_SrcTransient Methods
  146.  */
  147. extern "C" {
  148. typedef HMODULE    (SOMLINK *somTD_M_SrcTransient_clsQueryModuleHandle)(M_SrcTransient *somSelf);
  149. }
  150.  
  151.  
  152. #endif /* M_SrcTransient_API */
  153.  
  154.  
  155. /*
  156.  * -- The C++ Wrapper Class for M_SrcTransient
  157.  */
  158. class M_SrcTransient : public M_WPTransient
  159. {
  160. public:
  161.  
  162. void *operator new(size_t size)
  163. {
  164.    (void) size;
  165.    if (!M_SrcTransientClassData.classObject) 
  166.       M_SrcTransientNewClass(M_SrcTransient_MajorVersion,M_SrcTransient_MinorVersion);
  167.    return (void *)
  168.       ((somTD_SOMClass_somNew)
  169.       somResolve(SOM_TestCls((SOMAny *)(M_SrcTransientClassData.classObject),
  170.                              SOMClassClassData.classObject),
  171.                  SOMClassClassData.somNew))
  172.          ((SOMClass*)(M_SrcTransientClassData.classObject));
  173. }
  174.  
  175. void operator delete(void * obj)
  176. {
  177.    ((SOMObject *)obj)->somFree();
  178. }
  179.  
  180. /* public method: clsQueryModuleHandle */
  181. HMODULE    clsQueryModuleHandle()
  182. {
  183.    return (HMODULE) SOM_Resolve((SOMAny *)this,M_SrcTransient,clsQueryModuleHandle)
  184.     (this);
  185. }
  186.  
  187.  
  188.  
  189. };   /* M_SrcTransient */
  190.  
  191.  
  192.  
  193. #endif       /* srctrans_mxh */
  194.