
/*
 * This file was generated by the SOM Compiler.
 * FileName: om.xh.
 * Generated using:
 *     SOM Precompiler somipc: 2.29.1.19
 *     SOM Emitter emitxh.dll: 2.108
 */

/*
 *    COMPONENT_NAME: somd
 * 
 *    ORIGINS: 27
 * 
 * 
 *     25H7912  (C)  COPYRIGHT International Business Machines Corp. 1992,1994,1996
 *    All Rights Reserved
 *    Licensed Materials - Property of IBM
 *    US Government Users Restricted Rights - Use, duplication or
 *    disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
 * 
 */


#ifndef SOM_ObjectMgr_xh
#define SOM_ObjectMgr_xh


/*
 *    IDL interface spec for generic Object Manager.
 * 
 *    The Object Manager (abstract) class provides a uniform abstraction
 *    for various sorts of object managers.  Object Request Brokers, persistent
 *    storage managers, and OODBMSs are examples of object managers.
 * 
 *    This is an abstract base class, which defines the "core" interface for
 *    an object manager.  The basic groups of methods are:
 * 
 *  	- object creation (basic)
 *  	- object identification & location/activation
 *  	- object release & destruction
 * 
 *    If a desired object cannot be mapped into the client's address space, the
 *    object manager is responsible for building a local "proxy" for the remote
 *    object.  The client invokes methods on the proxy, and the proxy should
 *    redispatch the requests to the remote object in an appropriate and
 *    transparent way.
 * 
 *    NOTE: Since this is only intended to be an abstract base class, there
 *    is no underlying implementation, and ObjectMgr objects should not actually
 *    be instantiated.
 * 
 */

#define ObjectMgr_MajorVersion 2
#define ObjectMgr_MinorVersion 2
class ObjectMgr;

/*
 *    IDL interface spec for generic Object Manager.
 * 
 *    The Object Manager (abstract) class provides a uniform abstraction
 *    for various sorts of object managers.  Object Request Brokers, persistent
 *    storage managers, and OODBMSs are examples of object managers.
 * 
 *    This is an abstract base class, which defines the "core" interface for
 *    an object manager.  The basic groups of methods are:
 * 
 *  	- object creation (basic)
 *  	- object identification & location/activation
 *  	- object release & destruction
 * 
 *    If a desired object cannot be mapped into the client's address space, the
 *    object manager is responsible for building a local "proxy" for the remote
 *    object.  The client invokes methods on the proxy, and the proxy should
 *    redispatch the requests to the remote object in an appropriate and
 *    transparent way.
 * 
 *    NOTE: Since this is only intended to be an abstract base class, there
 *    is no underlying implementation, and ObjectMgr objects should not actually
 *    be instantiated.
 * 
 */

/* Parents */
#ifndef SOM_SOMObject_xh
#ifdef SOMLOCALINCLUDES
#include "somobj.xh"
#else
#include <somobj.xh>
#endif
#endif

/* Metaclass */
#ifndef SOM_SOMMSingleInstance_xh
#ifdef SOMLOCALINCLUDES
#include "snglicls.xh"
#else
#include <snglicls.xh>
#endif
#endif

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

#ifndef ObjectMgr_API
#define ObjectMgr_API
/*
 * -- The Class API
 */
#ifndef SOM_IMPORTEXPORT_somd_om
#ifdef SOM_DLL_somd
	/* export semantics */
	#if defined(SOM_DEFFILE_somd)\
	||(defined(SOM_DEFFILE_BY_DEFAULT)&&!defined(SOM_NODEFFILE_somd))\
	|| !defined(SOM_Module_om_Source)
	#define SOM_IMPORTEXPORT_somd_om
	#else
	#define SOM_IMPORTEXPORT_somd_om SOMDLLEXPORT
	#endif
#else
	#define SOM_IMPORTEXPORT_somd_om SOMDLLIMPORT
#endif
#endif

/*
 * Start of bindings for IDL types
 */

class SOMClass;
class SOMObject;
class Container;

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

/*
 * A function to create the ObjectMgr class object...
 */
