
/*
 * This file was generated by the SOM Compiler.
 * FileName: somdserv.xh.
 * Generated using:
 *     SOM Precompiler somipc: 2.29.1.17
 *     SOM Emitter emitxh: 2.47
 */

/*
 *    Interface for DSOM Server Objects
 * 
 *    This class defines and implements the behavior of DSOM Server objects
 *    used with the DSOM Object Manager (SOMDObjectMgr).
 * 
 *    Each DSOM server process is defined to have a (single instance of a)
 *    SOMDServer object.  The SOMDServer object performs three kinds of
 *    functions:
 * 
 *        1) creation of SOM objects
 *        2) mapping of application-defined object ids into DSOM object
 *           "references" (SOMDObjects), and back again
 *        3) any application-specific server methods (e.g., for initialization,
 *           server control, etc.)
 * 
 *    The SOMDServer class defines methods for the basic creation of SOM
 *    objects in the server process (somdCreateObj), for deletion of SOM
 *    objects (somdDeleteObj), and for finding the SOM  class object for a
 *    specified class (somdGetClassObj).
 *    With somdGetClassObj, a client can 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.
 * 
 *    This class also defines methods for the mappings to and from SOMDObjects
 *    and back again.  (Note: SOMDObject implements a CORBA "object reference"
 *    in DSOM.  An object reference is something that is used to describe and
 *    locate an actual target object.)  These methods are used by the SOM
 *    Object Adapter (SOMOA) when converting messages into method calls
 *    and results into messages.
 * 
 *    Application-specific server methods should be defined in subclasses
 *    of this SOMDServer subclass.
 * 
 *    A particular SOMDServer subclass is specified in the ImplementationDef
 *    for each server process.  The 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

class SOMDServer;

#define SOMDServer_MajorVersion 2
#define SOMDServer_MinorVersion 1

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

/* C++ parent defs */
#ifndef SOM_SOMObject_xh
#include <somobj.xh>
#endif

/*
 * C++ metaclass def
 */
#include <snglicls.xh>

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

/*
 * Start of bindings for IDL types
 */

class SOMClass;
class SOMObject;
class Container;
class SOMDObject;

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

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

class SOMDServer;
SOMEXTERN SOMDServer * SOMDLINK SOMD_ServerObject; /* global variable */


/* A procedure to create the SOMDServer Class */
class SOMMSingleInstance;
SOMEXTERN SOMMSingleInstance * SOMLINK SOMDServerNewClass(
		integer4 majorVersion,
		integer4 minorVersion);

/* The API to the SOMDServer class object, and the methods it introduces. */
SOMEXTERN struct SOMDServerClassDataStructure {
	SOMMSingleInstance *classObject;
	somMToken somdSOMObjFromRef;
	somMToken somdRefFromSOMObj;
	somMToken somdCreateObj;
	somMToken somdDeleteObj;
	somMToken somdGetClassObj;
	somMToken somdDispatchMethod;
	somMToken somdObjReferencesCached;
} SOMDLINK SOMDServerClassData;
#define _SOMDServer SOMDServerClassData.classObject

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

/*
 * -- 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;

/*
 * -- 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_somFree(SOMDServer *somSelf);
typedef somTP_SOMDServer_somFree *somTD_SOMDServer_somFree;
typedef void   SOMLINK somTP_SOMDServer_somUninit(SOMDServer *somSelf);
typedef somTP_SOMDServer_somUninit *somTD_SOMDServer_somUninit;
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* cls);
typedef somTP_SOMDServer_somCastObj *somTD_SOMDServer_somCastObj;
typedef boolean   SOMLINK somTP_SOMDServer_somResetObj(SOMDServer *somSelf);
typedef somTP_SOMDServer_somResetObj *somTD_SOMDServer_somResetObj;
typedef void   SOMLINK somTP_SOMDServer_somDispatchV(SOMDServer *somSelf, 
		somId methodId, 
		somId descriptor, 
		va_list ap);
typedef somTP_SOMDServer_somDispatchV *somTD_SOMDServer_somDispatchV;
typedef long   SOMLINK somTP_SOMDServer_somDispatchL(SOMDServer *somSelf, 
		somId methodId, 
		somId descriptor, 
		va_list ap);
typedef somTP_SOMDServer_somDispatchL *somTD_SOMDServer_somDispatchL;
typedef void*   SOMLINK somTP_SOMDServer_somDispatchA(SOMDServer *somSelf, 
		somId methodId, 
		somId descriptor, 
		va_list ap);
typedef somTP_SOMDServer_somDispatchA *somTD_SOMDServer_somDispatchA;
typedef double   SOMLINK somTP_SOMDServer_somDispatchD(SOMDServer *somSelf, 
		somId methodId, 
		somId descriptor, 
		va_list ap);
typedef somTP_SOMDServer_somDispatchD *somTD_SOMDServer_somDispatchD;
typedef SOMObject*   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 */


