
/*
 * This file was generated by the SOM Compiler.
 * FileName: boa.h.
 * Generated using:
 *     SOM Precompiler somipc: 2.29.1.19
 *     SOM Emitter emith.dll: 2.31.1.64
 */

/*
 *    COMPONENT_NAME: somd
 * 
 *    ORIGINS: 27
 * 
 * 
 *     25H7912  (C)  COPYRIGHT International Business Machines Corp. 1992,1994,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.
 * 
 * 
 *    This is an abstract class which defines the CORBA-defined interface
 *    for a Basic Object Adapter.  The SOM Object Adapter interface is
 *    derived from this one.  SOMOA provides the actual implementation in DSOM.
 */


#ifndef SOM_BOA_h
#define SOM_BOA_h


/*
 * The SOM_STRICT_IDL macro means that we can ignore stars
 * in our declarations of objects.
 */
#define SOM_STRICT_IDL 1


#include <som.h>
#ifndef SOM_IMPORTEXPORT_somd_boa
#ifdef SOM_DLL_somd
	/* export semantics */
	#if defined(SOM_DEFFILE_somd)\
	||(defined(SOM_DEFFILE_BY_DEFAULT)&&!defined(SOM_NODEFFILE_somd))\
	|| !defined(SOM_Module_boa_Source)
	#define SOM_IMPORTEXPORT_somd_boa
	#else
	#define SOM_IMPORTEXPORT_somd_boa SOMDLLEXPORT
	#endif
#else
	#define SOM_IMPORTEXPORT_somd_boa SOMDLLIMPORT
#endif
#endif

/*
 * -- 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 BOA
#define BOA SOMObject
#endif

/*
 * Include Parent Bindings
 */
#ifndef SOM_SOMObject_h
#ifdef SOMLOCALINCLUDES
#include "somobj.h"
#else
#include <somobj.h>
#endif
#endif

/*
 * 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 */
#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 bindings for IDL types.
 */

#define BOA_MajorVersion 2
#define BOA_MinorVersion 2

/*
 * Include the metaclass file
 */
#ifndef SOM_SOMMSingleInstance_h
#ifdef SOMLOCALINCLUDES
#include "snglicls.h"
#else
#include <snglicls.h>
#endif
#endif

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

/*
 * Declare the ABI 2 ClassData structure
 */
SOMEXTERN struct BOAClassDataStructure {
	SOMClass classObject;
	somMToken create;
	somMToken dispose;
	somMToken get_id;
	somMToken change_implementation;
	somMToken get_principal;
	somMToken set_exception;
	somMToken impl_is_ready;
	somMToken deactivate_impl;
	somMToken obj_is_ready;
	somMToken deactivate_obj;
	somMToken unused1;
	somMToken unused2;
} SOM_IMPORTEXPORT_somd_boa SOMDLINK BOAClassData;

/*
 * Declare the ABI 2 CClassData structure
 */
SOMEXTERN struct BOACClassDataStructure {
	somMethodTabs parentMtab;
	somDToken instanceDataToken;
} SOM_IMPORTEXPORT_somd_boa SOMDLINK BOACClassData;

/*
 * Class Object and Method Token Macros
 */
#define _SOMCLASS_BOA (BOAClassData.classObject)
#ifndef SOMGD_BOA
    #if (defined(_BOA) || defined(__BOA))
        #undef _BOA
        #undef __BOA
        #define SOMGD_BOA 1
    #else
        #define _BOA _SOMCLASS_BOA
    #endif /* _BOA */
#endif /* SOMGD_BOA */
#define BOA_classObj _SOMCLASS_BOA
#define _SOMMTOKEN_BOA(method) ((somMToken)BOAClassData.method)

/*
 * New and Renew macros for BOA
 */
#define BOANew() \
   ( _BOA ? \
	_somNew(_BOA) \
	: ( BOANewClass(\
		BOA_MajorVersion, \
		BOA_MinorVersion),\
	   _somNew(_BOA)))