SOMEXTERN SOM_IMPORTEXPORT_somd_om SOMMSingleInstance * SOMLINK ObjectMgrNewClass(
		integer4 majorVersion,
		integer4 minorVersion);


/*
 * The API 2 ClassData Structures...
 */
class SOMMSingleInstance;
SOMEXTERN struct ObjectMgrClassDataStructure {
	SOMMSingleInstance *classObject;
	somMToken somdNewObject;
	somMToken somdGetIdFromObject;
	somMToken somdGetObjectFromId;
	somMToken somdReleaseObject;
	somMToken somdDestroyObject;
} SOMDLINK SOM_IMPORTEXPORT_somd_om ObjectMgrClassData;
SOMEXTERN struct ObjectMgrCClassDataStructure {
	som3ClassDetailsPtr    parentMtab;
	somDToken              instanceDataToken;
} SOMDLINK SOM_IMPORTEXPORT_somd_om ObjectMgrCClassData;


/*
 * Class Object and Method Token Macros
 */
#define _SOMCLASS_ObjectMgr (ObjectMgrClassData.classObject)
#ifndef SOMGD_ObjectMgr
    #if (defined(_ObjectMgr) || defined(__ObjectMgr))
        #undef _ObjectMgr
        #undef __ObjectMgr
        #define SOMGD_ObjectMgr 1
    #else
        #define _ObjectMgr _SOMCLASS_ObjectMgr
    #endif /* _ObjectMgr */
#endif /* SOMGD_ObjectMgr */
#define ObjectMgr_classObj _SOMCLASS_ObjectMgr
#define _SOMMTOKEN_ObjectMgr(method) ((somMToken)ObjectMgrClassData.method)

/*
 * -- Typedefs for ObjectMgr Method Procedures
 */
