
/*
 * This file was generated by the SOM Compiler.
 * FileName: SOMOA.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.
 * 
 *    IDL interface spec for SOM Object Adapter (derived from BOA)
 * 
 *    This is DSOM's primary Object Adapter.  It implements the BOA interface.
 */


#ifndef SOM_SOMOA_h
#define SOM_SOMOA_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 SOMOAClassData (*resolve_SOMOAClassData())
#define SOMOACClassData (*resolve_SOMOACClassData())

/*
 * Define the class name as an object type
 */
#ifndef SOMOA
#define SOMOA SOMObject
#endif
#include <boa.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 */
#ifndef Principal
    #define Principal SOMObject
#endif /* Principal */
#ifndef ImplementationDef
    #define ImplementationDef SOMObject
#endif /* ImplementationDef */
#ifndef InterfaceDef
    #define InterfaceDef SOMObject
#endif /* InterfaceDef */
#ifndef Context
    #define Context SOMObject
#endif /* Context */

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

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

#define SOMD_WAIT     1
#define SOMD_NO_WAIT  0
#define SOMD_IMPL_NOT_INITIALIZED          0
#define SOMD_IMPL_NOT_ACTIVE               1
#define SOMD_IMPL_ACTIVE                   2

#ifdef SOM_STRICT_IDL
SOMEXTERN SOMOA * SOMLINK resolve_SOMD_SOMOAObject(void);
#define SOMD_SOMOAObject (*resolve_SOMD_SOMOAObjectResolve())
#else
#define SOMD_SOMOAObject (*resolve_SOMD_SOMOAObject())
SOMEXTERN SOMOA ** SOMLINK resolve_SOMD_SOMOAObject(void);
#endif


#define SOMOA_MajorVersion 2
#define SOMOA_MinorVersion 1

/*
 * External name shortening if required
 */
#ifdef SOM_USE_SHORT_EXTERNAL_NAMES
#define SOMOANewClass c
#define SOMOAClassData d
#define SOMOACClassData x
#endif /* SOM_USE_SHORT_EXTERNAL_NAMES */
/*--------------Migration------------*/
#define SOMOA_classObj SOMOAClassData.classObject
#define _SOMOA SOMOA_classObj

/*
 * Declare the class creation procedure
 */
SOMEXTERN SOMClass * SOMLINK SOMOANewClass(integer4 somntmajorVersion,
		integer4 somntminorVersion);

/*
 * Declare the class data structure
 */
SOMEXTERN struct SOMOAClassDataStructure {
	SOMClass *classObject;
	somMToken execute_next_request;
	somMToken execute_request_loop;
	somMToken create_constant;
	somMToken change_id;
	somMToken create_SOM_ref;
	somMToken get_SOM_object;
	somMToken activate_impl_failed;
	somMToken interrupt_server;
}  _SOMOAClassData;
SOMEXTERN struct SOMOAClassDataStructure * SOMLINK resolve_SOMOAClassData(void);

/*
 * Declare the C specific class data structure
 */
SOMEXTERN struct SOMOACClassDataStructure {
	somMethodTabs parentMtab;
	somDToken instanceDataToken;
}  _SOMOACClassData;
SOMEXTERN struct SOMOACClassDataStructure * SOMLINK resolve_SOMOACClassData(void);

/*
 * New and Renew macros for SOMOA
 */
#define SOMOANew() \
   (_somNew(_SOMOA ? _SOMOA : SOMOANewClass(SOMOA_MajorVersion, SOMOA_MinorVersion)))
#define SOMOARenew(buf) \
   (_somRenew(_SOMOA ? _SOMOA : SOMOANewClass(SOMOA_MajorVersion, SOMOA_MinorVersion), buf))

/*
 * Override method: somInit
 */
#define SOMOA_somInit(somSelf) \
	SOMObject_somInit(somSelf)

/*
 * Override method: somUninit
 */
#define SOMOA_somUninit(somSelf) \
	SOMObject_somUninit(somSelf)

/*
 * Override method: create
 */
#define SOMOA_create(somSelf,ev,id,intf,impl) \
	BOA_create(somSelf,ev,id,intf,impl)

/*
 * Override method: dispose
 */
#define SOMOA_dispose(somSelf,ev,obj) \
	BOA_dispose(somSelf,ev,obj)

/*
 * Override method: change_implementation
 */
#define SOMOA_change_implementation(somSelf,ev,obj,impl) \
	BOA_change_implementation(somSelf,ev,obj,impl)

/*
 * Override method: get_id
 */
#define SOMOA_get_id(somSelf,ev,obj) \
	BOA_get_id(somSelf,ev,obj)

/*
 * Override method: get_principal
 */
#define SOMOA_get_principal(somSelf,ev,obj,req_ev) \
	BOA_get_principal(somSelf,ev,obj,req_ev)

/*
 * Override method: set_exception
 */
#define SOMOA_set_exception(somSelf,ev,major,userid,param) \
	BOA_set_exception(somSelf,ev,major,userid,param)

