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

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


#ifndef SOM_WPDevBus_xh
#define SOM_WPDevBus_xh

class WPDevBus;

#define WPDevBus_MajorVersion 1
#define WPDevBus_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 WPDevBus_API
#define WPDevBus_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_WPDevBus;

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

/* A procedure to create the WPDevBus Class */
class M_WPDevBus;
SOMEXTERN M_WPDevBus * SOMLINK WPDevBusNewClass(
		integer4 majorVersion,
		integer4 minorVersion);

/* The API to the WPDevBus class object, and the methods it introduces. */
SOMEXTERN struct WPDevBusClassDataStructure {
	M_WPDevBus *classObject;
} SOMDLINK WPDevBusClassData;
#define _WPDevBus WPDevBusClassData.classObject

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

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

/*
 * -- Typedefs for Reintroduced Wrapper Methods
 */
typedef M_WPDevBus*   SOMLINK somTP_WPDevBus_somGetClass(WPDevBus *somSelf);
typedef somTP_WPDevBus_somGetClass *somTD_WPDevBus_somGetClass;
}

#endif /* WPDevBus_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 WPDevBus
 */
class WPDevBus : public WPDevice
{
public:

// WPDevBus::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 (!_WPDevBus) WPDevBusNewClass(WPDevBus_MajorVersion,WPDevBus_MinorVersion);
   return (void*)
      SOM_Resolve(_WPDevBus,SOMClass,somNewNoInit)
         ((SOMClass *)((void*)_WPDevBus));
}

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

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

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

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

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


/*
 * Reintroduce inherited methods
 */

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



};   /* WPDevBus */



#endif       /* SOM_WPDevBus_xh */

#ifndef SOM_M_WPDevBus_xh
#define SOM_M_WPDevBus_xh

class M_WPDevBus;

/*
 *  New class methods section
 */

#define M_WPDevBus_MajorVersion 1
#define M_WPDevBus_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_WPDevBus_API
#define M_WPDevBus_API
/*
 * -- The Class API
 */

/*
 * Start of bindings for IDL types
 */


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

/*
 * -- M_WPDevBus is a metaclass for WPDevBus. Make sure WPDevBus is known.
 */
class WPDevBus;


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

/* The API to the M_WPDevBus class object, and the methods it introduces. */
SOMEXTERN struct M_WPDevBusClassDataStructure {
	SOMClass *classObject;
} SOMDLINK M_WPDevBusClassData;
#define _M_WPDevBus M_WPDevBusClassData.classObject

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

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

/*
 * -- Typedefs for Reintroduced Wrapper Methods
 */
typedef WPDevBus*   SOMLINK somTP_M_WPDevBus_somNew(M_WPDevBus *somSelf);
typedef somTP_M_WPDevBus_somNew *somTD_M_WPDevBus_somNew;
}

#endif /* M_WPDevBus_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_WPDevBus
 */
class M_WPDevBus : public M_WPDevice
{
/*
 *  New class methods section
 */
public:

// M_WPDevBus::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_WPDevBus) M_WPDevBusNewClass(M_WPDevBus_MajorVersion,M_WPDevBus_MinorVersion);
   return (void*)
      SOM_Resolve(_M_WPDevBus,SOMClass,somNewNoInit)
         ((SOMClass *)((void*)_M_WPDevBus));
}

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

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

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

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

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


/*
 * Reintroduce inherited methods
 */

/* method: somNew */
WPDevBus*  somNew()
{
   return SOM_ResolveD(this,M_WPDevBus,SOMClass,somNew)
	(this);
}



};   /* M_WPDevBus */



#endif       /* SOM_M_WPDevBus_xh */
