
/*
 * This file was generated by the SOM Compiler.
 * FileName: somdom.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.
 * 
 * 
 *    IDL interface spec for DSOM Distributed Object Manager.
 * 
 *    This is a subclass of the abstract ObjectMgr class.
 *    All ObjectMgr methods are implemented with DSOM calls.
 */


#ifndef SOM_SOMDObjectMgr_xh
#define SOM_SOMDObjectMgr_xh


/*
 *  In addition to the basic ObjectMgr interface, the DSOM ObjectMgr
 *  defines the following methods to find remote server objects:
 */

#define SOMDObjectMgr_MajorVersion 2
#define SOMDObjectMgr_MinorVersion 2
class SOMDObjectMgr;

/*
 *  In addition to the basic ObjectMgr interface, the DSOM ObjectMgr
 *  defines the following methods to find remote server objects:
 */

/* Parents */
#ifndef SOM_ObjectMgr_xh
#ifdef SOMLOCALINCLUDES
#include "om.xh"
#else
#include <om.xh>
#endif
#endif

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

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

/*
 * Start of bindings for IDL types
 */

class SOMClass;
class SOMObject;
class Container;
class SOMDServer;
#ifndef _IDL_SEQUENCE_SOMDServer_defined
#define _IDL_SEQUENCE_SOMDServer_defined
typedef struct {
    unsigned long _maximum;
    unsigned long _length;
    SOMDServer **_buffer;
} _IDL_SEQUENCE_SOMDServer;
#endif /* _IDL_SEQUENCE_SOMDServer_defined */ 

#ifndef SOM_DONT_USE_SHORT_NAMES
#endif /* SOM_DONT_USE_SHORT_NAMES */

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

/*
 * Passthru lines: File: "C.xh", "after"
 */

class SOMDObjectMgr;
#ifndef SOM_IMPORTEXPORT_somd
#if defined(_WIN32) && !defined(SOM_DLL_somd)
#define SOM_IMPORTEXPORT_somd SOMDLLIMPORT
#else
#define SOM_IMPORTEXPORT_somd
#endif
#endif
SOMEXTERN SOM_IMPORTEXPORT_somd SOMDObjectMgr * SOMDLINK SOMD_ObjectMgr;

#include <somdserv.xh>


/*
 * A function to create the SOMDObjectMgr class object...
 */
SOMEXTERN SOM_IMPORTEXPORT_somd_somdom SOMClass * SOMLINK SOMDObjectMgrNewClass(
		integer4 majorVersion,
		integer4 minorVersion);


/*
 * The API 2 ClassData Structures...
 */
SOMEXTERN struct SOMDObjectMgrClassDataStructure {
	SOMClass *classObject;
	somMToken somdFindServer;
	somMToken somdFindServerByName;
	somMToken somdFindServersByClass;
	somMToken somdFindAnyServerByClass;
	somMToken _get_somd21somFree;
	somMToken _set_somd21somFree;
} SOMDLINK SOM_IMPORTEXPORT_somd_somdom SOMDObjectMgrClassData;
SOMEXTERN struct SOMDObjectMgrCClassDataStructure {
	som3ClassDetailsPtr    parentMtab;
	somDToken              instanceDataToken;
} SOMDLINK SOM_IMPORTEXPORT_somd_somdom SOMDObjectMgrCClassData;


/*
 * Class Object and Method Token Macros
 */
#define _SOMCLASS_SOMDObjectMgr (SOMDObjectMgrClassData.classObject)
#ifndef SOMGD_SOMDObjectMgr
    #if (defined(_SOMDObjectMgr) || defined(__SOMDObjectMgr))
        #undef _SOMDObjectMgr
        #undef __SOMDObjectMgr
        #define SOMGD_SOMDObjectMgr 1
    #else
        #define _SOMDObjectMgr _SOMCLASS_SOMDObjectMgr
    #endif /* _SOMDObjectMgr */