/*
 * Override method: impl_is_ready
 */
#define SOMOA_impl_is_ready(somSelf,ev,impl) \
	BOA_impl_is_ready(somSelf,ev,impl)

/*
 * Override method: deactivate_impl
 */
#define SOMOA_deactivate_impl(somSelf,ev,impl) \
	BOA_deactivate_impl(somSelf,ev,impl)

/*
 * Override method: obj_is_ready
 */
#define SOMOA_obj_is_ready(somSelf,ev,obj,impl) \
	BOA_obj_is_ready(somSelf,ev,obj,impl)

/*
 * Override method: deactivate_obj
 */
#define SOMOA_deactivate_obj(somSelf,ev,obj) \
	BOA_deactivate_obj(somSelf,ev,obj)

/*
 * New Method: execute_next_request
 */
typedef ORBStatus   (SOMLINK * somTD_SOMOA_execute_next_request)(SOMOA *somSelf, Environment *ev,
		Flags waitFlag);
#define somMD_SOMOA_execute_next_request "::SOMOA::execute_next_request"
#define SOMOA_execute_next_request(somSelf,ev,waitFlag) \
    (SOM_Resolve(somSelf, SOMOA, execute_next_request) \
	(somSelf,ev,waitFlag))
#ifndef SOMGD_execute_next_request
    #if (defined(_execute_next_request) || defined(__execute_next_request))
        #undef _execute_next_request
        #undef __execute_next_request
        #define SOMGD_execute_next_request 1
    #else
        #define _execute_next_request SOMOA_execute_next_request
    #endif /* _execute_next_request */
#endif /* SOMGD_execute_next_request */

/*
 * New Method: execute_request_loop
 */
typedef ORBStatus   (SOMLINK * somTD_SOMOA_execute_request_loop)(SOMOA *somSelf, Environment *ev,
		Flags waitFlag);
#define somMD_SOMOA_execute_request_loop "::SOMOA::execute_request_loop"
#define SOMOA_execute_request_loop(somSelf,ev,waitFlag) \
    (SOM_Resolve(somSelf, SOMOA, execute_request_loop) \
	(somSelf,ev,waitFlag))
#ifndef SOMGD_execute_request_loop
    #if (defined(_execute_request_loop) || defined(__execute_request_loop))
        #undef _execute_request_loop
        #undef __execute_request_loop
        #define SOMGD_execute_request_loop 1
    #else
        #define _execute_request_loop SOMOA_execute_request_loop
    #endif /* _execute_request_loop */
#endif /* SOMGD_execute_request_loop */

/*
 * New Method: change_id
 */
typedef void   (SOMLINK * somTD_SOMOA_change_id)(SOMOA *somSelf, Environment *ev,
		SOMDObject* objref,
		ReferenceData* id);
#define somMD_SOMOA_change_id "::SOMOA::change_id"
#define SOMOA_change_id(somSelf,ev,objref,id) \
    (SOM_Resolve(somSelf, SOMOA, change_id) \
	(somSelf,ev,objref,id))
#ifndef SOMGD_change_id
    #if (defined(_change_id) || defined(__change_id))
        #undef _change_id
        #undef __change_id
        #define SOMGD_change_id 1
    #else
        #define _change_id SOMOA_change_id
    #endif /* _change_id */
#endif /* SOMGD_change_id */

/*
 * New Method: create_constant
 */
typedef SOMDObject*   (SOMLINK * somTD_SOMOA_create_constant)(SOMOA *somSelf, Environment *ev,
		ReferenceData* id,
		InterfaceDef* intf,
		ImplementationDef* impl);
#define somMD_SOMOA_create_constant "::SOMOA::create_constant"
#define SOMOA_create_constant(somSelf,ev,id,intf,impl) \
    (SOM_Resolve(somSelf, SOMOA, create_constant) \
	(somSelf,ev,id,intf,impl))
#ifndef SOMGD_create_constant
    #if (defined(_create_constant) || defined(__create_constant))
        #undef _create_constant
        #undef __create_constant
        #define SOMGD_create_constant 1
    #else
        #define _create_constant SOMOA_create_constant
    #endif /* _create_constant */
#endif /* SOMGD_create_constant */

/*
 * New Method: create_SOM_ref
 */
typedef SOMDObject*   (SOMLINK * somTD_SOMOA_create_SOM_ref)(SOMOA *somSelf, Environment *ev,
		SOMObject* somobj,
		ImplementationDef* impl);
#define somMD_SOMOA_create_SOM_ref "::SOMOA::create_SOM_ref"
#define SOMOA_create_SOM_ref(somSelf,ev,somobj,impl) \
    (SOM_Resolve(somSelf, SOMOA, create_SOM_ref) \
	(somSelf,ev,somobj,impl))
