
/*
 * This file was generated by the SOM Compiler.
 * FileName: G:\cwpsh\rel\os2c\include\base\os2\wpserial.xh.
 * Generated using:
 *     SOM Precompiler somipc: 2.29.1.14
 *     SOM Emitter emitxh: 2.43
 */

/*
 *   Module Header
 * 
 *   Module Name: WPSERIAL
 * 
 *   OS/2 Presentation Manager Workplace class definitions
 * 
 *   Copyright (c) International Business Machines Corporation 1991, 1992
 * 
 */


#ifndef SOM_WPDevSerial_xh
#define SOM_WPDevSerial_xh

class WPDevSerial;

#define WPDevSerial_MajorVersion 1
#define WPDevSerial_MinorVersion 2

/*
 * Passthru lines: File: "C.h", "before"
 */



/* C++ SOM defs */
#include <somcls.xh>
#include <somcm.xh>

/* C++ parent defs */
#ifndef SOM_WPDevice_xh
#include <wpdevice.xh>
#endif

#ifndef WPDevSerial_API
#define WPDevSerial_API
/*
 * -- The Class API
 */

/*
 * Start of bindings for IDL types
 */

class SOMClass;
class SOMObject;
class WPFolder;
class M_WPObject;
class WPObject;
class WPImageFile;
class M_WPTransient;
class M_WPDevice;
class M_WPDevSerial;

/*
 * End of bindings for IDL types.
 */

/* A procedure to create the WPDevSerial Class */
class M_WPDevSerial;
SOMEXTERN M_WPDevSerial * SOMLINK WPDevSerialNewClass(
		integer4 majorVersion,
		integer4 minorVersion);

/* The API to the WPDevSerial class object, and the methods it introduces. */
SOMEXTERN struct WPDevSerialClassDataStructure {
	M_WPDevSerial *classObject;
} SOMDLINK WPDevSerialClassData;
#define _WPDevSerial WPDevSerialClassData.classObject

/* The API to parentMtabs for WPDevSerial, and the instance data it introduces. */
SOMEXTERN struct WPDevSerialCClassDataStructure {
	somMethodTabs parentMtab;
	somDToken              instanceDataToken;
} SOMDLINK WPDevSerialCClassData;

/*
 * -- Typedefs for WPDevSerial Method Procedures
 */
SOMEXTERN {

/*
 * -- Typedefs for Reintroduced Wrapper Methods
 */
typedef M_WPDevSerial*   SOMLINK somTP_WPDevSerial_somGetClass(WPDevSerial *somSelf);
typedef somTP_WPDevSerial_somGetClass *somTD_WPDevSerial_somGetClass;
}

#endif /* WPDevSerial_API */


/*
 * -- This emitter treats Method Tokens as Thunks by default.
 * -- Use the sc modifier "nothunks" to change this default
 */
#undef somresolve_
#define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))

/*
 * -- The C++ Wrapper Class for WPDevSerial
 */
class WPDevSerial : public WPDevice
{
public:

// WPDevSerial::new creates the class object if necessary, and then uses somNewNoInit
// to allocate memory and create the object. Initialization is in ctors.
void *operator new(size_t)
{
   if (!_WPDevSerial) WPDevSerialNewClass(WPDevSerial_MajorVersion,WPDevSerial_MinorVersion);
   return (void*)
      SOM_Resolve(_WPDevSerial,SOMClass,somNewNoInit)
         ((SOMClass *)((void*)_WPDevSerial));
}

// WPDevSerial::delete uses somDestruct.
void operator delete(void * obj)
{
   if (obj && *(void**)obj) {
      SOM_Resolve(obj,SOMObject,somDestruct)
         ((SOMObject*)obj, 1, 0);
   }
}

WPDevSerial& operator=(WPDevSerial& fromObj)
{
   this->somDefaultAssign(0,(SOMObject*)((void*)&fromObj));
   return *this;
}

WPDevSerial()
{
   if (*(void**)this != 
       ((somParentMtabStructPtr)
        (WPDevSerialCClassData.parentMtab))->mtab)
      return;
   ((SOMObject*)((void*)this))->somDefaultInit(0);
}

WPDevSerial(WPDevSerial* fromObj)
{
   if (*(void**)this != 
       ((somParentMtabStructPtr)
        (WPDevSerialCClassData.parentMtab))->mtab)
      return;
   ((SOMObject*)((void*)this))->somDefaultCopyInit(0,((SOMObject*)((void*)fromObj)));
}

WPDevSerial(const WPDevSerial* fromObj)
{
   if (*(void**)this != 
       ((somParentMtabStructPtr)
        (WPDevSerialCClassData.parentMtab))->mtab)
      return;
   ((SOMObject*)((void*)this))->somDefaultConstCopyInit(0,((SOMObject*)((void*)fromObj)));
}


/*
 * Reintroduce inherited methods
 */

/* method: somGetClass */
M_WPDevSerial*  somGetClass()
{
/*
 *  Return the receiver's class.
 */
   return SOM_ResolveD(this,WPDevSerial,SOMObject,somGetClass)
	(this);
}



};   /* WPDevSerial */



