
/*
 * This file was generated by the SOM Compiler.
 * FileName: F:\build\newproj\include.ppc\somdserv.h.
 * Generated using:
 *     SOM Precompiler somipc: 2.29.1.3
 *     SOM Emitter emith: 2.41
 */

/*
 *    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_h
#define SOM_SOMDServer_h


#include <som.h>

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

/*
 * Define the class name as an object type
 */
#ifndef SOMDServer
#define SOMDServer SOMObject
#endif
#include <somobj.h>

/*
 * Start of bindings for IDL types
 */

#ifndef SOMClass
    #define SOMClass SOMObject
#endif /* SOMClass */
#ifndef Container
    #define Container SOMObject
#endif /* Container */
#ifndef SOMDObject
    #define SOMDObject SOMObject
#endif /* SOMDObject */

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

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

#ifdef SOM_STRICT_IDL
SOMEXTERN SOMDServer  SOMDLINK SOMD_ServerObject;  /* global variable */
#else
SOMEXTERN SOMDServer * SOMDLINK SOMD_ServerObject;
#endif /* SOM_STRICT_IDL */


#define SOMDServer_MajorVersion 2
#define SOMDServer_MinorVersion 1

/*
 * External name shortening if required
 */
#ifdef SOM_USE_SHORT_EXTERNAL_NAMES
#define SOMDServerNewClass c
#define SOMDServerClassData d
#define SOMDServerCClassData x
#endif /* SOM_USE_SHORT_EXTERNAL_NAMES */

/*
 * Include the meta class file
 */
#include <snglicls.h>
/*--------------Migration------------*/
#define SOMDServer_classObj SOMDServerClassData.classObject
#define _SOMDServer SOMDServer_classObj

/*
 * Declare the class creation procedure
 */
SOMEXTERN SOMClass * SOMLINK SOMDServerNewClass(integer4 somtmajorVersion,
		integer4 somtminorVersion);

/*
 * Declare the class data structure
 */
SOMEXTERN struct SOMDServerClassDataStructure {
	SOMClass *classObject;
	somMToken somdSOMObjFromRef;
	somMToken somdRefFromSOMObj;
	somMToken somdCreateObj;
	somMToken somdDeleteObj;
	somMToken somdGetClassObj;
	somMToken somdDispatchMethod;
	somMToken somdObjReferencesCached;
} SOMDLINK SOMDServerClassData;

/*
 * Declare the C specific class data structure
 */
SOMEXTERN struct SOMDServerCClassDataStructure {
	somMethodTabs parentMtab;
	somDToken instanceDataToken;
	somMethodProc *somdDispatchMethod;
} SOMDLINK SOMDServerCClassData;

/*
 * New and Renew macros for SOMDServer
 */
#define SOMDServerNew() \
   (_somNew(_SOMDServer ? _SOMDServer : SOMDServerNewClass(SOMDServer_MajorVersion, SOMDServer_MinorVersion)))
#define SOMDServerRenew(buf) \
   (_somRenew(_SOMDServer ? _SOMDServer : SOMDServerNewClass(SOMDServer_MajorVersion, SOMDServer_MinorVersion), buf))

/*
 * New Method: somdRefFromSOMObj
 */
typedef SOMDObject*   SOMLINK somTP_SOMDServer_somdRefFromSOMObj(SOMDServer *somSelf, Environment *ev, 
		SOMObject* somobj);
typedef somTP_SOMDServer_somdRefFromSOMObj *somTD_SOMDServer_somdRefFromSOMObj;
#define somMD_SOMDServer_somdRefFromSOMObj "::SOMDServer::somdRefFromSOMObj"
#define SOMDServer_somdRefFromSOMObj(somSelf,ev,somobj) \
    (SOM_Resolve(somSelf, SOMDServer, somdRefFromSOMObj) \
	(somSelf,ev,somobj))
#ifndef SOMGD_somdRefFromSOMObj
    #if (defined(_somdRefFromSOMObj) || defined(__somdRefFromSOMObj))
        #undef _somdRefFromSOMObj
        #undef __somdRefFromSOMObj
        #define SOMGD_somdRefFromSOMObj 1
    #else
        #define _somdRefFromSOMObj SOMDServer_somdRefFromSOMObj
    #endif /* _somdRefFromSOMObj */
#endif /* SOMGD_somdRefFromSOMObj */

/*
 * New Method: somdSOMObjFromRef
 */
typedef SOMObject*   SOMLINK somTP_SOMDServer_somdSOMObjFromRef(SOMDServer *somSelf, Environment *ev, 
		SOMDObject* objref);
