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

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


#ifndef SOM_WPPointer_xh
#define SOM_WPPointer_xh

class WPPointer;

#define WPPointer_MajorVersion 1
#define WPPointer_MinorVersion 2

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

/* C++ parent defs */
#ifndef SOM_WPDataFile_xh
#include <wpdataf.xh>
#endif

#ifndef WPPointer_API
#define WPPointer_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_WPFileSystem;
class M_WPDataFile;
class M_WPPointer;

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

/* A procedure to create the WPPointer Class */
class M_WPPointer;
SOMEXTERN M_WPPointer * SOMLINK WPPointerNewClass(
		integer4 majorVersion,
		integer4 minorVersion);

/* The API to the WPPointer class object, and the methods it introduces. */
SOMEXTERN struct WPPointerClassDataStructure {
	M_WPPointer *classObject;
} SOMDLINK WPPointerClassData;
#define _WPPointer WPPointerClassData.classObject

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

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

/*
 * -- Typedefs for Reintroduced Wrapper Methods
 */
typedef M_WPPointer*   SOMLINK somTP_WPPointer_somGetClass(WPPointer *somSelf);
typedef somTP_WPPointer_somGetClass *somTD_WPPointer_somGetClass;
}

#endif /* WPPointer_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 WPPointer
 */
class WPPointer : public WPDataFile
{
public:

// WPPointer::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 (!_WPPointer) WPPointerNewClass(WPPointer_MajorVersion,WPPointer_MinorVersion);
   return (void*)
      SOM_Resolve(_WPPointer,SOMClass,somNewNoInit)
         ((SOMClass *)((void*)_WPPointer));
}

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

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

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

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

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


/*
 * Reintroduce inherited methods
 */

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



};   /* WPPointer */



#endif       /* SOM_WPPointer_xh */

#ifndef SOM_M_WPPointer_xh
#define SOM_M_WPPointer_xh

class M_WPPointer;

#define M_WPPointer_MajorVersion 1
#define M_WPPointer_MinorVersion 2

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

/* C++ parent defs */
#ifndef SOM_M_WPDataFile_xh
#include <wpdataf.xh>
#endif

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

/*
 * Start of bindings for IDL types
 */


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

/*
 * -- M_WPPointer is a metaclass for WPPointer. Make sure WPPointer is known.
 */
class WPPointer;


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

/* The API to the M_WPPointer class object, and the methods it introduces. */
SOMEXTERN struct M_WPPointerClassDataStructure {
	SOMClass *classObject;
} SOMDLINK M_WPPointerClassData;
#define _M_WPPointer M_WPPointerClassData.classObject

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

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

/*
 * -- Typedefs for Reintroduced Wrapper Methods
 */
typedef WPPointer*   SOMLINK somTP_M_WPPointer_somNew(M_WPPointer *somSelf);
typedef somTP_M_WPPointer_somNew *somTD_M_WPPointer_somNew;
}

#endif /* M_WPPointer_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_WPPointer
 */
class M_WPPointer : public M_WPDataFile
{
public:

// M_WPPointer::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_WPPointer) M_WPPointerNewClass(M_WPPointer_MajorVersion,M_WPPointer_MinorVersion);
   return (void*)
      SOM_Resolve(_M_WPPointer,SOMClass,somNewNoInit)
         ((SOMClass *)((void*)_M_WPPointer));
}

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

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

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

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

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


/*
 * Reintroduce inherited methods
 */

/* method: somNew */
WPPointer*  somNew()
{
   return SOM_ResolveD(this,M_WPPointer,SOMClass,somNew)
	(this);
}



};   /* M_WPPointer */



#endif       /* SOM_M_WPPointer_xh */
