
/*
 * This file was generated by the SOM Compiler.
 * FileName: somdserv.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,1995,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.
 * 
 * 
 *   Each DSOM server process is defined to have a (single instance)
 *   SOMDServer object.  The SOMDServer object performs the following
 *   functions:
 * 
 *       1) creation of SOMObject factories
 *       2) mapping between SOMObjects and SOMDObjects
 *       3) method dispatching
 *       4) any application-specific server methods
 * 
 *   A particular SOMDServer subclass is specified in the ImplementationDef
 *   for each server process.  SOMOA will instantiate one instance of the
 *   specified SOMDServer subclass during server process initialization
 *   (in SOMOA::impl_is_ready).
 */


#ifndef SOM_SOMDServer_xh
#define SOM_SOMDServer_xh


#define SOMDServer_MajorVersion 2
#define SOMDServer_MinorVersion 2
class SOMDServer;

/*
 * Passthru lines: File: "C.xh", "before"
 */
#include <naming.xh>
#include <xnaming.xh>

/* 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 SOMDServer_API
#define SOMDServer_API
/*
 * -- The Class API
 */
#ifndef SOM_IMPORTEXPORT_somd_somdserv
#ifdef SOM_DLL_somd
	/* export semantics */
	#if defined(SOM_DEFFILE_somd)\
	||(defined(SOM_DEFFILE_BY_DEFAULT)&&!defined(SOM_NODEFFILE_somd))\
	|| !defined(SOM_Module_somdserv_Source)
	#define SOM_IMPORTEXPORT_somd_somdserv
	#else
	#define SOM_IMPORTEXPORT_somd_somdserv SOMDLLEXPORT
	#endif
#else
	#define SOM_IMPORTEXPORT_somd_somdserv SOMDLLIMPORT
#endif
#endif

/*
 * Start of bindings for IDL types
 */

class SOMClass;
class SOMObject;
class Container;
class ExtendedNaming_PropertyBindingIterator;
class ExtendedNaming_PropertyIterator;
class ExtendedNaming_IndexIterator;
class SOMDObject;

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

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

class SOMDServer;
#include <somdtype.xh>
#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 SOMDServer * SOMDLINK SOMD_ServerObject;


/*
 * A function to create the SOMDServer class object...
 */
SOMEXTERN SOM_IMPORTEXPORT_somd_somdserv SOMMSingleInstance * SOMLINK SOMDServerNewClass(
		integer4 majorVersion,
		integer4 minorVersion);


/*
 * The API 2 ClassData Structures...
 */
class SOMMSingleInstance;
SOMEXTERN struct SOMDServerClassDataStructure {
	SOMMSingleInstance *classObject;
	somMToken somdSOMObjFromRef;
	somMToken somdRefFromSOMObj;
	somMToken somdCreateObj;
	somMToken somdDeleteObj;
	somMToken somdGetClassObj;
	somMToken somdDispatchMethod;
	somMToken somdObjReferencesCached;
	somMToken private1;
	somMToken private2;
	somMToken somdCreateFactory;
} SOMDLINK SOM_IMPORTEXPORT_somd_somdserv SOMDServerClassData;
SOMEXTERN struct SOMDServerCClassDataStructure {
	som3ClassDetailsPtr    parentMtab;
	somDToken              instanceDataToken;
} SOMDLINK SOM_IMPORTEXPORT_somd_somdserv SOMDServerCClassData;


/*
 * Class Object and Method Token Macros
 */
#define _SOMCLASS_SOMDServer (SOMDServerClassData.classObject)
#ifndef SOMGD_SOMDServer
    #if (defined(_SOMDServer) || defined(__SOMDServer))
        #undef _SOMDServer
        #undef __SOMDServer
        #define SOMGD_SOMDServer 1
    #else
        #define _SOMDServer _SOMCLASS_SOMDServer
    #endif /* _SOMDServer */
#endif /* SOMGD_SOMDServer */
#define SOMDServer_classObj _SOMCLASS_SOMDServer
#define _SOMMTOKEN_SOMDServer(method) ((somMToken)SOMDServerClassData.method)

/*
 * -- Typedefs for SOMDServer Method Procedures
 */