/*
 * -- 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 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*)
      SOM_Resolve(_SOMDServer,SOMClass,somNewNoInit)
         ((SOMClass *)((void*)_SOMDServer));
}

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

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

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

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

#ifdef __IBMCPP__
#pragma info(nocnv,nopar)
#endif
SOMDServer(const SOMDServer* fromObj)
{
   if (*(void**)this != 
       ((somParentMtabStructPtr)
        (SOMDServerCClassData.parentMtab))->mtab)
      return;
   ((SOMObject*)((void*)this))->somDefaultConstCopyInit(0,((SOMObject*)((void*)fromObj)));
}
#ifdef __IBMCPP__
#pragma info(restore)
#endif


/* method: somdRefFromSOMObj */
SOMDObject*   somdRefFromSOMObj(Environment *ev, 
		SOMObject* somobj)
{
/*
 *  This method returns a DSOM object reference for a SOM object
 *  instance 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 given 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_ResolveD(this,SOMDServer,SOMDServer,somdRefFromSOMObj)
	(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_ResolveD(this,SOMDServer,SOMDServer,somdSOMObjFromRef)
	(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_ResolveD(this,SOMDServer,SOMDServer,somdDispatchMethod)
	(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_ResolveD(this,SOMDServer,SOMDServer,somdDispatchMethod)
	(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
 *  in the default implementation.
 */
   return SOM_ResolveD(this,SOMDServer,SOMDServer,somdCreateObj)
	(this, ev,objclass,hints);
}


/* method: somdDeleteObj */
void   somdDeleteObj(Environment *ev, 
		SOMObject* somobj)
{
/*
 *  Deletes a SOM object.  By default, simply calls somFree on the object.
 *  Can be overridden by the application.
 * 
 *  Called indirectly by SOMDObjectMgr::somdDestroyObject.
 */
   SOM_ResolveD(this,SOMDServer,SOMDServer,somdDeleteObj)
	(this, ev,somobj);
}