#define BOARenew(buf) \
   ( _BOA ? \
	_somRenew(_BOA, buf) \
	: ( BOANewClass(\
		BOA_MajorVersion, \
		BOA_MinorVersion),\
	   _somRenew(_BOA, buf)))

/*
 * New Method: create
 */
typedef SOMDObject   SOMLINK somTP_BOA_create(BOA somSelf, Environment *ev, 
		ReferenceData* id, 
		InterfaceDef intf, 
		ImplementationDef impl);
typedef somTP_BOA_create *somTD_BOA_create;
/*
 *  Creates a SOMDObject which is used as as "reference" to a local
 *  application object.  An object reference is simply an object
 *  which is used to refer to another target object.
 */
#define somMD_BOA_create "::BOA::create"
#define BOA_create(somSelf,ev,id,intf,impl) \
    (SOM_Resolve(somSelf, BOA, create) \
	(somSelf,ev,id,intf,impl))
#ifndef SOMGD_create
    #if (defined(_create) || defined(__create))
        #undef _create
        #undef __create
        #define SOMGD_create 1
    #else
        #define _create BOA_create
    #endif /* _create */
#endif /* SOMGD_create */

/*
 * New Method: dispose
 */
typedef void   SOMLINK somTP_BOA_dispose(BOA somSelf, Environment *ev, 
		SOMDObject obj);
typedef somTP_BOA_dispose *somTD_BOA_dispose;
/*
 *  Destroys an object reference.
 */
#define somMD_BOA_dispose "::BOA::dispose"
#define BOA_dispose(somSelf,ev,obj) \
    (SOM_Resolve(somSelf, BOA, dispose) \
	(somSelf,ev,obj))
#ifndef SOMGD_dispose
    #if (defined(_dispose) || defined(__dispose))
        #undef _dispose
        #undef __dispose
        #define SOMGD_dispose 1
    #else
        #define _dispose BOA_dispose
    #endif /* _dispose */
#endif /* SOMGD_dispose */

/*
 * New Method: get_id
 */
typedef ReferenceData   SOMLINK somTP_BOA_get_id(BOA somSelf, Environment *ev, 
		SOMDObject obj);
typedef somTP_BOA_get_id *somTD_BOA_get_id;
/*
 *  Returns ReferenceData associated with referenced object.
 */
#define somMD_BOA_get_id "::BOA::get_id"
#define BOA_get_id(somSelf,ev,obj) \
    (SOM_Resolve(somSelf, BOA, get_id) \
	(somSelf,ev,obj))
#ifndef SOMGD_get_id
    #if (defined(_get_id) || defined(__get_id))
        #undef _get_id
        #undef __get_id
        #define SOMGD_get_id 1
    #else
        #define _get_id BOA_get_id
    #endif /* _get_id */
#endif /* SOMGD_get_id */

/*
 * New Method: get_principal
 */
typedef Principal   SOMLINK somTP_BOA_get_principal(BOA somSelf, Environment *ev, 
		SOMDObject obj, 
		Environment* req_ev);
typedef somTP_BOA_get_principal *somTD_BOA_get_principal;
/*
 *  Returns the ID of the principal that issued the request.
 */
#define somMD_BOA_get_principal "::BOA::get_principal"
#define BOA_get_principal(somSelf,ev,obj,req_ev) \
    (SOM_Resolve(somSelf, BOA, get_principal) \
	(somSelf,ev,obj,req_ev))
#ifndef SOMGD_get_principal
    #if (defined(_get_principal) || defined(__get_principal))
        #undef _get_principal
        #undef __get_principal
        #define SOMGD_get_principal 1
    #else
        #define _get_principal BOA_get_principal
    #endif /* _get_principal */
#endif /* SOMGD_get_principal */

/*
 * New Method: set_exception
 */
