home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / qsetup.zip / DM2TEST.IH < prev    next >
Text File  |  1994-04-03  |  17KB  |  577 lines

  1.  
  2. /*
  3.  * This file was generated by the SOM Compiler.
  4.  * FileName: DM2Test.ih.
  5.  * Generated using:
  6.  *     SOM Precompiler spc: 1.22
  7.  *     SOM Emitter emitih: 1.59
  8.  */
  9.  
  10. /*
  11.  * 
  12.  * 
  13.  * 
  14.  * 
  15.  *      DM2Test.CSC - DeskMan/2 setup test object.
  16.  * 
  17.  *   ┌─────────────────────────────────────────────────────────────────────┐
  18.  *   │  DM2Test object - setup string manipulation methods.                │
  19.  *   │                   Part of DeskMan/2.                                │
  20.  *   │                                                                     │
  21.  *   │  (C) Copyright 1993-1994 Development Technologies, Inc.             │
  22.  *   │      Portions Copyright 1993 Gregory Czaja                          │
  23.  *   │      All rights reserved                                            │
  24.  *   │      DeskMan, DeskMan/2, DM2Setup, VUEMan, VUEMan/2 and DM2Image    │
  25.  *   │      are trademarks of Development Technologies, Inc. (DevTech),    │
  26.  *   │      a Pennsylvania Corporation                                     │
  27.  *   │                                                                     │
  28.  *   │  version 1: initial release                          April 1994     │
  29.  *   └─────────────────────────────────────────────────────────────────────┘
  30.  */
  31.  
  32.  
  33. #ifndef DM2Test_ih
  34. #define DM2Test_ih
  35.  
  36.  
  37. /*
  38.  * Passthru lines: File: "C.ih", "before"
  39.  */
  40. /* implementation defs for DM2Test */
  41.  
  42.    #define INCL_WIN
  43.    #define INCL_DOS
  44.    #include <os2.h>
  45.  
  46.    #define INCL_WPCLASS
  47.    #include <pmwp.h>
  48.  
  49.    #include <DM2Setup.h>        /* DM2Setup methods     */
  50.                                 /* internal definitions */
  51.  
  52.    #define DM2TEST_CLASSNAME      "DM2Test"
  53.  
  54.  
  55. #include "DM2Test.h"
  56.  
  57. /*
  58.  * Set the scope of methods functions
  59.  */
  60. #ifndef SOM_Scope
  61. #ifdef __cplusplus
  62. #define SOM_Scope extern "C"
  63. #else
  64. #define SOM_Scope extern
  65. #endif
  66. #endif
  67.  
  68. #ifndef SOM_CurrentClass
  69. #define SOM_CurrentClass DM2TestCClassData.parentMtab
  70. #endif
  71.  
  72. #define DM2Test_MaxNoMethods 1
  73.  
  74. /*
  75.  * Instance data
  76.  */
  77. typedef struct {
  78.     CHAR myData;
  79. } DM2TestData;
  80.  
  81. /*
  82.  * Instance variable access macros
  83.  */
  84. #define _myData (somThis->myData)
  85.  
  86. /*
  87.  * Getdata macro
  88.  */
  89. #define DM2TestGetData(somSelf) \
  90.     ((DM2TestData *) \
  91.         SOM_DataResolve(somSelf, DM2TestCClassData.instanceDataToken))
  92.  
  93. /*
  94.  * Trace/Debug macro
  95.  */
  96. #ifndef DM2TestMethodDebug
  97. #define DM2TestMethodDebug(c,m) SOMMethodDebug(c,m)
  98. #endif
  99.  
  100. /*
  101.  * Begin stuff that only goes in the primary file
  102.  */
  103. #ifdef DM2Test_Class_Source
  104.  
  105. /*
  106.  * Current class macros for Instance and Meta classes.
  107.  */
  108. #undef SOMMeta
  109. #define SOMMeta M_DM2TestCClassData.parentMtab
  110. #undef SOMInstance
  111. #define SOMInstance DM2TestCClassData.parentMtab
  112.  
  113. #ifndef M_DM2Test_Class_Source
  114. #define M_DM2Test_Class_Source
  115. #endif    /* M_DM2Test_Class_Source */
  116.  
  117. /*
  118.  * Generate the Apply Stubs.
  119.  */
  120. #pragma linkage(somAP_DeskMan2QuerySetup, system)
  121. static APIRET   SOMLINK somAP_DeskMan2QuerySetup(DM2Test *somSelf,
  122.         somId __id,
  123.         somId __desc,
  124.         va_list __ap)
  125. {
  126.     WPObject *setupObject = va_arg(__ap, WPObject*);
  127.     __ap; __id; __desc;           /* Referenced to prevent warning msg */
  128.  
  129.     return (DM2Test_DeskMan2QuerySetup(somSelf,setupObject));
  130. }
  131.  
  132.  
  133. /*
  134.  * Overridden method: wpSetup
  135.  */
  136. #pragma linkage(DM2TestX_wpSetup, system)
  137. SOM_Scope BOOL   SOMLINK DM2TestX_wpSetup(DM2Test *somSelf,
  138.         PSZ pszSetupString);
  139. #ifndef parent_wpSetup
  140. static char *somMN_wpSetup = "wpSetup";
  141. static somId somId_wpSetup = &somMN_wpSetup;
  142. #define parent_wpSetup(somSelf,pszSetupString) \
  143.     ((SOM_ParentResolveE(WPObject, SOM_CurrentClass, wpSetup)) \
  144.      (somSelf,pszSetupString))
  145. #endif
  146. #define DM2TestParent_wpSetup parent_wpSetup
  147.  
  148. /*
  149.  * Overridden method: wpModifyPopupMenu
  150.  */
  151. #pragma linkage(DM2TestX_wpModifyPopupMenu, system)
  152. SOM_Scope BOOL   SOMLINK DM2TestX_wpModifyPopupMenu(DM2Test *somSelf,
  153.         HWND hwndMenu,
  154.         HWND hwndCnr,
  155.         ULONG iPosition);
  156. #ifndef parent_wpModifyPopupMenu
  157. static char *somMN_wpModifyPopupMenu = "wpModifyPopupMenu";
  158. static somId somId_wpModifyPopupMenu = &somMN_wpModifyPopupMenu;
  159. #define parent_wpModifyPopupMenu(somSelf,hwndMenu,hwndCnr,iPosition) \
  160.     ((SOM_ParentResolveE(WPObject, SOM_CurrentClass, wpModifyPopupMenu)) \
  161.      (somSelf,hwndMenu,hwndCnr,iPosition))
  162. #endif
  163. #define DM2TestParent_wpModifyPopupMenu parent_wpModifyPopupMenu
  164.  
  165. /*
  166.  * Overridden method: wpMenuItemSelected
  167.  */
  168. #pragma linkage(DM2TestX_wpMenuItemSelected, system)
  169. SOM_Scope BOOL   SOMLINK DM2TestX_wpMenuItemSelected(DM2Test *somSelf,
  170.         HWND hwndFrame,
  171.         ULONG ulMenuId);
  172. #ifndef parent_wpMenuItemSelected
  173. static char *somMN_wpMenuItemSelected = "wpMenuItemSelected";
  174. static somId somId_wpMenuItemSelected = &somMN_wpMenuItemSelected;
  175. #define parent_wpMenuItemSelected(somSelf,hwndFrame,ulMenuId) \
  176.     ((SOM_ParentResolveE(WPObject, SOM_CurrentClass, wpMenuItemSelected)) \
  177.      (somSelf,hwndFrame,ulMenuId))
  178. #endif
  179. #define DM2TestParent_wpMenuItemSelected parent_wpMenuItemSelected
  180.  
  181. /*
  182.  * Overridden method: wpAddObjectWindowPage
  183.  */
  184. #pragma linkage(DM2TestX_wpAddObjectWindowPage, system)
  185. SOM_Scope ULONG   SOMLINK DM2TestX_wpAddObjectWindowPage(DM2Test *somSelf,
  186.         HWND hwndNotebook);
  187. #ifndef parent_wpAddObjectWindowPage
  188. static char *somMN_wpAddObjectWindowPage = "wpAddObjectWindowPage";
  189. static somId somId_wpAddObjectWindowPage = &somMN_wpAddObjectWindowPage;
  190. #define parent_wpAddObjectWindowPage(somSelf,hwndNotebook) \
  191.     ((SOM_ParentResolveE(WPObject, SOM_CurrentClass, wpAddObjectWindowPage)) \
  192.      (somSelf,hwndNotebook))
  193. #endif
  194. #define DM2TestParent_wpAddObjectWindowPage parent_wpAddObjectWindowPage
  195.  
  196. /*
  197.  * Temporary class data structure used only in class creation
  198.  */
  199. static somClassDataStructure DM2TesttempClassData;
  200.  
  201. /*
  202.  * Initialize the class data structure
  203.  */
  204. struct DM2TestClassDataStructure DM2TestClassData = {(SOMAny *) NULL};
  205.  
  206. /*
  207.  * Define the C class data structure
  208.  */
  209. struct DM2TestCClassDataStructure DM2TestCClassData = {(somMethodTab *) NULL};
  210.  
  211. /*
  212.  * New Method: DeskMan2QuerySetup
  213.  */
  214. #pragma linkage(DM2TestX_DeskMan2QuerySetup, system)
  215. SOM_Scope APIRET   SOMLINK DM2TestX_DeskMan2QuerySetup(DM2Test *somSelf,
  216.         WPObject *setupObject);
  217. static char *somMN_DeskMan2QuerySetup = "DeskMan2QuerySetup";
  218. static somId somId_DeskMan2QuerySetup = &somMN_DeskMan2QuerySetup;
  219. static char *somDS_DeskMan2QuerySetup = somMD_DM2Test_DeskMan2QuerySetup;
  220. static somId somDI_DeskMan2QuerySetup = &somDS_DeskMan2QuerySetup;
  221. #pragma linkage(somRD_DeskMan2QuerySetup, system)
  222. static APIRET   SOMLINK somRD_DeskMan2QuerySetup(DM2Test *somSelf,
  223.         WPObject *setupObject)
  224. {
  225.     return ((APIRET) va_somDispatchL(somSelf, somId_DeskMan2QuerySetup,
  226.         _somGetMethodDescriptor(SOM_GetClass(somSelf),somId_DeskMan2QuerySetup),setupObject));
  227. }
  228.  
  229. /*
  230.  * Routines to create the class object
  231.  */
  232.  
  233. /*
  234.  * Declare the Static Methods table.
  235.  */
  236. static somStaticMethod_t DM2TestSM[] = {
  237.     {    &DM2TestClassData.DeskMan2QuerySetup,
  238.          &somId_DeskMan2QuerySetup,
  239.          &somDI_DeskMan2QuerySetup,
  240.          (somMethodProc *) DM2TestX_DeskMan2QuerySetup,
  241.          (somMethodProc *) somRD_DeskMan2QuerySetup,
  242.          (somMethodProc *) somAP_DeskMan2QuerySetup    },
  243. };
  244.  
  245.  
  246. /*
  247.  * Declare the Override Methods table.
  248.  */
  249. static somOverrideMethod_t DM2TestOM[] = {
  250.     {    &somId_wpSetup,
  251.          (somMethodProc *) DM2TestX_wpSetup    },
  252.     {    &somId_wpModifyPopupMenu,
  253.          (somMethodProc *) DM2TestX_wpModifyPopupMenu    },
  254.     {    &somId_wpMenuItemSelected,
  255.          (somMethodProc *) DM2TestX_wpMenuItemSelected    },
  256.     {    &somId_wpAddObjectWindowPage,
  257.          (somMethodProc *) DM2TestX_wpAddObjectWindowPage    },
  258. };
  259.  
  260. static void DM2TestsomInitializeClass ()
  261. {
  262.     int i;
  263.     somStaticMethod_t *smp;
  264.     somOverrideMethod_t *omp;
  265.  
  266. /*
  267.  * Add the Static Methods.
  268.  */
  269.     for (smp = DM2TestSM, i = 0; i < 1; smp++, i++)
  270.         *(smp->classData) =
  271.             _somAddStaticMethod (DM2TesttempClassData.classObject,
  272.                 *(smp->methodId), *(smp->methodDescriptor),
  273.                 smp->method, smp->redispatchStub,
  274.                 smp->applyStub);
  275.  
  276.  
  277. /*
  278.  * Override methods.
  279.  */
  280.     for (omp = DM2TestOM, i = 0; i < 4; omp++, i++)
  281.         _somOverrideSMethod (DM2TesttempClassData.classObject,
  282.             *(omp->methodId), omp->method);
  283.  
  284. }
  285.  
  286. #pragma linkage(DM2TestsomCreateClass, system)
  287. static void SOMLINK DM2TestsomCreateClass(SOMClass *pClsObj,
  288.                            SOMClass *mClsObj)
  289. {
  290.     DM2TesttempClassData.classObject = _somNew (mClsObj);
  291.     _somInitClass (DM2TesttempClassData.classObject,
  292.         "DM2Test",
  293.         pClsObj,
  294.         sizeof(DM2TestData),
  295.         DM2Test_MaxNoMethods,
  296.         DM2Test_MajorVersion,
  297.         DM2Test_MinorVersion);
  298.     DM2TestCClassData.instanceDataToken = 
  299.     _somGetInstanceToken(DM2TesttempClassData.classObject);
  300.     DM2TestsomInitializeClass();
  301.     DM2TestCClassData.parentMtab =
  302.     _somGetPClsMtab(DM2TesttempClassData.classObject);
  303.     _somSetClassData(DM2TesttempClassData.classObject, (somClassDataStructure *)&DM2TestClassData);
  304.     _somClassReady(DM2TesttempClassData.classObject);
  305.     /* make newly created class object visible */
  306.     DM2TestClassData.classObject = DM2TesttempClassData.classObject;
  307. }
  308.  
  309. DM2Test * SOMLINK DM2TestNewClass (integer4 scemajorVersion,
  310.         integer4 sceminorVersion)
  311. {
  312.     SOMClass *pClsObj;
  313.     SOMClass *mClsObj;
  314.  
  315.     /* Check the version numbers */
  316.     if (((scemajorVersion != 0) && 
  317.          (scemajorVersion != DM2Test_MajorVersion)) ||
  318.         ((sceminorVersion != 0) && 
  319.          (sceminorVersion > DM2Test_MinorVersion))) {
  320.     somPrintf("DM2TestNewClass: Error, bad version numbers.\n");
  321.     SOM_Error(SOMERROR_BadVersion);
  322.     }
  323.     /* Don't do anything if class object is already created. */
  324.     if (DM2TestClassData.classObject != (SOMAny *) NULL)
  325.     return(DM2TestClassData.classObject);
  326.  
  327.     /* Make sure the environment is initialized. */
  328.     if (SOMClassMgrObject == (SOMAny *) NULL) somEnvironmentNew();
  329.     if (SOMClassMgrObject == (SOMAny *) NULL)
  330.     SOM_Error(SOMERROR_CouldNotStartup);
  331.  
  332.     /* Get the parent class object. */
  333.     WPAbstractNewClass(1,2);    /* static reference */
  334.     pClsObj = _somFindClass(SOMClassMgrObject,
  335.         SOM_IdFromString("WPAbstract"), 1, 2);
  336.     if (pClsObj == (SOMClass *) NULL)
  337.     SOM_Error(SOMERROR_NoParentClass);
  338.  
  339.     /* Explicit metaclass, so get it */ 
  340.     M_DM2TestNewClass(0,0);    /* static reference */
  341.     mClsObj = _somFindClass(SOMClassMgrObject,
  342.         SOM_IdFromString("M_DM2Test"), 0, 0);
  343.     if (mClsObj == (SOMClass *) NULL)
  344.     SOM_Error(SOMERROR_NoMetaClass);
  345.  
  346.     somConstructClass(DM2TestsomCreateClass, pClsObj, mClsObj,
  347.              &DM2TesttempClassData);
  348.     return (DM2TestClassData.classObject);
  349. }
  350.  
  351. #endif                   /* DM2Test_Class_Source */
  352.  
  353. #endif       /* DM2Test_ih */
  354.  
  355. /*
  356.  * This file was generated by the SOM Compiler.
  357.  * FileName: DM2Test.ih.
  358.  * Generated using:
  359.  *     SOM Precompiler spc: 1.22
  360.  *     SOM Emitter emitih: 1.59
  361.  */
  362.  
  363. #ifndef DM2Test_mih
  364. #define DM2Test_mih
  365.  
  366.  
  367. /*
  368.  * Set the scope of methods functions
  369.  */
  370. #ifndef SOM_Scope
  371. #ifdef __cplusplus
  372. #define SOM_Scope extern "C"
  373. #else
  374. #define SOM_Scope extern
  375. #endif
  376. #endif
  377.  
  378. #ifndef SOM_CurrentClass
  379. #define SOM_CurrentClass M_DM2TestCClassData.parentMtab
  380. #endif
  381.  
  382. #define M_DM2Test_MaxNoMethods 0
  383.  
  384. /*
  385.  * Instance data
  386.  */
  387. typedef void M_DM2TestData;
  388.  
  389. /*
  390.  * Trace/Debug macro
  391.  */
  392. #ifndef M_DM2TestMethodDebug
  393. #define M_DM2TestMethodDebug(c,m) SOMMethodDebug(c,m)
  394. #endif
  395.  
  396. /*
  397.  * Begin stuff that only goes in the primary file
  398.  */
  399. #ifdef M_DM2Test_Class_Source
  400.  
  401. /*
  402.  * Current class macros for Instance and Meta classes.
  403.  */
  404.  
  405. /*
  406.  * Generate the Apply Stubs.
  407.  */
  408.  
  409. /*
  410.  * Overridden method: wpclsInitData
  411.  */
  412. #pragma linkage(DM2TestC_wpclsInitData, system)
  413. SOM_Scope void   SOMLINK DM2TestC_wpclsInitData(M_DM2Test *somSelf);
  414. #ifndef parent_wpclsInitData
  415. static char *somMN_wpclsInitData = "wpclsInitData";
  416. static somId somId_wpclsInitData = &somMN_wpclsInitData;
  417. #define parent_wpclsInitData(somSelf) \
  418.     ((SOM_ParentResolveE(M_WPObject, SOM_CurrentClass, wpclsInitData)) \
  419.      (somSelf))
  420. #endif
  421. #define M_DM2TestParent_wpclsInitData parent_wpclsInitData
  422.  
  423. /*
  424.  * Overridden method: wpclsUnInitData
  425.  */
  426. #pragma linkage(DM2TestC_wpclsUnInitData, system)
  427. SOM_Scope void   SOMLINK DM2TestC_wpclsUnInitData(M_DM2Test *somSelf);
  428. #ifndef parent_wpclsUnInitData
  429. static char *somMN_wpclsUnInitData = "wpclsUnInitData";
  430. static somId somId_wpclsUnInitData = &somMN_wpclsUnInitData;
  431. #define parent_wpclsUnInitData(somSelf) \
  432.     ((SOM_ParentResolveE(M_WPObject, SOM_CurrentClass, wpclsUnInitData)) \
  433.      (somSelf))
  434. #endif
  435. #define M_DM2TestParent_wpclsUnInitData parent_wpclsUnInitData
  436.  
  437. /*
  438.  * Overridden method: wpclsQueryIconData
  439.  */
  440. #pragma linkage(DM2TestC_wpclsQueryIconData, system)
  441. SOM_Scope ULONG   SOMLINK DM2TestC_wpclsQueryIconData(M_DM2Test *somSelf,
  442.         PICONINFO pIconInfo);
  443. #ifndef parent_wpclsQueryIconData
  444. static char *somMN_wpclsQueryIconData = "wpclsQueryIconData";
  445. static somId somId_wpclsQueryIconData = &somMN_wpclsQueryIconData;
  446. #define parent_wpclsQueryIconData(somSelf,pIconInfo) \
  447.     ((SOM_ParentResolveE(M_WPObject, SOM_CurrentClass, wpclsQueryIconData)) \
  448.      (somSelf,pIconInfo))
  449. #endif
  450. #define M_DM2TestParent_wpclsQueryIconData parent_wpclsQueryIconData
  451.  
  452. /*
  453.  * Overridden method: wpclsQueryTitle
  454.  */
  455. #pragma linkage(DM2TestC_wpclsQueryTitle, system)
  456. SOM_Scope PSZ   SOMLINK DM2TestC_wpclsQueryTitle(M_DM2Test *somSelf);
  457. #ifndef parent_wpclsQueryTitle
  458. static char *somMN_wpclsQueryTitle = "wpclsQueryTitle";
  459. static somId somId_wpclsQueryTitle = &somMN_wpclsQueryTitle;
  460. #define parent_wpclsQueryTitle(somSelf) \
  461.     ((SOM_ParentResolveE(M_WPObject, SOM_CurrentClass, wpclsQueryTitle)) \
  462.      (somSelf))
  463. #endif
  464. #define M_DM2TestParent_wpclsQueryTitle parent_wpclsQueryTitle
  465.  
  466. /*
  467.  * Temporary class data structure used only in class creation
  468.  */
  469. static somClassDataStructure M_DM2TesttempClassData;
  470.  
  471. /*
  472.  * Initialize the class data structure
  473.  */
  474. struct M_DM2TestClassDataStructure M_DM2TestClassData = {(SOMAny *) NULL};
  475.  
  476. /*
  477.  * Define the C class data structure
  478.  */
  479. struct M_DM2TestCClassDataStructure M_DM2TestCClassData = {(somMethodTab *) NULL};
  480.  
  481. /*
  482.  * Routines to create the class object
  483.  */
  484.  
  485. /*
  486.  * Declare the Override Methods table.
  487.  */
  488. static somOverrideMethod_t M_DM2TestOM[] = {
  489.     {    &somId_wpclsInitData,
  490.          (somMethodProc *) DM2TestC_wpclsInitData    },
  491.     {    &somId_wpclsUnInitData,
  492.          (somMethodProc *) DM2TestC_wpclsUnInitData    },
  493.     {    &somId_wpclsQueryIconData,
  494.          (somMethodProc *) DM2TestC_wpclsQueryIconData    },
  495.     {    &somId_wpclsQueryTitle,
  496.          (somMethodProc *) DM2TestC_wpclsQueryTitle    },
  497. };
  498.  
  499. static void M_DM2TestsomInitializeClass ()
  500. {
  501.     int i;
  502.     somOverrideMethod_t *omp;
  503.  
  504. /*
  505.  * Override methods.
  506.  */
  507.     for (omp = M_DM2TestOM, i = 0; i < 4; omp++, i++)
  508.         _somOverrideSMethod (M_DM2TesttempClassData.classObject,
  509.             *(omp->methodId), omp->method);
  510.  
  511. }
  512.  
  513. #pragma linkage(M_DM2TestsomCreateClass, system)
  514. static void SOMLINK M_DM2TestsomCreateClass(SOMClass *pClsObj,
  515.                            SOMClass *mClsObj)
  516. {
  517.     M_DM2TesttempClassData.classObject = _somNew (mClsObj);
  518.     _somInitClass (M_DM2TesttempClassData.classObject,
  519.         "M_DM2Test",
  520.         pClsObj,
  521.         0,
  522.         M_DM2Test_MaxNoMethods,
  523.         M_DM2Test_MajorVersion,
  524.         M_DM2Test_MinorVersion);
  525.     M_DM2TestCClassData.instanceDataToken = 
  526.     _somGetInstanceToken(M_DM2TesttempClassData.classObject);
  527.     M_DM2TestsomInitializeClass();
  528.     M_DM2TestCClassData.parentMtab =
  529.     _somGetPClsMtab(M_DM2TesttempClassData.classObject);
  530.     _somSetClassData(M_DM2TesttempClassData.classObject, (somClassDataStructure *)&M_DM2TestClassData);
  531.     _somClassReady(M_DM2TesttempClassData.classObject);
  532.     /* make newly created class object visible */
  533.     M_DM2TestClassData.classObject = M_DM2TesttempClassData.classObject;
  534. }
  535.  
  536. M_DM2Test * SOMLINK M_DM2TestNewClass (integer4 scemajorVersion,
  537.         integer4 sceminorVersion)
  538. {
  539.     SOMClass *pClsObj;
  540.     SOMClass *mClsObj;
  541.  
  542.     /* Check the version numbers */
  543.     if (((scemajorVersion != 0) && 
  544.          (scemajorVersion != M_DM2Test_MajorVersion)) ||
  545.         ((sceminorVersion != 0) && 
  546.          (sceminorVersion > M_DM2Test_MinorVersion))) {
  547.     somPrintf("M_DM2TestNewClass: Error, bad version numbers.\n");
  548.     SOM_Error(SOMERROR_BadVersion);
  549.     }
  550.     /* Don't do anything if class object is already created. */
  551.     if (M_DM2TestClassData.classObject != (SOMAny *) NULL)
  552.     return(M_DM2TestClassData.classObject);
  553.  
  554.     /* Make sure the environment is initialized. */
  555.     if (SOMClassMgrObject == (SOMAny *) NULL) somEnvironmentNew();
  556.     if (SOMClassMgrObject == (SOMAny *) NULL)
  557.     SOM_Error(SOMERROR_CouldNotStartup);
  558.  
  559.     /* Get the parent class object. */
  560.     M_WPAbstractNewClass(1,2);    /* static reference */
  561.     pClsObj = _somFindClass(SOMClassMgrObject,
  562.         SOM_IdFromString("M_WPAbstract"), 1, 2);
  563.     if (pClsObj == (SOMClass *) NULL)
  564.     SOM_Error(SOMERROR_NoParentClass);
  565.  
  566.     /* Use parent's metaclass */ 
  567.     mClsObj = SOM_GetClass(pClsObj);
  568.  
  569.     somConstructClass(M_DM2TestsomCreateClass, pClsObj, mClsObj,
  570.              &M_DM2TesttempClassData);
  571.     return (M_DM2TestClassData.classObject);
  572. }
  573.  
  574. #endif                   /* M_DM2Test_Class_Source */
  575.  
  576. #endif       /* DM2Test_ih */
  577.