SOMEXTERN {
typedef SOMDObject*   SOMLINK somTP_SOMDServer_somdRefFromSOMObj(SOMDServer *somSelf, Environment *ev, 
		SOMObject* somobj);
typedef somTP_SOMDServer_somdRefFromSOMObj *somTD_SOMDServer_somdRefFromSOMObj;
typedef SOMObject*   SOMLINK somTP_SOMDServer_somdSOMObjFromRef(SOMDServer *somSelf, Environment *ev, 
		SOMDObject* objref);
typedef somTP_SOMDServer_somdSOMObjFromRef *somTD_SOMDServer_somdSOMObjFromRef;
typedef void   SOMLINK somTP_SOMDServer_somdDispatchMethod(SOMDServer *somSelf, Environment *ev, 
		SOMObject* somobj, 
		somToken* retValue, 
		somId methodId, 
		va_list ap);
typedef somTP_SOMDServer_somdDispatchMethod *somTD_SOMDServer_somdDispatchMethod;
typedef SOMObject*   SOMLINK somTP_SOMDServer_somdCreateObj(SOMDServer *somSelf, Environment *ev, 
		Identifier objclass, 
		string hints);
typedef somTP_SOMDServer_somdCreateObj *somTD_SOMDServer_somdCreateObj;
typedef void   SOMLINK somTP_SOMDServer_somdDeleteObj(SOMDServer *somSelf, Environment *ev, 
		SOMObject* somobj);
typedef somTP_SOMDServer_somdDeleteObj *somTD_SOMDServer_somdDeleteObj;
typedef SOMClass*   SOMLINK somTP_SOMDServer_somdGetClassObj(SOMDServer *somSelf, Environment *ev, 
		Identifier objclass);
typedef somTP_SOMDServer_somdGetClassObj *somTD_SOMDServer_somdGetClassObj;
typedef boolean   SOMLINK somTP_SOMDServer_somdObjReferencesCached(SOMDServer *somSelf, Environment *ev);
typedef somTP_SOMDServer_somdObjReferencesCached *somTD_SOMDServer_somdObjReferencesCached;
typedef SOMObject*   SOMLINK somTP_SOMDServer_somdCreateFactory(SOMDServer *somSelf, Environment *ev, 
		string className, 
		ExtendedNaming_PropertyList* props);
typedef somTP_SOMDServer_somdCreateFactory *somTD_SOMDServer_somdCreateFactory;

/*
 * -- Typedefs for Reintroduced Wrapper Methods
 */
typedef void   SOMLINK somTP_SOMDServer_somDefaultInit(SOMDServer *somSelf, 
		som3InitCtrl* ctrl);
typedef somTP_SOMDServer_somDefaultInit *somTD_SOMDServer_somDefaultInit;
typedef void   SOMLINK somTP_SOMDServer_somDestruct(SOMDServer *somSelf, 
		octet doFree, 
		som3DestructCtrl* ctrl);
typedef somTP_SOMDServer_somDestruct *somTD_SOMDServer_somDestruct;
typedef void   SOMLINK somTP_SOMDServer_somDefaultCopyInit(SOMDServer *somSelf, 
		som3InitCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_SOMDServer_somDefaultCopyInit *somTD_SOMDServer_somDefaultCopyInit;
typedef SOMDServer*   SOMLINK somTP_SOMDServer_somDefaultAssign(SOMDServer *somSelf, 
		som3AssignCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_SOMDServer_somDefaultAssign *somTD_SOMDServer_somDefaultAssign;
typedef void   SOMLINK somTP_SOMDServer_somDefaultConstCopyInit(SOMDServer *somSelf, 
		som3InitCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_SOMDServer_somDefaultConstCopyInit *somTD_SOMDServer_somDefaultConstCopyInit;
typedef void   SOMLINK somTP_SOMDServer_somDefaultVCopyInit(SOMDServer *somSelf, 
		som3InitCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_SOMDServer_somDefaultVCopyInit *somTD_SOMDServer_somDefaultVCopyInit;
typedef void   SOMLINK somTP_SOMDServer_somDefaultConstVCopyInit(SOMDServer *somSelf, 
		som3InitCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_SOMDServer_somDefaultConstVCopyInit *somTD_SOMDServer_somDefaultConstVCopyInit;
typedef SOMDServer*   SOMLINK somTP_SOMDServer_somDefaultConstAssign(SOMDServer *somSelf, 
		som3AssignCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_SOMDServer_somDefaultConstAssign *somTD_SOMDServer_somDefaultConstAssign;
typedef SOMDServer*   SOMLINK somTP_SOMDServer_somDefaultVAssign(SOMDServer *somSelf, 
		som3AssignCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_SOMDServer_somDefaultVAssign *somTD_SOMDServer_somDefaultVAssign;
typedef SOMDServer*   SOMLINK somTP_SOMDServer_somDefaultConstVAssign(SOMDServer *somSelf, 
		som3AssignCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_SOMDServer_somDefaultConstVAssign *somTD_SOMDServer_somDefaultConstVAssign;
typedef void   SOMLINK somTP_SOMDServer_somInit(SOMDServer *somSelf);
typedef somTP_SOMDServer_somInit *somTD_SOMDServer_somInit;
typedef void   SOMLINK somTP_SOMDServer_somUninit(SOMDServer *somSelf);
typedef somTP_SOMDServer_somUninit *somTD_SOMDServer_somUninit;
typedef void   SOMLINK somTP_SOMDServer_somFree(SOMDServer *somSelf);
typedef somTP_SOMDServer_somFree *somTD_SOMDServer_somFree;
typedef SOMMSingleInstance*   SOMLINK somTP_SOMDServer_somGetClass(SOMDServer *somSelf);
typedef somTP_SOMDServer_somGetClass *somTD_SOMDServer_somGetClass;
typedef string   SOMLINK somTP_SOMDServer_somGetClassName(SOMDServer *somSelf);
typedef somTP_SOMDServer_somGetClassName *somTD_SOMDServer_somGetClassName;
typedef long   SOMLINK somTP_SOMDServer_somGetSize(SOMDServer *somSelf);
typedef somTP_SOMDServer_somGetSize *somTD_SOMDServer_somGetSize;
typedef boolean   SOMLINK somTP_SOMDServer_somIsA(SOMDServer *somSelf, 
		SOMClass* aClassObj);
typedef somTP_SOMDServer_somIsA *somTD_SOMDServer_somIsA;
typedef boolean   SOMLINK somTP_SOMDServer_somIsInstanceOf(SOMDServer *somSelf, 
		SOMClass* aClassObj);
typedef somTP_SOMDServer_somIsInstanceOf *somTD_SOMDServer_somIsInstanceOf;
typedef boolean   SOMLINK somTP_SOMDServer_somRespondsTo(SOMDServer *somSelf, 
		somId mId);
typedef somTP_SOMDServer_somRespondsTo *somTD_SOMDServer_somRespondsTo;
typedef boolean   SOMLINK somTP_SOMDServer_somDispatch(SOMDServer *somSelf, 
		somToken* retValue, 
		somId methodId, 
		va_list ap);
typedef somTP_SOMDServer_somDispatch *somTD_SOMDServer_somDispatch;
typedef boolean   SOMLINK somTP_SOMDServer_somClassDispatch(SOMDServer *somSelf, 
		SOMClass* clsObj, 
		somToken* retValue, 
		somId methodId, 
		va_list ap);
typedef somTP_SOMDServer_somClassDispatch *somTD_SOMDServer_somClassDispatch;
typedef boolean   SOMLINK somTP_SOMDServer_somCastObj(SOMDServer *somSelf, 
		SOMClass* castedCls);
typedef somTP_SOMDServer_somCastObj *somTD_SOMDServer_somCastObj;
typedef boolean   SOMLINK somTP_SOMDServer_somResetObj(SOMDServer *somSelf);
typedef somTP_SOMDServer_somResetObj *somTD_SOMDServer_somResetObj;
typedef SOMDServer*   SOMLINK somTP_SOMDServer_somPrintSelf(SOMDServer *somSelf);
typedef somTP_SOMDServer_somPrintSelf *somTD_SOMDServer_somPrintSelf;
typedef void   SOMLINK somTP_SOMDServer_somDumpSelf(SOMDServer *somSelf, 
		long level);
typedef somTP_SOMDServer_somDumpSelf *somTD_SOMDServer_somDumpSelf;
typedef void   SOMLINK somTP_SOMDServer_somDumpSelfInt(SOMDServer *somSelf, 
		long level);
typedef somTP_SOMDServer_somDumpSelfInt *somTD_SOMDServer_somDumpSelfInt;
}

#endif /* SOMDServer_API */


/*
 * -- The C++ Wrapper Class for SOMDServer
 */
class SOMDServer : public SOMObject
{
public:

// SOMDServer::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 (!_SOMDServer) SOMDServerNewClass(SOMDServer_MajorVersion,SOMDServer_MinorVersion);
   return (void*)
   (((somTD_SOMClass_somNewNoInit)(SOMClassClassData.somNewNoInit))
         ((SOMClass *)((void*)_SOMDServer)));
}

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

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

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

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


/* method: somdRefFromSOMObj */
SOMDObject*   somdRefFromSOMObj(Environment *ev, 
		SOMObject* somobj)
{
/*
 *  This method returns a DSOM object reference for a SOM object in this server
 *  process.  SOMOA will call this method whenever it returns a result from a
 *  method call which includes a pointer to a SOMObject (versus a pointer to a
 *  SOMDObject).  OWNERSHIP of the returned object reference is passed to the
 *  caller EXCEPT when the somdObjReferencesCached method returns TRUE.  When the
 *  input (somobj) is already an object reference, the default implementation
 *  simply returns somobj, rather than creating a new reference.  (Subclasses
 *  might override this method to duplicate the input reference, however.)
 *  Hence, callers should note when the returned value is the same as
 *  the input (somobj) when determining whether or not to free the result.
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_SOMDServer),
	 ((somTD_SOMDServer_somdRefFromSOMObj)(SOMDServerClassData.somdRefFromSOMObj))(((SOMDServer *)((void *)this)), ev,somobj)
	);
}


/* method: somdSOMObjFromRef */
SOMObject*   somdSOMObjFromRef(Environment *ev, 
		SOMDObject* objref)
{
/*
 *  This method maps a DSOM object reference into a SOM object.
 *  This can be done in whatever way is appropriate for the application.
 *  This method is called by SOMOA in order to translate any method call
 *  parameters which are object references (created from somdRefFromSOMObj
 *  above) into SOM objects.
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_SOMDServer),
	 ((somTD_SOMDServer_somdSOMObjFromRef)(SOMDServerClassData.somdSOMObjFromRef))(((SOMDServer *)((void *)this)), ev,objref)
	);
}


/* va_list method: somdDispatchMethod */

/*
 *  This method is called by SOMOA to dispatch a method on a SOM object.
 *  The intention is to give the Server object an opportunity to intercept
 *  method calls, if desired.  The parameters to this method are the same
 *  as the parameters passed to SOMObject::somDispatch.
 * 
 *  The default implementation invokes SOMObject::somDispatch on the
 *  specified target object, "somobj", with the supplied arguments.
 */
/* the va_list invocation form */
void   SOMDServer_somdDispatchMethod(Environment *ev, 
		SOMObject* somobj, 
		somToken* retValue, 
		somId methodId, 
		va_list ap)
{   	(
	 SOM_TestCls(this,_SOMCLASS_SOMDServer),
	 ((somTD_SOMDServer_somdDispatchMethod)(SOMDServerClassData.somdDispatchMethod))(((SOMDServer *)((void *)this)), ev,somobj,retValue,methodId,ap)
	);
}

/* the varargs invocation form */
void   somdDispatchMethod(Environment *ev, 
		SOMObject* somobj, 
		somToken* retValue, 
		somId methodId, 
		...)
{
/*
 *  This method is called by SOMOA to dispatch a method on a SOM object.
 *  The intention is to give the Server object an opportunity to intercept
 *  method calls, if desired.  The parameters to this method are the same
 *  as the parameters passed to SOMObject::somDispatch.
 * 
 *  The default implementation invokes SOMObject::somDispatch on the
 *  specified target object, "somobj", with the supplied arguments.
 */
   va_list ap;
   va_start(ap, methodId);
   	(
	 SOM_TestCls(this,_SOMCLASS_SOMDServer),
	 ((somTD_SOMDServer_somdDispatchMethod)(SOMDServerClassData.somdDispatchMethod))(((SOMDServer *)((void *)this)), ev,somobj,retValue,methodId,ap)
	);
   va_end(ap);
}


/* method: somdCreateObj */
SOMObject*   somdCreateObj(Environment *ev, 
		Identifier objclass, 
		string hints)
{
/*
 *  Creates an object of the specified class.  This method (if overridden)
 *  may optionally define creation "hints" which the client may specify in
 *  this call.
 * 
 *  Called indirectly by SOMDObjectMgr::somdNewObject.
 * 
 *  The default implementation calls somdGetClassObj to get the specified
 *  SOMClass object, and invokes "somNew".  The "hints" argument is ignored.
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_SOMDServer),
	 ((somTD_SOMDServer_somdCreateObj)(SOMDServerClassData.somdCreateObj))(((SOMDServer *)((void *)this)), ev,objclass,hints)
	);
}


/* method: somdDeleteObj */
void   somdDeleteObj(Environment *ev, 
		SOMObject* somobj)
{
/*
 *  Deletes a SOM object.  By default, simply calls somFree on the object.
 * 
 *  Called indirectly by SOMDObjectMgr::somdDestroyObject.
 */
   	(
	 SOM_TestCls(this,_SOMCLASS_SOMDServer),
	 ((somTD_SOMDServer_somdDeleteObj)(SOMDServerClassData.somdDeleteObj))(((SOMDServer *)((void *)this)), ev,somobj)
	);
}


/* method: somdGetClassObj */
SOMClass*   somdGetClassObj(Environment *ev, 
		Identifier objclass)
{
/*
 *  Creates/returns a class object for the specified class.  May result in
 *  loading of a DLL for the class.  This method can be used by a client to
 *  get a proxy to a class object on the server so that methods introduced
 *  in the metaclass (e.g., class-specific constructors, etc.) may be invoked
 *  directly.
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_SOMDServer),
	 ((somTD_SOMDServer_somdGetClassObj)(SOMDServerClassData.somdGetClassObj))(((SOMDServer *)((void *)this)), ev,objclass)
	);
}


/* method: somdObjReferencesCached */
boolean   somdObjReferencesCached(Environment *ev)
{
/*
 *  Whether the server retains ownership of the object references
 *  it creates via the somdRefFromSOMObj method.
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_SOMDServer),
	 ((somTD_SOMDServer_somdObjReferencesCached)(SOMDServerClassData.somdObjReferencesCached))(((SOMDServer *)((void *)this)), ev)
	);
}


/* method: somdCreateFactory */
SOMObject*   somdCreateFactory(Environment *ev, 
		string className, 
		ExtendedNaming_PropertyList* props)
{
/*
 *  To be called from DSOM Factory Finder Service, a FactoryENC object.
 *  Will return a factory specified in idl by the idl modifier "factory",
 *  or if this doesn't exist will return a SOMClass for the object to be
 *  used as the generic factory.  PropertyList is not used.
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_SOMDServer),
	 ((somTD_SOMDServer_somdCreateFactory)(SOMDServerClassData.somdCreateFactory))(((SOMDServer *)((void *)this)), ev,className,props)
	);
}


/*
 * 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_SOMDServer_somDefaultInit)(SOMObjectClassData.somDefaultInit))(((SOMDServer *)((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_SOMDServer_somDestruct)(SOMObjectClassData.somDestruct))(((SOMDServer *)((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_SOMDServer_somDefaultCopyInit)(SOMObjectClassData.somDefaultCopyInit))(((SOMDServer *)((void *)this)),ctrl,fromObj)
	);
}


/* method: somDefaultAssign */
SOMDServer*  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_SOMDServer_somDefaultAssign)(SOMObjectClassData.somDefaultAssign))(((SOMDServer *)((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_SOMDServer_somDefaultConstCopyInit)(SOMObjectClassData.somDefaultConstCopyInit))(((SOMDServer *)((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_SOMDServer_somDefaultVCopyInit)(SOMObjectClassData.somDefaultVCopyInit))(((SOMDServer *)((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_SOMDServer_somDefaultConstVCopyInit)(SOMObjectClassData.somDefaultConstVCopyInit))(((SOMDServer *)((void *)this)),ctrl,fromObj)
	);
}


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


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


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


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


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


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


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


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


/* method: somGetSize */
long   somGetSize()
{
/*
 *  Return the size of the receiver.
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_SOMObject),
	 ((somTD_SOMDServer_somGetSize)(SOMObjectClassData.somGetSize))(((SOMDServer *)((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_SOMDServer_somIsA)(SOMObjectClassData.somIsA))(((SOMDServer *)((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_SOMDServer_somIsInstanceOf)(SOMObjectClassData.somIsInstanceOf))(((SOMDServer *)((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_SOMDServer_somRespondsTo)(SOMObjectClassData.somRespondsTo))(((SOMDServer *)((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_SOMDServer_somDispatch)(SOMObjectClassData.somDispatch))(((SOMDServer *)((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_SOMDServer_somDispatch)(SOMObjectClassData.somDispatch))(((SOMDServer *)((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_SOMDServer_somClassDispatch)(SOMObjectClassData.somClassDispatch))(((SOMDServer *)((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_SOMDServer_somClassDispatch)(SOMObjectClassData.somClassDispatch))(((SOMDServer *)((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_SOMDServer_somCastObj)(SOMObjectClassData.somCastObj))(((SOMDServer *)((void *)this)),castedCls)
	);
}


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


/* method: somPrintSelf */
SOMDServer*  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_SOMDServer_somPrintSelf)(SOMObjectClassData.somPrintSelf))(((SOMDServer *)((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_SOMDServer_somDumpSelf)(SOMObjectClassData.somDumpSelf))(((SOMDServer *)((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_SOMDServer_somDumpSelfInt)(SOMObjectClassData.somDumpSelfInt))(((SOMDServer *)((void *)this)),level)
	);
}



};   /* SOMDServer */



#endif       /* SOM_SOMDServer_xh */
