
/*
 * This file was generated by the SOM Compiler.
 * FileName: SOMDSERV.h.
 * Generated using:
 *     SOM Precompiler somipc: 2.29.1.3
 *     SOM Emitter emith.dll: 2.41
 */

/*
 * 
 *    COMPONENT_NAME: somd
 * 
 *    ORIGINS: 27
 * 
 * 
 *    10H9767, 10H9769  (C) COPYRIGHT International Business Machines Corp. 1992,1994
 *    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.
 * 
 *    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 class data structures as resolution macros
 */
#define SOMDServerClassData (*resolve_SOMDServerClassData())
#define SOMDServerCClassData (*resolve_SOMDServerCClassData())

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

/*
 * Start of user-defined types:
 */
#ifndef SOMClass
    #define SOMClass SOMObject
#endif /* SOMClass */
#ifndef Container
    #define Container SOMObject
#endif /* Container */
#ifndef SOMDObject
    #define SOMDObject SOMObject
#endif /* SOMDObject */

/*
 * End of user-defined types.
 */

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

#ifdef SOM_STRICT_IDL
SOMEXTERN SOMDServer  * SOMLINK resolve_SOMD_ServerObject(void);
#define SOMD_ServerObject (*resolve_SOMD_ServerObject())
#else
SOMEXTERN SOMDServer * * SOMLINK resolve_SOMD_ServerObject(void);
#define SOMD_ServerObject (*resolve_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 somntmajorVersion,
		integer4 somntminorVersion);

/*
 * Declare the class data structure
 */
SOMEXTERN struct SOMDServerClassDataStructure {
	SOMClass *classObject;
	somMToken somdSOMObjFromRef;
	somMToken somdRefFromSOMObj;
	somMToken somdCreateObj;
	somMToken somdDeleteObj;
	somMToken somdGetClassObj;
	somMToken somdDispatchMethod;
	somMToken somdObjReferencesCached;
}  _SOMDServerClassData;
SOMEXTERN struct SOMDServerClassDataStructure * SOMLINK resolve_SOMDServerClassData(void);

/*
 * Declare the C specific class data structure
 */
SOMEXTERN struct SOMDServerCClassDataStructure {
	somMethodTabs parentMtab;
	somDToken instanceDataToken;
	somMethodProc *somdDispatchMethod;
}  _SOMDServerCClassData;
SOMEXTERN struct SOMDServerCClassDataStructure * SOMLINK resolve_SOMDServerCClassData(void);

/*
 * 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 * somTD_SOMDServer_somdRefFromSOMObj)(SOMDServer *somSelf, Environment *ev,
		SOMObject* somobj);
#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 * somTD_SOMDServer_somdSOMObjFromRef)(SOMDServer *somSelf, Environment *ev,
		SOMDObject* objref);
#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 * somTD_SOMDServer_somdDispatchMethod)(SOMDServer *somSelf, Environment *ev,
		SOMObject* somobj,
		somToken* retValue,
		somId methodId,
		va_list ap);
#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 * somTD_SOMDServer_somdCreateObj)(SOMDServer *somSelf, Environment *ev,
		Identifier objclass,
		string hints);
#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 * somTD_SOMDServer_somdDeleteObj)(SOMDServer *somSelf, Environment *ev,
		SOMObject* somobj);
#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 * somTD_SOMDServer_somdGetClassObj)(SOMDServer *somSelf, Environment *ev,
		Identifier objclass);
#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 * somTD_SOMDServer_somdObjReferencesCached)(SOMDServer *somSelf, Environment *ev);
#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_somDispatchV SOMObject_somDispatchV
#define SOMDServer_somDispatchL SOMObject_somDispatchL
#define SOMDServer_somDispatchA SOMObject_somDispatchA
#define SOMDServer_somDispatchD SOMObject_somDispatchD
#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 */
