home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / header45.zip / wpprint.xh < prev    next >
Text File  |  1999-03-15  |  19KB  |  682 lines

  1.  
  2. /*
  3.  * This file was generated by the SOM Compiler.
  4.  * FileName: E:\cwpsh\rel\os2c\include\base\os2\wpprint.xh.
  5.  * Generated using:
  6.  *     SOM Precompiler somipc: 2.29.1.14
  7.  *     SOM Emitter emitxh: 2.43
  8.  */
  9.  
  10. /*
  11.  *   Module Header
  12.  * 
  13.  *   Module Name: WPPRINT
  14.  * 
  15.  *   OS/2 Presentation Manager Workplace class definitions
  16.  * 
  17.  *   Copyright (c) International Business Machines Corporation 1991, 1992
  18.  * 
  19.  */
  20.  
  21.  
  22. #ifndef SOM_WPPrinter_xh
  23. #define SOM_WPPrinter_xh
  24.  
  25. class WPPrinter;
  26.  
  27. /*
  28.  *  CLASS: WPPrinter
  29.  * 
  30.  *  CLASS HIERARCHY:
  31.  *     SOMObject
  32.  *       └── WPObject
  33.  *             └── WPAbstract
  34.  *                   └── WPPrinter
  35.  * 
  36.  *  DESCRIPTION:
  37.  *     This is the print destination object class.
  38.  *     An instance of this class can be created as a Workplace object.
  39.  *     An instance of this class is created initially by the system in
  40.  *     its template form.  It has the title "Create print destination"
  41.  *     and resides in the "Templates" folder.  Instances of this class
  42.  *     are also created initially by the system for each print destination
  43.  *     configured.  Each instance will have a title corresponding to the
  44.  *     description of the configured queue and printer and will reside on
  45.  *     the desktop.
  46.  * 
  47.  */
  48.  
  49. #define WPPrinter_MajorVersion 1
  50. #define WPPrinter_MinorVersion 1
  51.  
  52. /*
  53.  * Passthru lines: File: "C.h", "before"
  54.  */
  55.  
  56. /*
  57.  * Passthru flags for QueueOptions methods
  58.  */
  59.  
  60. #define PO_PRINTERSPECIFICFORMAT     0x00000001
  61. #define PO_PRINTWHILESPOOLING        0x00000002
  62. #define PO_APPDEFAULT                0x00000004
  63. #define PO_JOBDIALOGBEFOREPRINT      0x00010000
  64.  
  65. /*
  66.  * _wpJobChanged ulField values for when job is held or released
  67.  */
  68. #define PO_JOB_HELD                  0x00000080
  69. #define PO_JOB_RELEASE               0x00000081
  70.  
  71. /* common context menu ids */
  72.  
  73. #define WPPOICM_PD_OPENMENU         6000
  74. #define WPPOIDM_PD_ICON             9010
  75. #define WPPOIDM_PD_DETAIL           9009
  76. #define WPPOICM_PD_MENU             9000
  77. #define WPPOIDM_PD_STATUS           9003
  78. #define WPPOIDM_PD_HOLD             9004
  79. #define WPPOIDM_PD_RELEASE          9005
  80. #define WPPOIDM_PD_DELETE_JOBS      9016
  81. #define WPPOIDM_PD_REFRESH          9013
  82. #define WPPOIDM_PD_DEFAULT          9100
  83. #define WPPOIDM_PD_INSTALL          8001
  84.  
  85.  
  86. /* C++ SOM defs */
  87. #include <somcls.xh>
  88. #include <somcm.xh>
  89.  
  90. /* C++ parent defs */
  91. #ifndef SOM_WPAbstract_xh
  92. #include <wpabs.xh>
  93. #endif
  94.  
  95. #ifndef WPPrinter_API
  96. #define WPPrinter_API
  97. /*
  98.  * -- The Class API
  99.  */
  100.  
  101. /*
  102.  * Start of bindings for IDL types
  103.  */
  104.  
  105. class SOMClass;
  106. class SOMObject;
  107. class WPFolder;
  108. class M_WPObject;
  109. class WPObject;
  110. class WPImageFile;
  111. class M_WPAbstract;
  112. class M_WPPrinter;
  113.  
  114. /*
  115.  * End of bindings for IDL types.
  116.  */
  117.  
  118. /* A procedure to create the WPPrinter Class */
  119. class M_WPPrinter;
  120. SOMEXTERN M_WPPrinter * SOMLINK WPPrinterNewClass(
  121.         integer4 majorVersion,
  122.         integer4 minorVersion);
  123.  
  124. /* The API to the WPPrinter class object, and the methods it introduces. */
  125. SOMEXTERN struct WPPrinterClassDataStructure {
  126.     M_WPPrinter *classObject;
  127.     somMToken pdvNew;
  128.     somMToken pdvOpen;
  129.     somMToken pdvPrintDestType;
  130.     somMToken pdvQueueName;
  131.     somMToken pdvComputerName;
  132.     somMToken pdvSetViewStatus;
  133.     somMToken pdvSetDialogPrintFlag;
  134.     somMToken pdvIsDialogPrintOn;
  135.     somMToken pdvGetJobFolderhWnd;
  136.     somMToken pdvSetPrintDestType;
  137.     somMToken pdvSetQueueName;
  138.     somMToken pdvSetComputerName;
  139.     somMToken pdvSetTitle;
  140.     somMToken pdvHoldQueue;
  141.     somMToken pdvReleaseQueue;
  142.     somMToken pdvChangeQueue;
  143.     somMToken pdvAddJob;
  144.     somMToken pdvDeleteJob;
  145.     somMToken pdvDeleteAllJob;
  146.     somMToken pdvHoldJob;
  147.     somMToken pdvReleaseJob;
  148.     somMToken pdvChangeJob;
  149.     somMToken pdvHasThisPort;
  150.     somMToken pdvHasThisPDriver;
  151.     somMToken pdvHasThisQDriver;
  152.     somMToken pdvGetQueueObject;
  153.     somMToken pdvGetCountryData;
  154.     somMToken pdvSetCountryData;
  155.     somMToken pdvGetJobDetailTable;
  156.     somMToken pdvGetJobFieldInfo;
  157.     somMToken pdvPrintPD;
  158.     somMToken pdvFreePrintDest;
  159.     somMToken pdvNewRemote;
  160.     somMToken pdvCopyRemote;
  161.     somMToken pdvCapabilities;
  162.     somMToken pdvSetCapabilities;
  163.     somMToken pdvLogonName;
  164.     somMToken pdvSetLogonName;
  165.     somMToken pdvLocalPrintDriverOnly;
  166.     somMToken pdvSetLocalPrintDriverOnly;
  167.     somMToken pdvRemotePDriverList;
  168.     somMToken pdvSetRemotePDriverList;
  169.     somMToken pdvPrintSpecificFormat;
  170.     somMToken pdvSetPrintSpecificFormat;
  171.     somMToken pdvRemoteAdminCopy;
  172.     somMToken pdvRemoteAdminCreate;
  173.     somMToken pdvRemoteAdminDelete;
  174.     somMToken pdvAddJobViewer;
  175.     somMToken pdvDelJobViewer;
  176.     somMToken pdvTimerTicks;
  177.     somMToken pdvSetTimerTicks;
  178.     somMToken wpDeleteAllJobs;
  179.     somMToken wpHoldPrinter;
  180.     somMToken wpReleasePrinter;
  181.     somMToken wpQueryComputerName;
  182.     somMToken wpQueryPrinterName;
  183.     somMToken wpSetComputerName;
  184.     somMToken wpSetPrinterName;
  185.     somMToken wpSetDefaultPrinter;
  186.     somMToken pdvSetLSAlias;
  187.     somMToken pdvLSAlias;
  188.     somMToken pdvLocalAlias;
  189.     somMToken pdvSetLocalAlias;
  190.     somMToken pdvRemoteJobView;
  191.     somMToken pdvSetRemoteData;
  192.     somMToken pdvCopy;
  193.     somMToken pdvSetJobDetailTable;
  194.     somMToken pdvGetQueueStatusLine;
  195.     somMToken pdvSetQueueStatusLine;
  196.     somMToken pdvGetNewDlg;
  197.     somMToken pdvSetNewDlg;
  198.     somMToken pdvGetLastRefreshTime;
  199.     somMToken pdvSetLastRefreshTime;
  200.     somMToken wpSetQueueOptions;
  201.     somMToken wpQueryQueueOptions;
  202.     somMToken wpSetRemoteOptions;
  203.     somMToken wpQueryRemoteOptions;
  204.     somMToken wpJobAdded;
  205.     somMToken wpJobChanged;
  206.     somMToken wpJobDeleted;
  207.     somMToken pdvSetPrinterStatusLine;
  208.     somMToken pdvGetPrinterStatusLine;
  209.     somMToken pdvQueryXSplitBarDetail;
  210.     somMToken pdvSetXSplitBarDetail;
  211.     somMToken wpSetJobProperties;
  212.     somMToken pdvSetDetailsColumnVisibility;
  213.     somMToken pdvIsDetailsColumnVisible;
  214.     somMToken pdvResetTimer;
  215.     somMToken pdvSetErrorIcon;
  216. } SOMDLINK WPPrinterClassData;
  217. #define _WPPrinter WPPrinterClassData.classObject
  218.  
  219. /* The API to parentMtabs for WPPrinter, and the instance data it introduces. */
  220. SOMEXTERN struct WPPrinterCClassDataStructure {
  221.     somMethodTabs parentMtab;
  222.     somDToken              instanceDataToken;
  223. } SOMDLINK WPPrinterCClassData;
  224.  
  225. /*
  226.  * -- Typedefs for WPPrinter Method Procedures
  227.  */
  228. SOMEXTERN {
  229. typedef BOOL   SOMLINK somTP_WPPrinter_wpDeleteAllJobs(WPPrinter *somSelf);
  230. typedef somTP_WPPrinter_wpDeleteAllJobs *somTD_WPPrinter_wpDeleteAllJobs;
  231. typedef BOOL   SOMLINK somTP_WPPrinter_wpHoldPrinter(WPPrinter *somSelf);
  232. typedef somTP_WPPrinter_wpHoldPrinter *somTD_WPPrinter_wpHoldPrinter;
  233. typedef BOOL   SOMLINK somTP_WPPrinter_wpReleasePrinter(WPPrinter *somSelf);
  234. typedef somTP_WPPrinter_wpReleasePrinter *somTD_WPPrinter_wpReleasePrinter;
  235. typedef ULONG   SOMLINK somTP_WPPrinter_wpQueryComputerName(WPPrinter *somSelf, 
  236.         PSZ pszComputerName);
  237. typedef somTP_WPPrinter_wpQueryComputerName *somTD_WPPrinter_wpQueryComputerName;
  238. typedef BOOL   SOMLINK somTP_WPPrinter_wpQueryPrinterName(WPPrinter *somSelf, 
  239.         PSZ pszPrinterName);
  240. typedef somTP_WPPrinter_wpQueryPrinterName *somTD_WPPrinter_wpQueryPrinterName;
  241. typedef BOOL   SOMLINK somTP_WPPrinter_wpSetComputerName(WPPrinter *somSelf, 
  242.         PSZ pszComputerName);
  243. typedef somTP_WPPrinter_wpSetComputerName *somTD_WPPrinter_wpSetComputerName;
  244. typedef BOOL   SOMLINK somTP_WPPrinter_wpSetPrinterName(WPPrinter *somSelf, 
  245.         PSZ pszPrinterName);
  246. typedef somTP_WPPrinter_wpSetPrinterName *somTD_WPPrinter_wpSetPrinterName;
  247. typedef BOOL   SOMLINK somTP_WPPrinter_wpSetDefaultPrinter(WPPrinter *somSelf);
  248. typedef somTP_WPPrinter_wpSetDefaultPrinter *somTD_WPPrinter_wpSetDefaultPrinter;
  249. typedef BOOL   SOMLINK somTP_WPPrinter_wpSetQueueOptions(WPPrinter *somSelf, 
  250.         ULONG ulOptions);
  251. typedef somTP_WPPrinter_wpSetQueueOptions *somTD_WPPrinter_wpSetQueueOptions;
  252. typedef ULONG   SOMLINK somTP_WPPrinter_wpQueryQueueOptions(WPPrinter *somSelf);
  253. typedef somTP_WPPrinter_wpQueryQueueOptions *somTD_WPPrinter_wpQueryQueueOptions;
  254. typedef BOOL   SOMLINK somTP_WPPrinter_wpSetRemoteOptions(WPPrinter *somSelf, 
  255.         ULONG ulRefreshInterval, 
  256.         ULONG flAllJobs);
  257. typedef somTP_WPPrinter_wpSetRemoteOptions *somTD_WPPrinter_wpSetRemoteOptions;
  258. typedef BOOL   SOMLINK somTP_WPPrinter_wpQueryRemoteOptions(WPPrinter *somSelf, 
  259.         PULONG pulRefreshInterval, 
  260.         PULONG pflAllJobs);
  261. typedef somTP_WPPrinter_wpQueryRemoteOptions *somTD_WPPrinter_wpQueryRemoteOptions;
  262. typedef BOOL   SOMLINK somTP_WPPrinter_wpJobAdded(WPPrinter *somSelf, 
  263.         ULONG ulJobId);
  264. typedef somTP_WPPrinter_wpJobAdded *somTD_WPPrinter_wpJobAdded;
  265. typedef BOOL   SOMLINK somTP_WPPrinter_wpJobChanged(WPPrinter *somSelf, 
  266.         ULONG ulJobId, 
  267.         ULONG ulField);
  268. typedef somTP_WPPrinter_wpJobChanged *somTD_WPPrinter_wpJobChanged;
  269. typedef BOOL   SOMLINK somTP_WPPrinter_wpJobDeleted(WPPrinter *somSelf, 
  270.         ULONG ulJobId);
  271. typedef somTP_WPPrinter_wpJobDeleted *somTD_WPPrinter_wpJobDeleted;
  272. typedef BOOL   SOMLINK somTP_WPPrinter_wpSetJobProperties(WPPrinter *somSelf, 
  273.         PDRIVDATA pDrivData);
  274. typedef somTP_WPPrinter_wpSetJobProperties *somTD_WPPrinter_wpSetJobProperties;
  275.  
  276. /*
  277.  * -- Typedefs for Reintroduced Wrapper Methods
  278.  */
  279. typedef M_WPPrinter*   SOMLINK somTP_WPPrinter_somGetClass(WPPrinter *somSelf);
  280. typedef somTP_WPPrinter_somGetClass *somTD_WPPrinter_somGetClass;
  281. }
  282.  
  283. #endif /* WPPrinter_API */
  284.  
  285.  
  286. /*
  287.  * -- This emitter normally treats Method Tokens as Thunks,
  288.  * -- but the sc modifier "nothunks" was used, so somResolve will be called.
  289.  */
  290. #undef somresolve_
  291. #define somresolve_(obj,mToken) (somResolve(obj,mToken))
  292.  
  293. /*
  294.  * -- The C++ Wrapper Class for WPPrinter
  295.  */
  296. class WPPrinter : public WPAbstract
  297. {
  298. /*
  299.  *  CLASS: WPPrinter
  300.  * 
  301.  *  CLASS HIERARCHY:
  302.  *     SOMObject
  303.  *       └── WPObject
  304.  *             └── WPAbstract
  305.  *                   └── WPPrinter
  306.  * 
  307.  *  DESCRIPTION:
  308.  *     This is the print destination object class.
  309.  *     An instance of this class can be created as a Workplace object.
  310.  *     An instance of this class is created initially by the system in
  311.  *     its template form.  It has the title "Create print destination"
  312.  *     and resides in the "Templates" folder.  Instances of this class
  313.  *     are also created initially by the system for each print destination
  314.  *     configured.  Each instance will have a title corresponding to the
  315.  *     description of the configured queue and printer and will reside on
  316.  *     the desktop.
  317.  * 
  318.  */
  319. public:
  320.  
  321. // WPPrinter::new creates the class object if necessary, and then uses somNewNoInit
  322. // to allocate memory and create the object. Initialization is in ctors.
  323. void *operator new(size_t)
  324. {
  325.    if (!_WPPrinter) WPPrinterNewClass(WPPrinter_MajorVersion,WPPrinter_MinorVersion);
  326.    return (void*)
  327.       SOM_Resolve(_WPPrinter,SOMClass,somNewNoInit)
  328.          ((SOMClass *)((void*)_WPPrinter));
  329. }
  330.  
  331. // WPPrinter::delete uses somDestruct.
  332. void operator delete(void * obj)
  333. {
  334.    if (obj && *(void**)obj) {
  335.       SOM_Resolve(obj,SOMObject,somDestruct)
  336.          ((SOMObject*)obj, 1, 0);
  337.    }
  338. }
  339.  
  340. WPPrinter& operator=(WPPrinter& fromObj)
  341. {
  342.    this->somDefaultAssign(0,(SOMObject*)((void*)&fromObj));
  343.    return *this;
  344. }
  345.  
  346. WPPrinter()
  347. {
  348.    if (*(void**)this != 
  349.        ((somParentMtabStructPtr)
  350.         (WPPrinterCClassData.parentMtab))->mtab)
  351.       return;
  352.    ((SOMObject*)((void*)this))->somDefaultInit(0);
  353. }
  354.  
  355. WPPrinter(WPPrinter* fromObj)
  356. {
  357.    if (*(void**)this != 
  358.        ((somParentMtabStructPtr)
  359.         (WPPrinterCClassData.parentMtab))->mtab)
  360.       return;
  361.    ((SOMObject*)((void*)this))->somDefaultCopyInit(0,((SOMObject*)((void*)fromObj)));
  362. }
  363.  
  364. WPPrinter(const WPPrinter* fromObj)
  365. {
  366.    if (*(void**)this != 
  367.        ((somParentMtabStructPtr)
  368.         (WPPrinterCClassData.parentMtab))->mtab)
  369.       return;
  370.    ((SOMObject*)((void*)this))->somDefaultConstCopyInit(0,((SOMObject*)((void*)fromObj)));
  371. }
  372.  
  373.  
  374. /* method: wpDeleteAllJobs */
  375. BOOL   wpDeleteAllJobs()
  376. {
  377.    return SOM_ResolveD(this,WPPrinter,WPPrinter,wpDeleteAllJobs)
  378.     (this);
  379. }
  380.  
  381.  
  382. /* method: wpHoldPrinter */
  383. BOOL   wpHoldPrinter()
  384. {
  385.    return SOM_ResolveD(this,WPPrinter,WPPrinter,wpHoldPrinter)
  386.     (this);
  387. }
  388.  
  389.  
  390. /* method: wpReleasePrinter */
  391. BOOL   wpReleasePrinter()
  392. {
  393.    return SOM_ResolveD(this,WPPrinter,WPPrinter,wpReleasePrinter)
  394.     (this);
  395. }
  396.  
  397.  
  398. /* method: wpQueryComputerName */
  399. ULONG   wpQueryComputerName(PSZ pszComputerName)
  400. {
  401.    return SOM_ResolveD(this,WPPrinter,WPPrinter,wpQueryComputerName)
  402.     (this,pszComputerName);
  403. }
  404.  
  405.  
  406. /* method: wpQueryPrinterName */
  407. BOOL   wpQueryPrinterName(PSZ pszPrinterName)
  408. {
  409.    return SOM_ResolveD(this,WPPrinter,WPPrinter,wpQueryPrinterName)
  410.     (this,pszPrinterName);
  411. }
  412.  
  413.  
  414. /* method: wpSetComputerName */
  415. BOOL   wpSetComputerName(PSZ pszComputerName)
  416. {
  417.    return SOM_ResolveD(this,WPPrinter,WPPrinter,wpSetComputerName)
  418.     (this,pszComputerName);
  419. }
  420.  
  421.  
  422. /* method: wpSetPrinterName */
  423. BOOL   wpSetPrinterName(PSZ pszPrinterName)
  424. {
  425.    return SOM_ResolveD(this,WPPrinter,WPPrinter,wpSetPrinterName)
  426.     (this,pszPrinterName);
  427. }
  428.  
  429.  
  430. /* method: wpSetDefaultPrinter */
  431. BOOL   wpSetDefaultPrinter()
  432. {
  433.    return SOM_ResolveD(this,WPPrinter,WPPrinter,wpSetDefaultPrinter)
  434.     (this);
  435. }
  436.  
  437.  
  438. /* method: wpSetQueueOptions */
  439. BOOL   wpSetQueueOptions(ULONG ulOptions)
  440. {
  441.    return SOM_ResolveD(this,WPPrinter,WPPrinter,wpSetQueueOptions)
  442.     (this,ulOptions);
  443. }
  444.  
  445.  
  446. /* method: wpQueryQueueOptions */
  447. ULONG   wpQueryQueueOptions()
  448. {
  449.    return SOM_ResolveD(this,WPPrinter,WPPrinter,wpQueryQueueOptions)
  450.     (this);
  451. }
  452.  
  453.  
  454. /* method: wpSetRemoteOptions */
  455. BOOL   wpSetRemoteOptions(ULONG ulRefreshInterval, 
  456.         ULONG flAllJobs)
  457. {
  458.    return SOM_ResolveD(this,WPPrinter,WPPrinter,wpSetRemoteOptions)
  459.     (this,ulRefreshInterval,flAllJobs);
  460. }
  461.  
  462.  
  463. /* method: wpQueryRemoteOptions */
  464. BOOL   wpQueryRemoteOptions(PULONG pulRefreshInterval, 
  465.         PULONG pflAllJobs)
  466. {
  467.    return SOM_ResolveD(this,WPPrinter,WPPrinter,wpQueryRemoteOptions)
  468.     (this,pulRefreshInterval,pflAllJobs);
  469. }
  470.  
  471.  
  472. /* method: wpJobAdded */
  473. BOOL   wpJobAdded(ULONG ulJobId)
  474. {
  475.    return SOM_ResolveD(this,WPPrinter,WPPrinter,wpJobAdded)
  476.     (this,ulJobId);
  477. }
  478.  
  479.  
  480. /* method: wpJobChanged */
  481. BOOL   wpJobChanged(ULONG ulJobId, 
  482.         ULONG ulField)
  483. {
  484.    return SOM_ResolveD(this,WPPrinter,WPPrinter,wpJobChanged)
  485.     (this,ulJobId,ulField);
  486. }
  487.  
  488.  
  489. /* method: wpJobDeleted */
  490. BOOL   wpJobDeleted(ULONG ulJobId)
  491. {
  492.    return SOM_ResolveD(this,WPPrinter,WPPrinter,wpJobDeleted)
  493.     (this,ulJobId);
  494. }
  495.  
  496.  
  497. /* method: wpSetJobProperties */
  498. BOOL   wpSetJobProperties(PDRIVDATA pDrivData)
  499. {
  500.    return SOM_ResolveD(this,WPPrinter,WPPrinter,wpSetJobProperties)
  501.     (this,pDrivData);
  502. }
  503.  
  504.  
  505. /*
  506.  * Reintroduce inherited methods
  507.  */
  508.  
  509. /* method: somGetClass */
  510. M_WPPrinter*  somGetClass()
  511. {
  512. /*
  513.  *  Return the receiver's class.
  514.  */
  515.    return SOM_ResolveD(this,WPPrinter,SOMObject,somGetClass)
  516.     (this);
  517. }
  518.  
  519.  
  520.  
  521. };   /* WPPrinter */
  522.  
  523.  
  524.  
  525. #endif       /* SOM_WPPrinter_xh */
  526.  
  527. #ifndef SOM_M_WPPrinter_xh
  528. #define SOM_M_WPPrinter_xh
  529.  
  530. class M_WPPrinter;
  531.  
  532. #define M_WPPrinter_MajorVersion 1
  533. #define M_WPPrinter_MinorVersion 1
  534.  
  535. /* C++ SOM defs */
  536. #include <somcls.xh>
  537. #include <somcm.xh>
  538.  
  539. /* C++ parent defs */
  540. #ifndef SOM_M_WPAbstract_xh
  541. #include <wpabs.xh>
  542. #endif
  543.  
  544. #ifndef M_WPPrinter_API
  545. #define M_WPPrinter_API
  546. /*
  547.  * -- The Class API
  548.  */
  549.  
  550. /*
  551.  * Start of bindings for IDL types
  552.  */
  553.  
  554.  
  555. /*
  556.  * End of bindings for IDL types.
  557.  */
  558.  
  559. /*
  560.  * -- M_WPPrinter is a metaclass for WPPrinter. Make sure WPPrinter is known.
  561.  */
  562. class WPPrinter;
  563.  
  564.  
  565. /* A procedure to create the M_WPPrinter Class */
  566. SOMEXTERN SOMClass * SOMLINK M_WPPrinterNewClass(
  567.         integer4 majorVersion,
  568.         integer4 minorVersion);
  569.  
  570. /* The API to the M_WPPrinter class object, and the methods it introduces. */
  571. SOMEXTERN struct M_WPPrinterClassDataStructure {
  572.     SOMClass *classObject;
  573. } SOMDLINK M_WPPrinterClassData;
  574. #define _M_WPPrinter M_WPPrinterClassData.classObject
  575.  
  576. /* The API to parentMtabs for M_WPPrinter, and the instance data it introduces. */
  577. SOMEXTERN struct M_WPPrinterCClassDataStructure {
  578.     somMethodTabs parentMtab;
  579.     somDToken              instanceDataToken;
  580. } SOMDLINK M_WPPrinterCClassData;
  581.  
  582. /*
  583.  * -- Typedefs for M_WPPrinter Method Procedures
  584.  */
  585. SOMEXTERN {
  586.  
  587. /*
  588.  * -- Typedefs for Reintroduced Wrapper Methods
  589.  */
  590. typedef WPPrinter*   SOMLINK somTP_M_WPPrinter_somNew(M_WPPrinter *somSelf);
  591. typedef somTP_M_WPPrinter_somNew *somTD_M_WPPrinter_somNew;
  592. }
  593.  
  594. #endif /* M_WPPrinter_API */
  595.  
  596.  
  597. /*
  598.  * -- This emitter normally treats Method Tokens as Thunks,
  599.  * -- but the sc modifier "nothunks" was used, so somResolve will be called.
  600.  */
  601. #undef somresolve_
  602. #define somresolve_(obj,mToken) (somResolve(obj,mToken))
  603.  
  604. /*
  605.  * -- The C++ Wrapper Class for M_WPPrinter
  606.  */
  607. class M_WPPrinter : public M_WPAbstract
  608. {
  609. public:
  610.  
  611. // M_WPPrinter::new creates the class object if necessary, and then uses somNewNoInit
  612. // to allocate memory and create the object. Initialization is in ctors.
  613. void *operator new(size_t)
  614. {
  615.    if (!_M_WPPrinter) M_WPPrinterNewClass(M_WPPrinter_MajorVersion,M_WPPrinter_MinorVersion);
  616.    return (void*)
  617.       SOM_Resolve(_M_WPPrinter,SOMClass,somNewNoInit)
  618.          ((SOMClass *)((void*)_M_WPPrinter));
  619. }
  620.  
  621. // M_WPPrinter::delete uses somDestruct.
  622. void operator delete(void * obj)
  623. {
  624.    if (obj && *(void**)obj) {
  625.       SOM_Resolve(obj,SOMObject,somDestruct)
  626.          ((SOMObject*)obj, 1, 0);
  627.    }
  628. }
  629.  
  630. M_WPPrinter& operator=(M_WPPrinter& fromObj)
  631. {
  632.    this->somDefaultAssign(0,(SOMObject*)((void*)&fromObj));
  633.    return *this;
  634. }
  635.  
  636. M_WPPrinter()
  637. {
  638.    if (*(void**)this != 
  639.        ((somParentMtabStructPtr)
  640.         (M_WPPrinterCClassData.parentMtab))->mtab)
  641.       return;
  642.    ((SOMObject*)((void*)this))->somDefaultInit(0);
  643. }
  644.  
  645. M_WPPrinter(M_WPPrinter* fromObj)
  646. {
  647.    if (*(void**)this != 
  648.        ((somParentMtabStructPtr)
  649.         (M_WPPrinterCClassData.parentMtab))->mtab)
  650.       return;
  651.    ((SOMObject*)((void*)this))->somDefaultCopyInit(0,((SOMObject*)((void*)fromObj)));
  652. }
  653.  
  654. M_WPPrinter(const M_WPPrinter* fromObj)
  655. {
  656.    if (*(void**)this != 
  657.        ((somParentMtabStructPtr)
  658.         (M_WPPrinterCClassData.parentMtab))->mtab)
  659.       return;
  660.    ((SOMObject*)((void*)this))->somDefaultConstCopyInit(0,((SOMObject*)((void*)fromObj)));
  661. }
  662.  
  663.  
  664. /*
  665.  * Reintroduce inherited methods
  666.  */
  667.  
  668. /* method: somNew */
  669. WPPrinter*  somNew()
  670. {
  671.    return SOM_ResolveD(this,M_WPPrinter,SOMClass,somNew)
  672.     (this);
  673. }
  674.  
  675.  
  676.  
  677. };   /* M_WPPrinter */
  678.  
  679.  
  680.  
  681. #endif       /* SOM_M_WPPrinter_xh */
  682.