typedef void   SOMLINK somTP_BOA_set_exception(BOA somSelf, Environment *ev, 
		exception_type major, 
		string userid, 
		void* param);
typedef somTP_BOA_set_exception *somTD_BOA_set_exception;
/*
 *  Returns an exception to the client.
 */
#define somMD_BOA_set_exception "::BOA::set_exception"
#define BOA_set_exception(somSelf,ev,major,userid,param) \
    (SOM_Resolve(somSelf, BOA, set_exception) \
	(somSelf,ev,major,userid,param))
#ifndef SOMGD_set_exception
    #if (defined(_set_exception) || defined(__set_exception))
        #undef _set_exception
        #undef __set_exception
        #define SOMGD_set_exception 1
    #else
        #define _set_exception BOA_set_exception
    #endif /* _set_exception */
#endif /* SOMGD_set_exception */

/*
 * New Method: impl_is_ready
 */
typedef void   SOMLINK somTP_BOA_impl_is_ready(BOA somSelf, Environment *ev, 
		ImplementationDef impl);
typedef somTP_BOA_impl_is_ready *somTD_BOA_impl_is_ready;
/*
 *  Indicates that the implementation is now ready to process requests.
 */
#define somMD_BOA_impl_is_ready "::BOA::impl_is_ready"
#define BOA_impl_is_ready(somSelf,ev,impl) \
    (SOM_Resolve(somSelf, BOA, impl_is_ready) \
	(somSelf,ev,impl))
#ifndef SOMGD_impl_is_ready
    #if (defined(_impl_is_ready) || defined(__impl_is_ready))
        #undef _impl_is_ready
        #undef __impl_is_ready
        #define SOMGD_impl_is_ready 1
    #else
        #define _impl_is_ready BOA_impl_is_ready
    #endif /* _impl_is_ready */
#endif /* SOMGD_impl_is_ready */

/*
 * New Method: deactivate_impl
 */
typedef void   SOMLINK somTP_BOA_deactivate_impl(BOA somSelf, Environment *ev, 
		ImplementationDef impl);
typedef somTP_BOA_deactivate_impl *somTD_BOA_deactivate_impl;
/*
 *  Indicates that the implementation is no longer ready to process reqs.
 */
#define somMD_BOA_deactivate_impl "::BOA::deactivate_impl"
#define BOA_deactivate_impl(somSelf,ev,impl) \
    (SOM_Resolve(somSelf, BOA, deactivate_impl) \
	(somSelf,ev,impl))
#ifndef SOMGD_deactivate_impl
    #if (defined(_deactivate_impl) || defined(__deactivate_impl))
        #undef _deactivate_impl
        #undef __deactivate_impl
        #define SOMGD_deactivate_impl 1
    #else
        #define _deactivate_impl BOA_deactivate_impl
    #endif /* _deactivate_impl */
#endif /* SOMGD_deactivate_impl */

/*
 * New Method: change_implementation
 */
typedef void   SOMLINK somTP_BOA_change_implementation(BOA somSelf, Environment *ev, 
		SOMDObject obj, 
		ImplementationDef impl);
typedef somTP_BOA_change_implementation *somTD_BOA_change_implementation;
/*
 *  Changes the implementation associated with the referenced object.
 *  Change is seen for all copies of the object reference.
 *  (NOTE: Null implementation in this release of DSOM.)
 */
#define somMD_BOA_change_implementation "::BOA::change_implementation"
#define BOA_change_implementation(somSelf,ev,obj,impl) \
    (SOM_Resolve(somSelf, BOA, change_implementation) \
	(somSelf,ev,obj,impl))
#ifndef SOMGD_change_implementation
    #if (defined(_change_implementation) || defined(__change_implementation))
        #undef _change_implementation
        #undef __change_implementation
        #define SOMGD_change_implementation 1
    #else
        #define _change_implementation BOA_change_implementation
    #endif /* _change_implementation */
#endif /* SOMGD_change_implementation */

