
/*
 * This file was generated by the SOM Compiler.
 * FileName: wpclsmgr.xh.
 * Generated using:
 *     SOM Precompiler spc: 1.22
 *     SOM Emitter emitxh: 1.11
 */

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

#ifndef wpclsmgr_xh
#define wpclsmgr_xh
class WPClassManager;

#define WPClassManager_MajorVersion 1
#define WPClassManager_MinorVersion 2

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

/* C++ parent def */
#ifndef somcm_xh
#include <somcm.xh>
#endif

/*
 * Passthru lines: File: "C.xh", "after"
 */
#ifndef wpobject_xh
        #include "wpobject.xh"
    #endif

#ifndef WPClassManager_API
#define WPClassManager_API
/*
 * The Class API
 */

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

/* A macro to return the WPClassManager class object */
#define _WPClassManager ((SOMClass*)WPClassManagerClassData.classObject)

/* The static interface to WPClassManager and its instances */
SOMEXTERN struct WPClassManagerClassDataStructure {
	SOMClass *classObject;
	somMToken wpQueryClassReplaceList;
	somMToken wpGetTrueClassName;
} WPClassManagerClassData;

/*
 * -- Typedefs for Procedures that support WPClassManager Methods
 */
extern "C" {
typedef PSZ    (SOMLINK *somTD_WPClassManager_wpGetTrueClassName)(WPClassManager *somSelf,WPObject *Object);
}


#endif /* WPClassManager_API */


/*
 * -- The C++ Wrapper Class for WPClassManager
 */
class WPClassManager : public SOMClassMgr
{
public:

void *operator new(size_t size)
{
   (void) size;
   if (!WPClassManagerClassData.classObject) 
      WPClassManagerNewClass(WPClassManager_MajorVersion,WPClassManager_MinorVersion);
   return (void *)
      ((somTD_SOMClass_somNew)
      somResolve(SOM_TestCls((SOMAny *)(WPClassManagerClassData.classObject),
                             SOMClassClassData.classObject),
                 SOMClassClassData.somNew))
         ((SOMClass*)(WPClassManagerClassData.classObject));
}

void operator delete(void * obj)
{
   ((SOMObject *)obj)->somFree();
}

/* public method: wpGetTrueClassName */
PSZ    wpGetTrueClassName(WPObject *Object)
{
   return (PSZ) SOM_Resolve((SOMAny *)this,WPClassManager,wpGetTrueClassName)
	(this,Object);
}



};   /* WPClassManager */



#endif       /* wpclsmgr_xh */