SOMEXTERN {
typedef SOMObject*   SOMLINK somTP_ObjectMgr_somdNewObject(ObjectMgr *somSelf, Environment *ev, 
		Identifier objclass, 
		string hints);
typedef somTP_ObjectMgr_somdNewObject *somTD_ObjectMgr_somdNewObject;
typedef string   SOMLINK somTP_ObjectMgr_somdGetIdFromObject(ObjectMgr *somSelf, Environment *ev, 
		SOMObject* obj);
typedef somTP_ObjectMgr_somdGetIdFromObject *somTD_ObjectMgr_somdGetIdFromObject;
typedef SOMObject*   SOMLINK somTP_ObjectMgr_somdGetObjectFromId(ObjectMgr *somSelf, Environment *ev, 
		string id);
typedef somTP_ObjectMgr_somdGetObjectFromId *somTD_ObjectMgr_somdGetObjectFromId;
typedef void   SOMLINK somTP_ObjectMgr_somdReleaseObject(ObjectMgr *somSelf, Environment *ev, 
		SOMObject* obj);
typedef somTP_ObjectMgr_somdReleaseObject *somTD_ObjectMgr_somdReleaseObject;
typedef void   SOMLINK somTP_ObjectMgr_somdDestroyObject(ObjectMgr *somSelf, Environment *ev, 
		SOMObject* obj);
typedef somTP_ObjectMgr_somdDestroyObject *somTD_ObjectMgr_somdDestroyObject;

/*
 * -- Typedefs for Reintroduced Wrapper Methods
 */
typedef void   SOMLINK somTP_ObjectMgr_somDefaultInit(ObjectMgr *somSelf, 
		som3InitCtrl* ctrl);
typedef somTP_ObjectMgr_somDefaultInit *somTD_ObjectMgr_somDefaultInit;
typedef void   SOMLINK somTP_ObjectMgr_somDestruct(ObjectMgr *somSelf, 
		octet doFree, 
		som3DestructCtrl* ctrl);
typedef somTP_ObjectMgr_somDestruct *somTD_ObjectMgr_somDestruct;
typedef void   SOMLINK somTP_ObjectMgr_somDefaultCopyInit(ObjectMgr *somSelf, 
		som3InitCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_ObjectMgr_somDefaultCopyInit *somTD_ObjectMgr_somDefaultCopyInit;
typedef ObjectMgr*   SOMLINK somTP_ObjectMgr_somDefaultAssign(ObjectMgr *somSelf, 
		som3AssignCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_ObjectMgr_somDefaultAssign *somTD_ObjectMgr_somDefaultAssign;
typedef void   SOMLINK somTP_ObjectMgr_somDefaultConstCopyInit(ObjectMgr *somSelf, 
		som3InitCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_ObjectMgr_somDefaultConstCopyInit *somTD_ObjectMgr_somDefaultConstCopyInit;
typedef void   SOMLINK somTP_ObjectMgr_somDefaultVCopyInit(ObjectMgr *somSelf, 
		som3InitCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_ObjectMgr_somDefaultVCopyInit *somTD_ObjectMgr_somDefaultVCopyInit;
typedef void   SOMLINK somTP_ObjectMgr_somDefaultConstVCopyInit(ObjectMgr *somSelf, 
		som3InitCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_ObjectMgr_somDefaultConstVCopyInit *somTD_ObjectMgr_somDefaultConstVCopyInit;
typedef ObjectMgr*   SOMLINK somTP_ObjectMgr_somDefaultConstAssign(ObjectMgr *somSelf, 
		som3AssignCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_ObjectMgr_somDefaultConstAssign *somTD_ObjectMgr_somDefaultConstAssign;
typedef ObjectMgr*   SOMLINK somTP_ObjectMgr_somDefaultVAssign(ObjectMgr *somSelf, 
		som3AssignCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_ObjectMgr_somDefaultVAssign *somTD_ObjectMgr_somDefaultVAssign;
typedef ObjectMgr*   SOMLINK somTP_ObjectMgr_somDefaultConstVAssign(ObjectMgr *somSelf, 
		som3AssignCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_ObjectMgr_somDefaultConstVAssign *somTD_ObjectMgr_somDefaultConstVAssign;
typedef void   SOMLINK somTP_ObjectMgr_somInit(ObjectMgr *somSelf);
typedef somTP_ObjectMgr_somInit *somTD_ObjectMgr_somInit;
typedef void   SOMLINK somTP_ObjectMgr_somUninit(ObjectMgr *somSelf);
typedef somTP_ObjectMgr_somUninit *somTD_ObjectMgr_somUninit;
typedef void   SOMLINK somTP_ObjectMgr_somFree(ObjectMgr *somSelf);
typedef somTP_ObjectMgr_somFree *somTD_ObjectMgr_somFree;
typedef SOMMSingleInstance*   SOMLINK somTP_ObjectMgr_somGetClass(ObjectMgr *somSelf);
typedef somTP_ObjectMgr_somGetClass *somTD_ObjectMgr_somGetClass;
typedef string   SOMLINK somTP_ObjectMgr_somGetClassName(ObjectMgr *somSelf);
typedef somTP_ObjectMgr_somGetClassName *somTD_ObjectMgr_somGetClassName;
typedef long   SOMLINK somTP_ObjectMgr_somGetSize(ObjectMgr *somSelf);
typedef somTP_ObjectMgr_somGetSize *somTD_ObjectMgr_somGetSize;
typedef boolean   SOMLINK somTP_ObjectMgr_somIsA(ObjectMgr *somSelf, 
		SOMClass* aClassObj);
typedef somTP_ObjectMgr_somIsA *somTD_ObjectMgr_somIsA;
typedef boolean   SOMLINK somTP_ObjectMgr_somIsInstanceOf(ObjectMgr *somSelf, 
		SOMClass* aClassObj);
typedef somTP_ObjectMgr_somIsInstanceOf *somTD_ObjectMgr_somIsInstanceOf;
typedef boolean   SOMLINK somTP_ObjectMgr_somRespondsTo(ObjectMgr *somSelf, 
		somId mId);
typedef somTP_ObjectMgr_somRespondsTo *somTD_ObjectMgr_somRespondsTo;
typedef boolean   SOMLINK somTP_ObjectMgr_somDispatch(ObjectMgr *somSelf, 
		somToken* retValue, 
		somId methodId, 
		va_list ap);
typedef somTP_ObjectMgr_somDispatch *somTD_ObjectMgr_somDispatch;
typedef boolean   SOMLINK somTP_ObjectMgr_somClassDispatch(ObjectMgr *somSelf, 
		SOMClass* clsObj, 
		somToken* retValue, 
		somId methodId, 
		va_list ap);
typedef somTP_ObjectMgr_somClassDispatch *somTD_ObjectMgr_somClassDispatch;
typedef boolean   SOMLINK somTP_ObjectMgr_somCastObj(ObjectMgr *somSelf, 
		SOMClass* castedCls);
typedef somTP_ObjectMgr_somCastObj *somTD_ObjectMgr_somCastObj;
typedef boolean   SOMLINK somTP_ObjectMgr_somResetObj(ObjectMgr *somSelf);
typedef somTP_ObjectMgr_somResetObj *somTD_ObjectMgr_somResetObj;
typedef ObjectMgr*   SOMLINK somTP_ObjectMgr_somPrintSelf(ObjectMgr *somSelf);
typedef somTP_ObjectMgr_somPrintSelf *somTD_ObjectMgr_somPrintSelf;
typedef void   SOMLINK somTP_ObjectMgr_somDumpSelf(ObjectMgr *somSelf, 
		long level);
typedef somTP_ObjectMgr_somDumpSelf *somTD_ObjectMgr_somDumpSelf;
typedef void   SOMLINK somTP_ObjectMgr_somDumpSelfInt(ObjectMgr *somSelf, 
		long level);
typedef somTP_ObjectMgr_somDumpSelfInt *somTD_ObjectMgr_somDumpSelfInt;
}

#endif /* ObjectMgr_API */


/*
 * -- The C++ Wrapper Class for ObjectMgr
 */
class ObjectMgr : public SOMObject
{
/*
 *    IDL interface spec for generic Object Manager.
 * 
 *    The Object Manager (abstract) class provides a uniform abstraction
 *    for various sorts of object managers.  Object Request Brokers, persistent
 *    storage managers, and OODBMSs are examples of object managers.
 * 
 *    This is an abstract base class, which defines the "core" interface for
 *    an object manager.  The basic groups of methods are:
 * 
 *  	- object creation (basic)
 *  	- object identification & location/activation
 *  	- object release & destruction
 * 
 *    If a desired object cannot be mapped into the client's address space, the
 *    object manager is responsible for building a local "proxy" for the remote
 *    object.  The client invokes methods on the proxy, and the proxy should
 *    redispatch the requests to the remote object in an appropriate and
 *    transparent way.
 * 
 *    NOTE: Since this is only intended to be an abstract base class, there
 *    is no underlying implementation, and ObjectMgr objects should not actually
 *    be instantiated.
 * 
 */
public:

// ObjectMgr::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 (!_ObjectMgr) ObjectMgrNewClass(ObjectMgr_MajorVersion,ObjectMgr_MinorVersion);
   return (void*)
   (((somTD_SOMClass_somNewNoInit)(SOMClassClassData.somNewNoInit))
         ((SOMClass *)((void*)_ObjectMgr)));
}

// ObjectMgr::delete uses somFree.
void operator delete(void * obj)
{
   if (obj && *(void**)obj)
      ((SOMObject*)obj)->somFree();
}

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

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

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


/* method: somdNewObject */
SOMObject*   somdNewObject(Environment *ev, 
		Identifier objclass, 
		string hints)
{
/*
 *  Returns a new object of the named class.  This is a "basic" creation
 *  method, where the decisions about where and how to create the object
 *  are mostly left up to the Object Manager.  However, the Object Manager
 *  may optionally define creation "hints" which the client may specify in
 *  this call.
 * 
 *  OWNERSHIP of returned object is transferred to the caller.
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_ObjectMgr),
	 ((somTD_ObjectMgr_somdNewObject)(ObjectMgrClassData.somdNewObject))(((ObjectMgr *)((void *)this)), ev,objclass,hints)
	);
}


/* method: somdGetIdFromObject */
string   somdGetIdFromObject(Environment *ev, 
		SOMObject* obj)
{
/*
 *  Returns a external id for an object managed by this Object Manager.
 *  The id is unambiguous -- it always refers to the same object (as long
 *  as the object exists).
 * 
 *  OWNERSHIP of returned id string is transferred to the caller.
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_ObjectMgr),
	 ((somTD_ObjectMgr_somdGetIdFromObject)(ObjectMgrClassData.somdGetIdFromObject))(((ObjectMgr *)((void *)this)), ev,obj)
	);
}


/* method: somdGetObjectFromId */
SOMObject*   somdGetObjectFromId(Environment *ev, 
		string id)
{
/*
 *  Finds and/or activates an object implemented by this Object Manager,
 *  given its id.
 * 
 *  OWNERSHIP of returned object is transferred to the caller.
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_ObjectMgr),
	 ((somTD_ObjectMgr_somdGetObjectFromId)(ObjectMgrClassData.somdGetObjectFromId))(((ObjectMgr *)((void *)this)), ev,id)
	);
}


/* method: somdReleaseObject */
void   somdReleaseObject(Environment *ev, 
		SOMObject* obj)
{
/*
 *  Indicates that the client has finished using the object, and the
 *  "connection" to the object, if any, can be released.
 */
   	(
	 SOM_TestCls(this,_SOMCLASS_ObjectMgr),
	 ((somTD_ObjectMgr_somdReleaseObject)(ObjectMgrClassData.somdReleaseObject))(((ObjectMgr *)((void *)this)), ev,obj)
	);
}


/* method: somdDestroyObject */
void   somdDestroyObject(Environment *ev, 
		SOMObject* obj)
{
/*
 *  Causes the specified object to be destroyed.  (There is an implicit
 *  somoReleaseObject call made.)
 */
   	(
	 SOM_TestCls(this,_SOMCLASS_ObjectMgr),
	 ((somTD_ObjectMgr_somdDestroyObject)(ObjectMgrClassData.somdDestroyObject))(((ObjectMgr *)((void *)this)), ev,obj)
	);
}


/*
 * Reintroduce inherited methods
 */

/* initializer method: somDefaultInit */
void   somDefaultInit(som3InitCtrl* ctrl)
{
/*
 *  A default initializer for a SOM object. Passing a null ctrl
 *  indicates to the receiver that its class is the class of the
 *  object being initialized, whereby the initializer will determine
 *  an appropriate control structure.
 */
   	(
	 SOM_TestCls(this,_SOMCLASS_SOMObject),
	 ((somTD_ObjectMgr_somDefaultInit)(SOMObjectClassData.somDefaultInit))(((ObjectMgr *)((void *)this)),ctrl)
	);
}


/* method: somDestruct */
void   somDestruct(octet doFree, 
		som3DestructCtrl* ctrl)
{
/*
 *  The default destructor for a SOM object. A nonzero <doFree>
 *  indicates that the object storage should be freed by the
 *  object's class (via somDeallocate) after uninitialization.
 *  As with somDefaultInit, a null ctrl can be passed.
 */
   	(
	 SOM_TestCls(this,_SOMCLASS_SOMObject),
	 ((somTD_ObjectMgr_somDestruct)(SOMObjectClassData.somDestruct))(((ObjectMgr *)((void *)this)),doFree,ctrl)
	);
}


/* initializer method: somDefaultCopyInit */
void   somDefaultCopyInit(som3InitCtrl* ctrl, 
		SOMObject* fromObj)
{
/*
 *  A default copy constructor. Use this to make copies of objects for
 *  calling methods with "by-value" argument semantics.
 */
   	(
	 SOM_TestCls(this,_SOMCLASS_SOMObject),
	 ((somTD_ObjectMgr_somDefaultCopyInit)(SOMObjectClassData.somDefaultCopyInit))(((ObjectMgr *)((void *)this)),ctrl,fromObj)
	);
}


/* method: somDefaultAssign */
ObjectMgr*  somDefaultAssign(som3AssignCtrl* ctrl, 
		SOMObject* fromObj)
{
/*
 *  A default assignment operator. Use this to "assign" the state of one
 *  object to another.
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_SOMObject),
	 ((somTD_ObjectMgr_somDefaultAssign)(SOMObjectClassData.somDefaultAssign))(((ObjectMgr *)((void *)this)),ctrl,fromObj)
	);
}


/* initializer method: somDefaultConstCopyInit */
void   somDefaultConstCopyInit(som3InitCtrl* ctrl, 
		SOMObject* fromObj)
{
/*
 *  A default copy constructor that uses a const fromObj.
 */
   	(
	 SOM_TestCls(this,_SOMCLASS_SOMObject),
	 ((somTD_ObjectMgr_somDefaultConstCopyInit)(SOMObjectClassData.somDefaultConstCopyInit))(((ObjectMgr *)((void *)this)),ctrl,fromObj)
	);
}


/* initializer method: somDefaultVCopyInit */
void   somDefaultVCopyInit(som3InitCtrl* ctrl, 
		SOMObject* fromObj)
{
/*
 *  A default copy constructor that uses a volatile fromObj.
 */
   	(
	 SOM_TestCls(this,_SOMCLASS_SOMObject),
	 ((somTD_ObjectMgr_somDefaultVCopyInit)(SOMObjectClassData.somDefaultVCopyInit))(((ObjectMgr *)((void *)this)),ctrl,fromObj)
	);
}


/* initializer method: somDefaultConstVCopyInit */
void   somDefaultConstVCopyInit(som3InitCtrl* ctrl, 
		SOMObject* fromObj)
{
/*
 *  A default copy constructor that uses a const volatile fromObj.
 */
   	(
	 SOM_TestCls(this,_SOMCLASS_SOMObject),
	 ((somTD_ObjectMgr_somDefaultConstVCopyInit)(SOMObjectClassData.somDefaultConstVCopyInit))(((ObjectMgr *)((void *)this)),ctrl,fromObj)
	);
}


/* method: somDefaultConstAssign */
ObjectMgr*  somDefaultConstAssign(som3AssignCtrl* ctrl, 
		SOMObject* fromObj)
{
/*
 *  A default assignment operator that uses a const fromObj.
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_SOMObject),
	 ((somTD_ObjectMgr_somDefaultConstAssign)(SOMObjectClassData.somDefaultConstAssign))(((ObjectMgr *)((void *)this)),ctrl,fromObj)
	);
}


/* method: somDefaultVAssign */
ObjectMgr*  somDefaultVAssign(som3AssignCtrl* ctrl, 
		SOMObject* fromObj)
{
/*
 *  A default assignment operator that uses a volatile fromObj.
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_SOMObject),
	 ((somTD_ObjectMgr_somDefaultVAssign)(SOMObjectClassData.somDefaultVAssign))(((ObjectMgr *)((void *)this)),ctrl,fromObj)
	);
}


/* method: somDefaultConstVAssign */
ObjectMgr*  somDefaultConstVAssign(som3AssignCtrl* ctrl, 
		SOMObject* fromObj)
{
/*
 *  A default assignment operator that uses a const volatile fromObj.
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_SOMObject),
	 ((somTD_ObjectMgr_somDefaultConstVAssign)(SOMObjectClassData.somDefaultConstVAssign))(((ObjectMgr *)((void *)this)),ctrl,fromObj)
	);
}


/* method: somInit */
void   somInit()
{
/*
 *  Obsolete but still supported. Override somDefaultInit instead of somInit.
 */
   	(
	 SOM_TestCls(this,_SOMCLASS_SOMObject),
	 ((somTD_ObjectMgr_somInit)(SOMObjectClassData.somInit))(((ObjectMgr *)((void *)this)))
	);
}


/* method: somUninit */
void   somUninit()
{
/*
 *  Obsolete but still supported. Override somDestruct instead of somUninit.
 */
   	(
	 SOM_TestCls(this,_SOMCLASS_SOMObject),
	 ((somTD_ObjectMgr_somUninit)(SOMObjectClassData.somUninit))(((ObjectMgr *)((void *)this)))
	);
}


/* method: somFree */
void   somFree()
{
/*
 *  The default implementation just calls somDestruct.
 */
   	(
	 SOM_TestCls(this,_SOMCLASS_SOMObject),
	 ((somTD_ObjectMgr_somFree)(SOMObjectClassData.somFree))(((ObjectMgr *)((void *)this)))
	);
}


/* method: somGetClass */
SOMMSingleInstance*  somGetClass()
{
/*
 *  Return the receiver's class.
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_SOMObject),
	 ((somTD_ObjectMgr_somGetClass)(SOMObjectClassData.somGetClass))(((ObjectMgr *)((void *)this)))
	);
}


/* method: somGetClassName */
string   somGetClassName()
{
/*
 *  Return the name of the receiver's class.
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_SOMObject),
	 ((somTD_ObjectMgr_somGetClassName)(SOMObjectClassData.somGetClassName))(((ObjectMgr *)((void *)this)))
	);
}


/* method: somGetSize */
long   somGetSize()
{
/*
 *  Return the size of the receiver.
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_SOMObject),
	 ((somTD_ObjectMgr_somGetSize)(SOMObjectClassData.somGetSize))(((ObjectMgr *)((void *)this)))
	);
}


/* method: somIsA */
boolean   somIsA(SOMClass* aClassObj)
{
/*
 *  Returns 1 (true) if the receiver responds to methods
 *  introduced by <aClassObj>, and 0 (false) otherwise.
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_SOMObject),
	 ((somTD_ObjectMgr_somIsA)(SOMObjectClassData.somIsA))(((ObjectMgr *)((void *)this)),aClassObj)
	);
}


/* method: somIsInstanceOf */
boolean   somIsInstanceOf(SOMClass* aClassObj)
{
/*
 *  Returns 1 (true) if the receiver is an instance of
 *  <aClassObj> and 0 (false) otherwise.
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_SOMObject),
	 ((somTD_ObjectMgr_somIsInstanceOf)(SOMObjectClassData.somIsInstanceOf))(((ObjectMgr *)((void *)this)),aClassObj)
	);
}


/* method: somRespondsTo */
boolean   somRespondsTo(somId mId)
{
/*
 *  Returns 1 (true) if the indicated method can be invoked
 *  on the receiver and 0 (false) otherwise.
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_SOMObject),
	 ((somTD_ObjectMgr_somRespondsTo)(SOMObjectClassData.somRespondsTo))(((ObjectMgr *)((void *)this)),mId)
	);
}


/* va_list method: somDispatch */

/*
 *  This method provides a generic, class-specific dispatch mechanism.
 *  It accepts as input <retValue> a pointer to the memory area to be
 *  loaded with the result of dispatching the method indicated by
 *  <methodId> using the arguments in <ap>. <ap> contains the object
 *  on which the method is to be invoked as the first argument.
 * 
 *  Default redispatch stubs invoke this method.
 */
/* the va_list invocation form */
boolean   SOMObject_somDispatch(somToken* retValue, 
		somId methodId, 
		va_list ap)
{   return 	(
	 SOM_TestCls(this,_SOMCLASS_SOMObject),
	 ((somTD_ObjectMgr_somDispatch)(SOMObjectClassData.somDispatch))(((ObjectMgr *)((void *)this)),retValue,methodId,ap)
	);
}

/* the varargs invocation form */
boolean   somDispatch(somToken* retValue, 
		somId methodId, 
		...)
{
/*
 *  This method provides a generic, class-specific dispatch mechanism.
 *  It accepts as input <retValue> a pointer to the memory area to be
 *  loaded with the result of dispatching the method indicated by
 *  <methodId> using the arguments in <ap>. <ap> contains the object
 *  on which the method is to be invoked as the first argument.
 * 
 *  Default redispatch stubs invoke this method.
 */
   va_list ap;
   va_start(ap, methodId);
   boolean __somResult = 
      	(
	 SOM_TestCls(this,_SOMCLASS_SOMObject),
	 ((somTD_ObjectMgr_somDispatch)(SOMObjectClassData.somDispatch))(((ObjectMgr *)((void *)this)),retValue,methodId,ap)
	);
   va_end(ap);
   return __somResult;
}


/* va_list method: somClassDispatch */

/*
 *  Like somDispatch, but method resolution for static methods is done
 *  according to the clsObj instance method table.
 */
/* the va_list invocation form */
boolean   SOMObject_somClassDispatch(SOMClass* clsObj, 
		somToken* retValue, 
		somId methodId, 
		va_list ap)
{   return 	(
	 SOM_TestCls(this,_SOMCLASS_SOMObject),
	 ((somTD_ObjectMgr_somClassDispatch)(SOMObjectClassData.somClassDispatch))(((ObjectMgr *)((void *)this)),clsObj,retValue,methodId,ap)
	);
}

/* the varargs invocation form */
boolean   somClassDispatch(SOMClass* clsObj, 
		somToken* retValue, 
		somId methodId, 
		...)
{
/*
 *  Like somDispatch, but method resolution for static methods is done
 *  according to the clsObj instance method table.
 */
   va_list ap;
   va_start(ap, methodId);
   boolean __somResult = 
      	(
	 SOM_TestCls(this,_SOMCLASS_SOMObject),
	 ((somTD_ObjectMgr_somClassDispatch)(SOMObjectClassData.somClassDispatch))(((ObjectMgr *)((void *)this)),clsObj,retValue,methodId,ap)
	);
   va_end(ap);
   return __somResult;
}


/* method: somCastObj */
boolean   somCastObj(SOMClass* castedCls)
{
/*
 *  Changes the behavior of the target object to that implemented
 *  by castedCls. This is possible when all concrete data in castedCls
 *  is also concrete in the true class of the target object.
 *  Returns true (1) on success, and false (0) otherwise.
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_SOMObject),
	 ((somTD_ObjectMgr_somCastObj)(SOMObjectClassData.somCastObj))(((ObjectMgr *)((void *)this)),castedCls)
	);
}


/* method: somResetObj */
boolean   somResetObj()
{
/*
 *  reset an object to its true class. Returns true always.
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_SOMObject),
	 ((somTD_ObjectMgr_somResetObj)(SOMObjectClassData.somResetObj))(((ObjectMgr *)((void *)this)))
	);
}


/* method: somPrintSelf */
ObjectMgr*  somPrintSelf()
{
/*
 *  Uses <SOMOutCharRoutine> to write a brief string with identifying
 *  information about this object.  The default implementation just gives
 *  the object's class name and its address in memory.
 *  <self> is returned.
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_SOMObject),
	 ((somTD_ObjectMgr_somPrintSelf)(SOMObjectClassData.somPrintSelf))(((ObjectMgr *)((void *)this)))
	);
}


/* method: somDumpSelf */
void   somDumpSelf(long level)
{
/*
 *  Uses <SOMOutCharRoutine> to write a detailed description of this object
 *  and its current state.
 * 
 *  <level> indicates the nesting level for describing compound objects
 *  it must be greater than or equal to zero.  All lines in the
 *  description will be preceeded by <2*level> spaces.
 * 
 *  This routine only actually writes the data that concerns the object
 *  as a whole, such as class, and uses <somDumpSelfInt> to describe
 *  the object's current state.  This approach allows readable
 *  descriptions of compound objects to be constructed.
 * 
 *  Generally it is not necessary to override this method, if it is
 *  overriden it generally must be completely replaced.
 */
   	(
	 SOM_TestCls(this,_SOMCLASS_SOMObject),
	 ((somTD_ObjectMgr_somDumpSelf)(SOMObjectClassData.somDumpSelf))(((ObjectMgr *)((void *)this)),level)
	);
}


/* method: somDumpSelfInt */
void   somDumpSelfInt(long level)
{
/*
 *  Uses <SOMOutCharRoutine> to write in the current state of this object.
 *  Generally this method will need to be overridden.  When overriding
 *  it, begin by calling the parent class form of this method and then
 *  write in a description of your class's instance data. This will
 *  result in a description of all the object's instance data going
 *  from its root ancestor class to its specific class.
 */
   	(
	 SOM_TestCls(this,_SOMCLASS_SOMObject),
	 ((somTD_ObjectMgr_somDumpSelfInt)(SOMObjectClassData.somDumpSelfInt))(((ObjectMgr *)((void *)this)),level)
	);
}



};   /* ObjectMgr */



#endif       /* SOM_ObjectMgr_xh */
