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

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


#ifndef SOM_WPClassManager_xh
#define SOM_WPClassManager_xh

class WPClassManager;

#define WPClassManager_MajorVersion 1
#define WPClassManager_MinorVersion 2

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

/* C++ parent defs */
#ifndef SOM_SOMClassMgr_xh
#include <somcm.xh>
#endif

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

/*
 * Start of bindings for IDL types
 */

class SOMClass;
class SOMObject;
class Repository;
class WPObject;

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

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

/* The API to the WPClassManager class object, and the methods it introduces. */
SOMEXTERN struct WPClassManagerClassDataStructure {
	SOMClass *classObject;
	somMToken wpClassManagerPrivate1;
	somMToken wpGetTrueClassName;
	somMToken wpReplacementIsInEffect;
	somMToken wpModuleForClass;
} SOMDLINK WPClassManagerClassData;
#define _WPClassManager WPClassManagerClassData.classObject

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

/*
 * -- Typedefs for WPClassManager Method Procedures
 */
SOMEXTERN {
typedef BOOL   SOMLINK somTP_WPClassManager_wpReplacementIsInEffect(WPClassManager *somSelf, 
		PSZ pszOldClass, 
		PSZ pszNewClass);
typedef somTP_WPClassManager_wpReplacementIsInEffect *somTD_WPClassManager_wpReplacementIsInEffect;
typedef PSZ   SOMLINK somTP_WPClassManager_wpModuleForClass(WPClassManager *somSelf, 
		PSZ pszClass);
typedef somTP_WPClassManager_wpModuleForClass *somTD_WPClassManager_wpModuleForClass;
typedef PSZ   SOMLINK somTP_WPClassManager_wpGetTrueClassName(WPClassManager *somSelf, 
		WPObject* Object);
typedef somTP_WPClassManager_wpGetTrueClassName *somTD_WPClassManager_wpGetTrueClassName;
}

#endif /* WPClassManager_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 WPClassManager
 */
class WPClassManager : public SOMClassMgr
{
public:

// WPClassManager::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 (!_WPClassManager) WPClassManagerNewClass(WPClassManager_MajorVersion,WPClassManager_MinorVersion);
   return (void*)
      SOM_Resolve(_WPClassManager,SOMClass,somNewNoInit)
         ((SOMClass *)((void*)_WPClassManager));
}

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

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

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

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

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


/* method: wpReplacementIsInEffect */
BOOL   wpReplacementIsInEffect(PSZ pszOldClass, 
		PSZ pszNewClass)
{
   return SOM_ResolveD(this,WPClassManager,WPClassManager,wpReplacementIsInEffect)
	(this,pszOldClass,pszNewClass);
}


/* method: wpModuleForClass */
PSZ   wpModuleForClass(PSZ pszClass)
{
   return SOM_ResolveD(this,WPClassManager,WPClassManager,wpModuleForClass)
	(this,pszClass);
}


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



};   /* WPClassManager */



#endif       /* SOM_WPClassManager_xh */