typedef somTP_SOMDServer_somdSOMObjFromRef *somTD_SOMDServer_somdSOMObjFromRef;
#define somMD_SOMDServer_somdSOMObjFromRef "::SOMDServer::somdSOMObjFromRef"
#define SOMDServer_somdSOMObjFromRef(somSelf,ev,objref) \
    (SOM_Resolve(somSelf, SOMDServer, somdSOMObjFromRef) \
	(somSelf,ev,objref))
#ifndef SOMGD_somdSOMObjFromRef
    #if (defined(_somdSOMObjFromRef) || defined(__somdSOMObjFromRef))
        #undef _somdSOMObjFromRef
        #undef __somdSOMObjFromRef
        #define SOMGD_somdSOMObjFromRef 1
    #else
        #define _somdSOMObjFromRef SOMDServer_somdSOMObjFromRef
    #endif /* _somdSOMObjFromRef */
#endif /* SOMGD_somdSOMObjFromRef */

/*
 * New Method: somdDispatchMethod
 */
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;
#define somMD_SOMDServer_somdDispatchMethod "::SOMDServer::somdDispatchMethod"
#define SOMDServer_somdDispatchMethod(somSelf,ev,somobj,retValue,methodId,ap) \
    (SOM_Resolve(somSelf, SOMDServer, somdDispatchMethod) \
	(somSelf,ev,somobj,retValue,methodId,ap))
#ifndef SOMGD_va_somdDispatchMethod
   #ifdef va_somdDispatchMethod
      #undef va_somdDispatchMethod
      #define SOMGD_va_somdDispatchMethod 1
   #else
      #define va_somdDispatchMethod va_SOMDServer_somdDispatchMethod
   #endif /* va_somdDispatchMethod */
#endif /* SOMGD_va_somdDispatchMethod */
#ifndef SOMGD_somdDispatchMethod
    #if (defined(_somdDispatchMethod) || defined(__somdDispatchMethod))
        #undef _somdDispatchMethod
        #undef __somdDispatchMethod
        #define SOMGD_somdDispatchMethod 1
    #else
        #define _somdDispatchMethod va_SOMDServer_somdDispatchMethod
    #endif /* _somdDispatchMethod */
#endif /* SOMGD_somdDispatchMethod */
#ifdef SOMDServer_VA_EXTERN
    SOMEXTERN
#else
    static
#endif
void  SOMLINK va_SOMDServer_somdDispatchMethod(SOMDServer *somSelf, Environment *ev,
		SOMObject* somobj,
		somToken* retValue,
		somId methodId,
		...)
#if (defined(SOMDServer_VA_STUBS)||!defined(SOMDServer_VA_EXTERN))
{
    va_list ap;
    va_start(ap, methodId);
    SOMDServer_somdDispatchMethod(somSelf,ev,somobj,retValue,methodId,ap);
    va_end(ap);
}    
#else
    ;
#endif

/*
 * New Method: somdCreateObj
 */
typedef SOMObject*   SOMLINK somTP_SOMDServer_somdCreateObj(SOMDServer *somSelf, Environment *ev, 
		Identifier objclass, 
		string hints);
typedef somTP_SOMDServer_somdCreateObj *somTD_SOMDServer_somdCreateObj;
#define somMD_SOMDServer_somdCreateObj "::SOMDServer::somdCreateObj"
#define SOMDServer_somdCreateObj(somSelf,ev,objclass,hints) \
    (SOM_Resolve(somSelf, SOMDServer, somdCreateObj) \
	(somSelf,ev,objclass,hints))
#ifndef SOMGD_somdCreateObj
    #if (defined(_somdCreateObj) || defined(__somdCreateObj))
        #undef _somdCreateObj
        #undef __somdCreateObj
        #define SOMGD_somdCreateObj 1
    #else
        #define _somdCreateObj SOMDServer_somdCreateObj
    #endif /* _somdCreateObj */
#endif /* SOMGD_somdCreateObj */

/*
 * New Method: somdDeleteObj
 */
typedef void   SOMLINK somTP_SOMDServer_somdDeleteObj(SOMDServer *somSelf, Environment *ev, 
		SOMObject* somobj);
typedef somTP_SOMDServer_somdDeleteObj *somTD_SOMDServer_somdDeleteObj;
#define somMD_SOMDServer_somdDeleteObj "::SOMDServer::somdDeleteObj"
#define SOMDServer_somdDeleteObj(somSelf,ev,somobj) \
    (SOM_Resolve(somSelf, SOMDServer, somdDeleteObj) \
	(somSelf,ev,somobj))