#endif       /* SOM_WPDevSerial_xh */

#ifndef SOM_M_WPDevSerial_xh
#define SOM_M_WPDevSerial_xh

class M_WPDevSerial;

/*
 *  New class methods section
 */

#define M_WPDevSerial_MajorVersion 1
#define M_WPDevSerial_MinorVersion 2

/* C++ SOM defs */
#include <somcls.xh>
#include <somcm.xh>

/* C++ parent defs */
#ifndef SOM_M_WPDevice_xh
#include <wpdevice.xh>
#endif

#ifndef M_WPDevSerial_API
#define M_WPDevSerial_API
/*
 * -- The Class API
 */

/*
 * Start of bindings for IDL types
 */


/*
 * End of bindings for IDL types.
 */

/*
 * -- M_WPDevSerial is a metaclass for WPDevSerial. Make sure WPDevSerial is known.
 */
class WPDevSerial;


/* A procedure to create the M_WPDevSerial Class */
SOMEXTERN SOMClass * SOMLINK M_WPDevSerialNewClass(
		integer4 majorVersion,
		integer4 minorVersion);

/* The API to the M_WPDevSerial class object, and the methods it introduces. */
SOMEXTERN struct M_WPDevSerialClassDataStructure {
	SOMClass *classObject;
} SOMDLINK M_WPDevSerialClassData;
#define _M_WPDevSerial M_WPDevSerialClassData.classObject

/* The API to parentMtabs for M_WPDevSerial, and the instance data it introduces. */
SOMEXTERN struct M_WPDevSerialCClassDataStructure {
	somMethodTabs parentMtab;
	somDToken              instanceDataToken;
} SOMDLINK M_WPDevSerialCClassData;

/*
 * -- Typedefs for M_WPDevSerial Method Procedures
 */
SOMEXTERN {

/*
 * -- Typedefs for Reintroduced Wrapper Methods
 */
typedef WPDevSerial*   SOMLINK somTP_M_WPDevSerial_somNew(M_WPDevSerial *somSelf);
typedef somTP_M_WPDevSerial_somNew *somTD_M_WPDevSerial_somNew;
}

#endif /* M_WPDevSerial_API */


/*
 * -- This emitter treats Method Tokens as Thunks by default.
 * -- Use the sc modifier "nothunks" to change this default
 */
#undef somresolve_
#define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))

/*
 * -- The C++ Wrapper Class for M_WPDevSerial
 */
class M_WPDevSerial : public M_WPDevice
{
/*
 *  New class methods section
 */
public:

// M_WPDevSerial::new creates the class object if necessary, and then uses somNewNoInit
// to allocate memory and create the object. Initialization is in ctors.
void *operator new(size_t)
{
   if (!_M_WPDevSerial) M_WPDevSerialNewClass(M_WPDevSerial_MajorVersion,M_WPDevSerial_MinorVersion);
   return (void*)
      SOM_Resolve(_M_WPDevSerial,SOMClass,somNewNoInit)
         ((SOMClass *)((void*)_M_WPDevSerial));
}

// M_WPDevSerial::delete uses somDestruct.
void operator delete(void * obj)
{
   if (obj && *(void**)obj) {
      SOM_Resolve(obj,SOMObject,somDestruct)
         ((SOMObject*)obj, 1, 0);
   }
}

M_WPDevSerial& operator=(M_WPDevSerial& fromObj)
{
   this->somDefaultAssign(0,(SOMObject*)((void*)&fromObj));
   return *this;
}

M_WPDevSerial()
{
   if (*(void**)this != 
       ((somParentMtabStructPtr)
        (M_WPDevSerialCClassData.parentMtab))->mtab)
      return;
   ((SOMObject*)((void*)this))->somDefaultInit(0);
}

M_WPDevSerial(M_WPDevSerial* fromObj)
{
   if (*(void**)this != 
       ((somParentMtabStructPtr)
        (M_WPDevSerialCClassData.parentMtab))->mtab)
      return;
   ((SOMObject*)((void*)this))->somDefaultCopyInit(0,((SOMObject*)((void*)fromObj)));
}

M_WPDevSerial(const M_WPDevSerial* fromObj)
{
   if (*(void**)this != 
       ((somParentMtabStructPtr)
        (M_WPDevSerialCClassData.parentMtab))->mtab)
      return;
   ((SOMObject*)((void*)this))->somDefaultConstCopyInit(0,((SOMObject*)((void*)fromObj)));
}


/*
 * Reintroduce inherited methods
 */

/* method: somNew */
WPDevSerial*  somNew()
{
   return SOM_ResolveD(this,M_WPDevSerial,SOMClass,somNew)
	(this);
}



};   /* M_WPDevSerial */



#endif       /* SOM_M_WPDevSerial_xh */