#endif /* SOMGD_SOMDObjectMgr */
#define SOMDObjectMgr_classObj _SOMCLASS_SOMDObjectMgr
#define _SOMMTOKEN_SOMDObjectMgr(method) ((somMToken)SOMDObjectMgrClassData.method)

/*
 * -- Typedefs for SOMDObjectMgr Method Procedures
 */
SOMEXTERN {
typedef SOMDServer*   SOMLINK somTP_SOMDObjectMgr_somdFindServer(SOMDObjectMgr *somSelf, Environment *ev, 
		ImplId serverid);
typedef somTP_SOMDObjectMgr_somdFindServer *somTD_SOMDObjectMgr_somdFindServer;
typedef SOMDServer*   SOMLINK somTP_SOMDObjectMgr_somdFindServerByName(SOMDObjectMgr *somSelf, Environment *ev, 
		string servername);
typedef somTP_SOMDObjectMgr_somdFindServerByName *somTD_SOMDObjectMgr_somdFindServerByName;
typedef _IDL_SEQUENCE_SOMDServer   SOMLINK somTP_SOMDObjectMgr_somdFindServersByClass(SOMDObjectMgr *somSelf, Environment *ev, 
		Identifier objclass);
typedef somTP_SOMDObjectMgr_somdFindServersByClass *somTD_SOMDObjectMgr_somdFindServersByClass;
typedef SOMDServer*   SOMLINK somTP_SOMDObjectMgr_somdFindAnyServerByClass(SOMDObjectMgr *somSelf, Environment *ev, 
		Identifier objclass);
typedef somTP_SOMDObjectMgr_somdFindAnyServerByClass *somTD_SOMDObjectMgr_somdFindAnyServerByClass;
typedef boolean   SOMLINK somTP_SOMDObjectMgr__get_somd21somFree(SOMDObjectMgr *somSelf, Environment *ev);
typedef somTP_SOMDObjectMgr__get_somd21somFree *somTD_SOMDObjectMgr__get_somd21somFree;
typedef void   SOMLINK somTP_SOMDObjectMgr__set_somd21somFree(SOMDObjectMgr *somSelf, Environment *ev, 
		boolean somd21somFree);
typedef somTP_SOMDObjectMgr__set_somd21somFree *somTD_SOMDObjectMgr__set_somd21somFree;

/*
 * -- Typedefs for Reintroduced Wrapper Methods
 */
typedef SOMObject*   SOMLINK somTP_SOMDObjectMgr_somdNewObject(SOMDObjectMgr *somSelf, Environment *ev, 
		Identifier objclass, 
		string hints);
typedef somTP_SOMDObjectMgr_somdNewObject *somTD_SOMDObjectMgr_somdNewObject;
typedef string   SOMLINK somTP_SOMDObjectMgr_somdGetIdFromObject(SOMDObjectMgr *somSelf, Environment *ev, 
		SOMObject* obj);
typedef somTP_SOMDObjectMgr_somdGetIdFromObject *somTD_SOMDObjectMgr_somdGetIdFromObject;
typedef SOMObject*   SOMLINK somTP_SOMDObjectMgr_somdGetObjectFromId(SOMDObjectMgr *somSelf, Environment *ev, 
		string id);
typedef somTP_SOMDObjectMgr_somdGetObjectFromId *somTD_SOMDObjectMgr_somdGetObjectFromId;
typedef void   SOMLINK somTP_SOMDObjectMgr_somdReleaseObject(SOMDObjectMgr *somSelf, Environment *ev, 
		SOMObject* obj);
typedef somTP_SOMDObjectMgr_somdReleaseObject *somTD_SOMDObjectMgr_somdReleaseObject;
typedef void   SOMLINK somTP_SOMDObjectMgr_somdDestroyObject(SOMDObjectMgr *somSelf, Environment *ev, 
		SOMObject* obj);
typedef somTP_SOMDObjectMgr_somdDestroyObject *somTD_SOMDObjectMgr_somdDestroyObject;
typedef void   SOMLINK somTP_SOMDObjectMgr_somDefaultInit(SOMDObjectMgr *somSelf, 
		som3InitCtrl* ctrl);
typedef somTP_SOMDObjectMgr_somDefaultInit *somTD_SOMDObjectMgr_somDefaultInit;
typedef void   SOMLINK somTP_SOMDObjectMgr_somDestruct(SOMDObjectMgr *somSelf, 
		octet doFree, 
		som3DestructCtrl* ctrl);
typedef somTP_SOMDObjectMgr_somDestruct *somTD_SOMDObjectMgr_somDestruct;
typedef void   SOMLINK somTP_SOMDObjectMgr_somDefaultCopyInit(SOMDObjectMgr *somSelf, 
		som3InitCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_SOMDObjectMgr_somDefaultCopyInit *somTD_SOMDObjectMgr_somDefaultCopyInit;
typedef SOMDObjectMgr*   SOMLINK somTP_SOMDObjectMgr_somDefaultAssign(SOMDObjectMgr *somSelf, 
		som3AssignCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_SOMDObjectMgr_somDefaultAssign *somTD_SOMDObjectMgr_somDefaultAssign;
typedef void   SOMLINK somTP_SOMDObjectMgr_somDefaultConstCopyInit(SOMDObjectMgr *somSelf, 
		som3InitCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_SOMDObjectMgr_somDefaultConstCopyInit *somTD_SOMDObjectMgr_somDefaultConstCopyInit;
typedef void   SOMLINK somTP_SOMDObjectMgr_somDefaultVCopyInit(SOMDObjectMgr *somSelf, 
		som3InitCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_SOMDObjectMgr_somDefaultVCopyInit *somTD_SOMDObjectMgr_somDefaultVCopyInit;
typedef void   SOMLINK somTP_SOMDObjectMgr_somDefaultConstVCopyInit(SOMDObjectMgr *somSelf, 
		som3InitCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_SOMDObjectMgr_somDefaultConstVCopyInit *somTD_SOMDObjectMgr_somDefaultConstVCopyInit;
typedef SOMDObjectMgr*   SOMLINK somTP_SOMDObjectMgr_somDefaultConstAssign(SOMDObjectMgr *somSelf, 
		som3AssignCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_SOMDObjectMgr_somDefaultConstAssign *somTD_SOMDObjectMgr_somDefaultConstAssign;
typedef SOMDObjectMgr*   SOMLINK somTP_SOMDObjectMgr_somDefaultVAssign(SOMDObjectMgr *somSelf, 
		som3AssignCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_SOMDObjectMgr_somDefaultVAssign *somTD_SOMDObjectMgr_somDefaultVAssign;
typedef SOMDObjectMgr*   SOMLINK somTP_SOMDObjectMgr_somDefaultConstVAssign(SOMDObjectMgr *somSelf, 
		som3AssignCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_SOMDObjectMgr_somDefaultConstVAssign *somTD_SOMDObjectMgr_somDefaultConstVAssign;
typedef void   SOMLINK somTP_SOMDObjectMgr_somInit(SOMDObjectMgr *somSelf);
typedef somTP_SOMDObjectMgr_somInit *somTD_SOMDObjectMgr_somInit;
typedef void   SOMLINK somTP_SOMDObjectMgr_somUninit(SOMDObjectMgr *somSelf);
typedef somTP_SOMDObjectMgr_somUninit *somTD_SOMDObjectMgr_somUninit;
typedef void   SOMLINK somTP_SOMDObjectMgr_somFree(SOMDObjectMgr *somSelf);
typedef somTP_SOMDObjectMgr_somFree *somTD_SOMDObjectMgr_somFree;
typedef SOMClass*   SOMLINK somTP_SOMDObjectMgr_somGetClass(SOMDObjectMgr *somSelf);
typedef somTP_SOMDObjectMgr_somGetClass *somTD_SOMDObjectMgr_somGetClass;
typedef string   SOMLINK somTP_SOMDObjectMgr_somGetClassName(SOMDObjectMgr *somSelf);
typedef somTP_SOMDObjectMgr_somGetClassName *somTD_SOMDObjectMgr_somGetClassName;
typedef long   SOMLINK somTP_SOMDObjectMgr_somGetSize(SOMDObjectMgr *somSelf);
typedef somTP_SOMDObjectMgr_somGetSize *somTD_SOMDObjectMgr_somGetSize;
typedef boolean   SOMLINK somTP_SOMDObjectMgr_somIsA(SOMDObjectMgr *somSelf, 
		SOMClass* aClassObj);
typedef somTP_SOMDObjectMgr_somIsA *somTD_SOMDObjectMgr_somIsA;
typedef boolean   SOMLINK somTP_SOMDObjectMgr_somIsInstanceOf(SOMDObjectMgr *somSelf, 
		SOMClass* aClassObj);
typedef somTP_SOMDObjectMgr_somIsInstanceOf *somTD_SOMDObjectMgr_somIsInstanceOf;
typedef boolean   SOMLINK somTP_SOMDObjectMgr_somRespondsTo(SOMDObjectMgr *somSelf, 
		somId mId);
typedef somTP_SOMDObjectMgr_somRespondsTo *somTD_SOMDObjectMgr_somRespondsTo;
typedef boolean   SOMLINK somTP_SOMDObjectMgr_somDispatch(SOMDObjectMgr *somSelf, 
		somToken* retValue, 
		somId methodId, 
		va_list ap);
typedef somTP_SOMDObjectMgr_somDispatch *somTD_SOMDObjectMgr_somDispatch;
typedef boolean   SOMLINK somTP_SOMDObjectMgr_somClassDispatch(SOMDObjectMgr *somSelf, 
		SOMClass* clsObj, 
		somToken* retValue, 
		somId methodId, 
		va_list ap);
typedef somTP_SOMDObjectMgr_somClassDispatch *somTD_SOMDObjectMgr_somClassDispatch;
typedef boolean   SOMLINK somTP_SOMDObjectMgr_somCastObj(SOMDObjectMgr *somSelf, 
		SOMClass* castedCls);
typedef somTP_SOMDObjectMgr_somCastObj *somTD_SOMDObjectMgr_somCastObj;
typedef boolean   SOMLINK somTP_SOMDObjectMgr_somResetObj(SOMDObjectMgr *somSelf);
typedef somTP_SOMDObjectMgr_somResetObj *somTD_SOMDObjectMgr_somResetObj;
typedef SOMDObjectMgr*   SOMLINK somTP_SOMDObjectMgr_somPrintSelf(SOMDObjectMgr *somSelf);
typedef somTP_SOMDObjectMgr_somPrintSelf *somTD_SOMDObjectMgr_somPrintSelf;
typedef void   SOMLINK somTP_SOMDObjectMgr_somDumpSelf(SOMDObjectMgr *somSelf, 
		long level);
typedef somTP_SOMDObjectMgr_somDumpSelf *somTD_SOMDObjectMgr_somDumpSelf;
typedef void   SOMLINK somTP_SOMDObjectMgr_somDumpSelfInt(SOMDObjectMgr *somSelf, 
		long level);
typedef somTP_SOMDObjectMgr_somDumpSelfInt *somTD_SOMDObjectMgr_somDumpSelfInt;
}

#endif /* SOMDObjectMgr_API */


/*
 * -- The C++ Wrapper Class for SOMDObjectMgr
 */
class SOMDObjectMgr : public ObjectMgr
{
/*
 *  In addition to the basic ObjectMgr interface, the DSOM ObjectMgr
 *  defines the following methods to find remote server objects:
 */
public:

// SOMDObjectMgr::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 (!_SOMDObjectMgr) SOMDObjectMgrNewClass(SOMDObjectMgr_MajorVersion,SOMDObjectMgr_MinorVersion);
   return (void*)
   (((somTD_SOMClass_somNewNoInit)(SOMClassClassData.somNewNoInit))
         ((SOMClass *)((void*)_SOMDObjectMgr)));
}

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

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

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

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


/* method: somdFindServer */
SOMDServer*   somdFindServer(Environment *ev, 
		ImplId serverid)
{
/*
 *  Finds and returns a proxy to the Server object which is identified by the
 *  ImplId.  (ImplId is defined at server registration time, and can be
 *  obtained from the ImplDef.)
 * 
 *  OWNERSHIP of returned SOMDServer object is transferred to the caller.
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_SOMDObjectMgr),
	 ((somTD_SOMDObjectMgr_somdFindServer)(SOMDObjectMgrClassData.somdFindServer))(((SOMDObjectMgr *)((void *)this)), ev,serverid)
	);
}


/* method: somdFindServerByName */
SOMDServer*   somdFindServerByName(Environment *ev, 
		string servername)
{
/*
 *  Finds and returns a proxy to the Server object with the specified name.
 *  (The name is defined at server registration time, and can be obtained
 *  from the ImplDef.)
 * 
 *  OWNERSHIP of returned SOMDServer object is transferred to the caller.
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_SOMDObjectMgr),
	 ((somTD_SOMDObjectMgr_somdFindServerByName)(SOMDObjectMgrClassData.somdFindServerByName))(((SOMDObjectMgr *)((void *)this)), ev,servername)
	);
}


/* method: somdFindServersByClass */
_IDL_SEQUENCE_SOMDServer   somdFindServersByClass(Environment *ev, 
		Identifier objclass)
{
/*
 *  Finds all Server objects which can create an object of the named class.
 * 
 *  OWNERSHIP of returned SOMDServer objects is transferred to the caller.
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_SOMDObjectMgr),
	 ((somTD_SOMDObjectMgr_somdFindServersByClass)(SOMDObjectMgrClassData.somdFindServersByClass))(((SOMDObjectMgr *)((void *)this)), ev,objclass)
	);
}


/* method: somdFindAnyServerByClass */
SOMDServer*   somdFindAnyServerByClass(Environment *ev, 
		Identifier objclass)
{
/*
 *  Finds (any) Server object which can create an object of the named class.
 *  (This is a specialization of the somdFindServerByClass method.)
 * 
 *  OWNERSHIP of returned SOMDServer object is transferred to the caller.
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_SOMDObjectMgr),
	 ((somTD_SOMDObjectMgr_somdFindAnyServerByClass)(SOMDObjectMgrClassData.somdFindAnyServerByClass))(((SOMDObjectMgr *)((void *)this)), ev,objclass)
	);
}


/* method: _get_somd21somFree */
boolean   _get_somd21somFree(Environment *ev)
{
/*
 * Method from the IDL attribute statement:
 * "attribute boolean somd21somFree"
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_SOMDObjectMgr),
	 ((somTD_SOMDObjectMgr__get_somd21somFree)(SOMDObjectMgrClassData._get_somd21somFree))(((SOMDObjectMgr *)((void *)this)), ev)
	);
}


/* method: _set_somd21somFree */
void   _set_somd21somFree(Environment *ev, 
		boolean somd21somFree)
{
/*
 * Method from the IDL attribute statement:
 * "attribute boolean somd21somFree"
 */
   	(
	 SOM_TestCls(this,_SOMCLASS_SOMDObjectMgr),
	 ((somTD_SOMDObjectMgr__set_somd21somFree)(SOMDObjectMgrClassData._set_somd21somFree))(((SOMDObjectMgr *)((void *)this)), ev,somd21somFree)
	);
}


/*
 * Reintroduce inherited methods
 */

/* 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_SOMDObjectMgr_somdNewObject)(ObjectMgrClassData.somdNewObject))(((SOMDObjectMgr *)((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_SOMDObjectMgr_somdGetIdFromObject)(ObjectMgrClassData.somdGetIdFromObject))(((SOMDObjectMgr *)((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_SOMDObjectMgr_somdGetObjectFromId)(ObjectMgrClassData.somdGetObjectFromId))(((SOMDObjectMgr *)((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_SOMDObjectMgr_somdReleaseObject)(ObjectMgrClassData.somdReleaseObject))(((SOMDObjectMgr *)((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_SOMDObjectMgr_somdDestroyObject)(ObjectMgrClassData.somdDestroyObject))(((SOMDObjectMgr *)((void *)this)), ev,obj)
	);
}


/* 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_SOMDObjectMgr_somDefaultInit)(SOMObjectClassData.somDefaultInit))(((SOMDObjectMgr *)((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_SOMDObjectMgr_somDestruct)(SOMObjectClassData.somDestruct))(((SOMDObjectMgr *)((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_SOMDObjectMgr_somDefaultCopyInit)(SOMObjectClassData.somDefaultCopyInit))(((SOMDObjectMgr *)((void *)this)),ctrl,fromObj)
	);
}


/* method: somDefaultAssign */
SOMDObjectMgr*  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_SOMDObjectMgr_somDefaultAssign)(SOMObjectClassData.somDefaultAssign))(((SOMDObjectMgr *)((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_SOMDObjectMgr_somDefaultConstCopyInit)(SOMObjectClassData.somDefaultConstCopyInit))(((SOMDObjectMgr *)((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_SOMDObjectMgr_somDefaultVCopyInit)(SOMObjectClassData.somDefaultVCopyInit))(((SOMDObjectMgr *)((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_SOMDObjectMgr_somDefaultConstVCopyInit)(SOMObjectClassData.somDefaultConstVCopyInit))(((SOMDObjectMgr *)((void *)this)),ctrl,fromObj)
	);
}


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


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


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


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


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


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


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


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


/* method: somGetSize */
long   somGetSize()
{
/*
 *  Return the size of the receiver.
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_SOMObject),
	 ((somTD_SOMDObjectMgr_somGetSize)(SOMObjectClassData.somGetSize))(((SOMDObjectMgr *)((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_SOMDObjectMgr_somIsA)(SOMObjectClassData.somIsA))(((SOMDObjectMgr *)((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_SOMDObjectMgr_somIsInstanceOf)(SOMObjectClassData.somIsInstanceOf))(((SOMDObjectMgr *)((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_SOMDObjectMgr_somRespondsTo)(SOMObjectClassData.somRespondsTo))(((SOMDObjectMgr *)((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_SOMDObjectMgr_somDispatch)(SOMObjectClassData.somDispatch))(((SOMDObjectMgr *)((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_SOMDObjectMgr_somDispatch)(SOMObjectClassData.somDispatch))(((SOMDObjectMgr *)((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_SOMDObjectMgr_somClassDispatch)(SOMObjectClassData.somClassDispatch))(((SOMDObjectMgr *)((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_SOMDObjectMgr_somClassDispatch)(SOMObjectClassData.somClassDispatch))(((SOMDObjectMgr *)((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_SOMDObjectMgr_somCastObj)(SOMObjectClassData.somCastObj))(((SOMDObjectMgr *)((void *)this)),castedCls)
	);
}


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


/* method: somPrintSelf */
SOMDObjectMgr*  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_SOMDObjectMgr_somPrintSelf)(SOMObjectClassData.somPrintSelf))(((SOMDObjectMgr *)((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_SOMDObjectMgr_somDumpSelf)(SOMObjectClassData.somDumpSelf))(((SOMDObjectMgr *)((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_SOMDObjectMgr_somDumpSelfInt)(SOMObjectClassData.somDumpSelfInt))(((SOMDObjectMgr *)((void *)this)),level)
	);
}



};   /* SOMDObjectMgr */



#endif       /* SOM_SOMDObjectMgr_xh */