/* method: somdGetClassObj */
SOMClass*   somdGetClassObj(Environment *ev, 
		Identifier objclass)
{
/*
 *  Creates/returns a class object for the specified class.
 *  (May result in the loading of a DLL for the class.)
 */
   return SOM_ResolveD(this,SOMDServer,SOMDServer,somdGetClassObj)
	(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_ResolveD(this,SOMDServer,SOMDServer,somdObjReferencesCached)
	(this, ev);
}


/*
 * 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_ResolveD(this,SOMDServer,SOMObject,somDefaultInit)
	(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_ResolveD(this,SOMDServer,SOMObject,somDestruct)
	(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_ResolveD(this,SOMDServer,SOMObject,somDefaultCopyInit)
	(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_ResolveD(this,SOMDServer,SOMObject,somDefaultAssign)
	(this,ctrl,fromObj);
}


/* initializer method: somDefaultConstCopyInit */
void   somDefaultConstCopyInit(som3InitCtrl* ctrl, 
		SOMObject* fromObj)
{
/*
 *  A default copy constructor that uses a const fromObj.
 */
   SOM_ResolveD(this,SOMDServer,SOMObject,somDefaultConstCopyInit)
	(this,ctrl,fromObj);
}


/* initializer method: somDefaultVCopyInit */
void   somDefaultVCopyInit(som3InitCtrl* ctrl, 
		SOMObject* fromObj)
{
/*
 *  A default copy constructor that uses a volatile fromObj.
 */
   SOM_ResolveD(this,SOMDServer,SOMObject,somDefaultVCopyInit)
	(this,ctrl,fromObj);
}


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


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


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


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


/* method: somInit */
void   somInit()
{
/*
 *  Obsolete but still supported. Override somDefaultInit instead of somInit.
 */
   SOM_ResolveD(this,SOMDServer,SOMObject,somInit)
	(this);
}


/* method: somFree */
void   somFree()
{
/*
 *  Use as directed by framework implementations.
 */
   SOM_ResolveD(this,SOMDServer,SOMObject,somFree)
	(this);
}


/* method: somUninit */
void   somUninit()
{
/*
 *  Obsolete but still supported. Override somDestruct instead of somUninit.
 */
   SOM_ResolveD(this,SOMDServer,SOMObject,somUninit)
	(this);
}


/* method: somGetClass */
SOMMSingleInstance*  somGetClass()
{
/*
 *  Return the receiver's class.
 */
   return SOM_ResolveD(this,SOMDServer,SOMObject,somGetClass)
	(this);
}


/* method: somGetClassName */
string   somGetClassName()
{
/*
 *  Return the name of the receiver's class.
 */
   return SOM_ResolveD(this,SOMDServer,SOMObject,somGetClassName)
	(this);
}


/* method: somGetSize */
long   somGetSize()
{
/*
 *  Return the size of the receiver.
 */
   return SOM_ResolveD(this,SOMDServer,SOMObject,somGetSize)
	(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_ResolveD(this,SOMDServer,SOMObject,somIsA)
	(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_ResolveD(this,SOMDServer,SOMObject,somIsInstanceOf)
	(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_ResolveD(this,SOMDServer,SOMObject,somRespondsTo)
	(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.
 */
/* the va_list invocation form */
boolean   SOMDServer_somDispatch(somToken* retValue, 
		somId methodId, 
		va_list ap)
{return SOM_ResolveD(this,SOMDServer,SOMObject,somDispatch)
	(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.
 */
   va_list ap;
   va_start(ap, methodId);
   boolean __somResult = 
      SOM_ResolveD(this,SOMDServer,SOMObject,somDispatch)
	(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   SOMDServer_somClassDispatch(SOMClass* clsObj, 
		somToken* retValue, 
		somId methodId, 
		va_list ap)
{return SOM_ResolveD(this,SOMDServer,SOMObject,somClassDispatch)
	(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_ResolveD(this,SOMDServer,SOMObject,somClassDispatch)
	(this,clsObj,retValue,methodId,ap);
   va_end(ap);
   return __somResult;
}


/* method: somCastObj */
boolean   somCastObj(SOMClass* cls)
{
/*
 *  cast the receiving object to cls (which must be an ancestor of the
 *  objects true class. Returns true on success.
 */
   return SOM_ResolveD(this,SOMDServer,SOMObject,somCastObj)
	(this,cls);
}


/* method: somResetObj */
boolean   somResetObj()
{
/*
 *  reset an object to its true class. Returns true always.
 */
   return SOM_ResolveD(this,SOMDServer,SOMObject,somResetObj)
	(this);
}


/* va_list method: somDispatchV */

/*
 *  Obsolete. Use somDispatch instead.
 */
/* the va_list invocation form */
void   SOMDServer_somDispatchV(somId methodId, 
		somId descriptor, 
		va_list ap)
{   SOM_ResolveD(this,SOMDServer,SOMObject,somDispatchV)
	(this,methodId,descriptor,ap);
}

/* the varargs invocation form */
void   somDispatchV(somId methodId, 
		somId descriptor, 
		...)
{
/*
 *  Obsolete. Use somDispatch instead.
 */
   va_list ap;
   va_start(ap, descriptor);
   SOM_ResolveD(this,SOMDServer,SOMObject,somDispatchV)
	(this,methodId,descriptor,ap);
   va_end(ap);
}


/* va_list method: somDispatchL */

/*
 *  Obsolete. Use somDispatch instead.
 */
/* the va_list invocation form */
long   SOMDServer_somDispatchL(somId methodId, 
		somId descriptor, 
		va_list ap)
{return SOM_ResolveD(this,SOMDServer,SOMObject,somDispatchL)
	(this,methodId,descriptor,ap);
}

/* the varargs invocation form */
long   somDispatchL(somId methodId, 
		somId descriptor, 
		...)
{
/*
 *  Obsolete. Use somDispatch instead.
 */
   va_list ap;
   va_start(ap, descriptor);
   long __somResult = 
      SOM_ResolveD(this,SOMDServer,SOMObject,somDispatchL)
	(this,methodId,descriptor,ap);
   va_end(ap);
   return __somResult;
}


/* va_list method: somDispatchA */

/*
 *  Obsolete. Use somDispatch instead.
 */
/* the va_list invocation form */
void*   SOMDServer_somDispatchA(somId methodId, 
		somId descriptor, 
		va_list ap)
{return SOM_ResolveD(this,SOMDServer,SOMObject,somDispatchA)
	(this,methodId,descriptor,ap);
}

/* the varargs invocation form */
void*   somDispatchA(somId methodId, 
		somId descriptor, 
		...)
{
/*
 *  Obsolete. Use somDispatch instead.
 */
   va_list ap;
   va_start(ap, descriptor);
   void* __somResult = 
      SOM_ResolveD(this,SOMDServer,SOMObject,somDispatchA)
	(this,methodId,descriptor,ap);
   va_end(ap);
   return __somResult;
}


/* va_list method: somDispatchD */

/*
 *  Obsolete. Use somDispatch instead.
 */
/* the va_list invocation form */
double   SOMDServer_somDispatchD(somId methodId, 
		somId descriptor, 
		va_list ap)
{return SOM_ResolveD(this,SOMDServer,SOMObject,somDispatchD)
	(this,methodId,descriptor,ap);
}

/* the varargs invocation form */
double   somDispatchD(somId methodId, 
		somId descriptor, 
		...)
{
/*
 *  Obsolete. Use somDispatch instead.
 */
   va_list ap;
   va_start(ap, descriptor);
   double __somResult = 
      SOM_ResolveD(this,SOMDServer,SOMObject,somDispatchD)
	(this,methodId,descriptor,ap);
   va_end(ap);
   return __somResult;
}


/* method: somPrintSelf */
SOMObject*   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_ResolveD(this,SOMDServer,SOMObject,somPrintSelf)
	(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_ResolveD(this,SOMDServer,SOMObject,somDumpSelf)
	(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_ResolveD(this,SOMDServer,SOMObject,somDumpSelfInt)
	(this,level);
}



};   /* SOMDServer */



#endif       /* SOM_SOMDServer_xh */