#ifndef SOMGD_create_SOM_ref
    #if (defined(_create_SOM_ref) || defined(__create_SOM_ref))
        #undef _create_SOM_ref
        #undef __create_SOM_ref
        #define SOMGD_create_SOM_ref 1
    #else
        #define _create_SOM_ref SOMOA_create_SOM_ref
    #endif /* _create_SOM_ref */
#endif /* SOMGD_create_SOM_ref */

/*
 * New Method: get_SOM_object
 */
typedef SOMObject*   (SOMLINK * somTD_SOMOA_get_SOM_object)(SOMOA *somSelf, Environment *ev,
		SOMDObject* somref);
#define somMD_SOMOA_get_SOM_object "::SOMOA::get_SOM_object"
#define SOMOA_get_SOM_object(somSelf,ev,somref) \
    (SOM_Resolve(somSelf, SOMOA, get_SOM_object) \
	(somSelf,ev,somref))
#ifndef SOMGD_get_SOM_object
    #if (defined(_get_SOM_object) || defined(__get_SOM_object))
        #undef _get_SOM_object
        #undef __get_SOM_object
        #define SOMGD_get_SOM_object 1
    #else
        #define _get_SOM_object SOMOA_get_SOM_object
    #endif /* _get_SOM_object */
#endif /* SOMGD_get_SOM_object */

/*
 * New Method: activate_impl_failed
 */
typedef void   (SOMLINK * somTD_SOMOA_activate_impl_failed)(SOMOA *somSelf, Environment *ev,
		ImplementationDef* impl,
		ORBStatus rc);
#define somMD_SOMOA_activate_impl_failed "::SOMOA::activate_impl_failed"
#define SOMOA_activate_impl_failed(somSelf,ev,impl,rc) \
    (SOM_Resolve(somSelf, SOMOA, activate_impl_failed) \
	(somSelf,ev,impl,rc))
#ifndef SOMGD_activate_impl_failed
    #if (defined(_activate_impl_failed) || defined(__activate_impl_failed))
        #undef _activate_impl_failed
        #undef __activate_impl_failed
        #define SOMGD_activate_impl_failed 1
    #else
        #define _activate_impl_failed SOMOA_activate_impl_failed
    #endif /* _activate_impl_failed */
#endif /* SOMGD_activate_impl_failed */

/*
 * New Method: interrupt_server
 */
typedef void   (SOMLINK * somTD_SOMOA_interrupt_server)(SOMOA *somSelf, Environment *ev);
#define somMD_SOMOA_interrupt_server "::SOMOA::interrupt_server"
#define SOMOA_interrupt_server(somSelf,ev) \
    (SOM_Resolve(somSelf, SOMOA, interrupt_server) \
	(somSelf,ev))
#ifndef SOMGD_interrupt_server
    #if (defined(_interrupt_server) || defined(__interrupt_server))
        #undef _interrupt_server
        #undef __interrupt_server
        #define SOMGD_interrupt_server 1
    #else
        #define _interrupt_server SOMOA_interrupt_server
    #endif /* _interrupt_server */
#endif /* SOMGD_interrupt_server */
#ifndef SOM_DONT_USE_INHERITED_MACROS
#define SOMOA_somDefaultInit SOMObject_somDefaultInit
#define SOMOA_somDestruct SOMObject_somDestruct
#define SOMOA_somDefaultCopyInit SOMObject_somDefaultCopyInit
#define SOMOA_somDefaultAssign SOMObject_somDefaultAssign
#define SOMOA_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
#define SOMOA_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
#define SOMOA_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
#define SOMOA_somDefaultConstAssign SOMObject_somDefaultConstAssign
#define SOMOA_somDefaultVAssign SOMObject_somDefaultVAssign
#define SOMOA_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
#define SOMOA_somFree SOMObject_somFree
#define SOMOA_somGetClass SOMObject_somGetClass
#define SOMOA_somGetClassName SOMObject_somGetClassName
#define SOMOA_somGetSize SOMObject_somGetSize
#define SOMOA_somIsA SOMObject_somIsA
#define SOMOA_somIsInstanceOf SOMObject_somIsInstanceOf
#define SOMOA_somRespondsTo SOMObject_somRespondsTo
#define SOMOA_somDispatch SOMObject_somDispatch
#define SOMOA_somClassDispatch SOMObject_somClassDispatch
#define SOMOA_somCastObj SOMObject_somCastObj
#define SOMOA_somResetObj SOMObject_somResetObj
#define SOMOA_somDispatchV SOMObject_somDispatchV
#define SOMOA_somDispatchL SOMObject_somDispatchL
#define SOMOA_somDispatchA SOMObject_somDispatchA
#define SOMOA_somDispatchD SOMObject_somDispatchD
#define SOMOA_somPrintSelf SOMObject_somPrintSelf
#define SOMOA_somDumpSelf SOMObject_somDumpSelf
#define SOMOA_somDumpSelfInt SOMObject_somDumpSelfInt
#endif /* SOM_DONT_USE_INHERITED_MACROS */

#endif       /* SOM_SOMOA_h */