/*
 * New Method: obj_is_ready
 */
typedef void   SOMLINK somTP_BOA_obj_is_ready(BOA somSelf, Environment *ev, 
		SOMDObject obj, 
		ImplementationDef impl);
typedef somTP_BOA_obj_is_ready *somTD_BOA_obj_is_ready;
/*
 *  Indicates that the object is ready to process requests.
 *  (NOTE: Null implementation in this release of DSOM.)
 */
#define somMD_BOA_obj_is_ready "::BOA::obj_is_ready"
#define BOA_obj_is_ready(somSelf,ev,obj,impl) \
    (SOM_Resolve(somSelf, BOA, obj_is_ready) \
	(somSelf,ev,obj,impl))
#ifndef SOMGD_obj_is_ready
    #if (defined(_obj_is_ready) || defined(__obj_is_ready))
        #undef _obj_is_ready
        #undef __obj_is_ready
        #define SOMGD_obj_is_ready 1
    #else
        #define _obj_is_ready BOA_obj_is_ready
    #endif /* _obj_is_ready */
#endif /* SOMGD_obj_is_ready */

/*
 * New Method: deactivate_obj
 */
typedef void   SOMLINK somTP_BOA_deactivate_obj(BOA somSelf, Environment *ev, 
		SOMDObject obj);
typedef somTP_BOA_deactivate_obj *somTD_BOA_deactivate_obj;
/*
 *  Indicates that the object is no longer ready to process requests.
 *  (NOTE: Null implementation in this release of DSOM.)
 */
#define somMD_BOA_deactivate_obj "::BOA::deactivate_obj"
#define BOA_deactivate_obj(somSelf,ev,obj) \
    (SOM_Resolve(somSelf, BOA, deactivate_obj) \
	(somSelf,ev,obj))
#ifndef SOMGD_deactivate_obj
    #if (defined(_deactivate_obj) || defined(__deactivate_obj))
        #undef _deactivate_obj
        #undef __deactivate_obj
        #define SOMGD_deactivate_obj 1
    #else
        #define _deactivate_obj BOA_deactivate_obj
    #endif /* _deactivate_obj */
#endif /* SOMGD_deactivate_obj */

/*
 * Full Names for Inherited Methods
 */

#ifndef SOM_DONT_USE_INHERITED_MACROS
#define BOA_somDefaultInit SOMObject_somDefaultInit
#define BOA_somDestruct SOMObject_somDestruct
#define BOA_somDefaultCopyInit SOMObject_somDefaultCopyInit
#define BOA_somDefaultAssign SOMObject_somDefaultAssign
#define BOA_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
#define BOA_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
#define BOA_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
#define BOA_somDefaultConstAssign SOMObject_somDefaultConstAssign
#define BOA_somDefaultVAssign SOMObject_somDefaultVAssign
#define BOA_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
#define BOA_somInit SOMObject_somInit
#define BOA_somUninit SOMObject_somUninit
#define BOA_somFree SOMObject_somFree
#define BOA_somGetClass SOMObject_somGetClass
#define BOA_somGetClassName SOMObject_somGetClassName
#define BOA_somGetSize SOMObject_somGetSize
#define BOA_somIsA SOMObject_somIsA
#define BOA_somIsInstanceOf SOMObject_somIsInstanceOf
#define BOA_somRespondsTo SOMObject_somRespondsTo
#define BOA_somDispatch SOMObject_somDispatch
#define BOA_somClassDispatch SOMObject_somClassDispatch
#define BOA_somCastObj SOMObject_somCastObj
#define BOA_somResetObj SOMObject_somResetObj
#define BOA_somPrintSelf SOMObject_somPrintSelf
#define BOA_somDumpSelf SOMObject_somDumpSelf
#define BOA_somDumpSelfInt SOMObject_somDumpSelfInt
#endif /* SOM_DONT_USE_INHERITED_MACROS */

#endif       /* SOM_BOA_h */