#ifndef SOMGD_somdDeleteObj
    #if (defined(_somdDeleteObj) || defined(__somdDeleteObj))
        #undef _somdDeleteObj
        #undef __somdDeleteObj
        #define SOMGD_somdDeleteObj 1
    #else
        #define _somdDeleteObj SOMDServer_somdDeleteObj
    #endif /* _somdDeleteObj */
#endif /* SOMGD_somdDeleteObj */

/*
 * New Method: somdGetClassObj
 */
typedef SOMClass*   SOMLINK somTP_SOMDServer_somdGetClassObj(SOMDServer *somSelf, Environment *ev, 
		Identifier objclass);
typedef somTP_SOMDServer_somdGetClassObj *somTD_SOMDServer_somdGetClassObj;
#define somMD_SOMDServer_somdGetClassObj "::SOMDServer::somdGetClassObj"
#define SOMDServer_somdGetClassObj(somSelf,ev,objclass) \
    (SOM_Resolve(somSelf, SOMDServer, somdGetClassObj) \
	(somSelf,ev,objclass))
#ifndef SOMGD_somdGetClassObj
    #if (defined(_somdGetClassObj) || defined(__somdGetClassObj))
        #undef _somdGetClassObj
        #undef __somdGetClassObj
        #define SOMGD_somdGetClassObj 1
    #else
        #define _somdGetClassObj SOMDServer_somdGetClassObj
    #endif /* _somdGetClassObj */
#endif /* SOMGD_somdGetClassObj */

/*
 * New Method: somdObjReferencesCached
 */
typedef boolean   SOMLINK somTP_SOMDServer_somdObjReferencesCached(SOMDServer *somSelf, Environment *ev);
typedef somTP_SOMDServer_somdObjReferencesCached *somTD_SOMDServer_somdObjReferencesCached;
#define somMD_SOMDServer_somdObjReferencesCached "::SOMDServer::somdObjReferencesCached"
#define SOMDServer_somdObjReferencesCached(somSelf,ev) \
    (SOM_Resolve(somSelf, SOMDServer, somdObjReferencesCached) \
	(somSelf,ev))
#ifndef SOMGD_somdObjReferencesCached
    #if (defined(_somdObjReferencesCached) || defined(__somdObjReferencesCached))
        #undef _somdObjReferencesCached
        #undef __somdObjReferencesCached
        #define SOMGD_somdObjReferencesCached 1
    #else
        #define _somdObjReferencesCached SOMDServer_somdObjReferencesCached
    #endif /* _somdObjReferencesCached */
#endif /* SOMGD_somdObjReferencesCached */
#ifndef SOM_DONT_USE_INHERITED_MACROS
#define SOMDServer_somDefaultInit SOMObject_somDefaultInit
#define SOMDServer_somDestruct SOMObject_somDestruct
#define SOMDServer_somDefaultCopyInit SOMObject_somDefaultCopyInit
#define SOMDServer_somDefaultAssign SOMObject_somDefaultAssign
#define SOMDServer_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
#define SOMDServer_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
#define SOMDServer_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
#define SOMDServer_somDefaultConstAssign SOMObject_somDefaultConstAssign
#define SOMDServer_somDefaultVAssign SOMObject_somDefaultVAssign
#define SOMDServer_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
#define SOMDServer_somInit SOMObject_somInit
#define SOMDServer_somFree SOMObject_somFree
#define SOMDServer_somUninit SOMObject_somUninit
#define SOMDServer_somGetClass SOMObject_somGetClass
#define SOMDServer_somGetClassName SOMObject_somGetClassName
#define SOMDServer_somGetSize SOMObject_somGetSize
#define SOMDServer_somIsA SOMObject_somIsA
#define SOMDServer_somIsInstanceOf SOMObject_somIsInstanceOf
#define SOMDServer_somRespondsTo SOMObject_somRespondsTo
#define SOMDServer_somDispatch SOMObject_somDispatch
#define SOMDServer_somClassDispatch SOMObject_somClassDispatch
#define SOMDServer_somCastObj SOMObject_somCastObj
#define SOMDServer_somResetObj SOMObject_somResetObj
#define SOMDServer_somPrintSelf SOMObject_somPrintSelf
#define SOMDServer_somDumpSelf SOMObject_somDumpSelf
#define SOMDServer_somDumpSelfInt SOMObject_somDumpSelfInt
#endif /* SOM_DONT_USE_INHERITED_MACROS */

#endif       /* SOM_SOMDServer_h */
