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

/*
 *   @(#) 2.44 src/somd/orb.idl, somd, som3.0 9/26/96 14:02:08 [12/22/96 21:11:47]
 * 
 * 
 *    COMPONENT_NAME: somd
 * 
 *    ORIGINS: 27
 * 
 * 
 *     25H7912  (C)  COPYRIGHT International Business Machines Corp. 1992,1996,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.
 * 
 * 
 *   The ORB class implements the CORBA ORB object.  The ORB class defines
 *   operations for:
 *     - converting between object references and strings
 *     - creating NVLists and determining the default context (support for DII)
 *     - obtaining initial references to basic object services
 */


#ifndef SOM_ORB_h
#define SOM_ORB_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_orb
#ifdef SOM_DLL_somd
	/* export semantics */
	#if defined(SOM_DEFFILE_somd)\
	||(defined(SOM_DEFFILE_BY_DEFAULT)&&!defined(SOM_NODEFFILE_somd))\
	|| !defined(SOM_Module_orb_Source)
	#define SOM_IMPORTEXPORT_somd_orb
	#else
	#define SOM_IMPORTEXPORT_somd_orb SOMDLLEXPORT
	#endif
#else
	#define SOM_IMPORTEXPORT_somd_orb 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 ORB
#define ORB 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 Principal
    #define Principal SOMObject
#endif /* Principal */
#ifndef OperationDef
    #define OperationDef SOMObject
#endif /* OperationDef */
#ifndef SOMDObject
    #define SOMDObject SOMObject
#endif /* SOMDObject */
#ifndef NVList
    #define NVList SOMObject
#endif /* NVList */
#ifndef Context
    #define Context SOMObject
#endif /* Context */
typedef
string  ORB_ObjectId;
#ifndef _IDL_SEQUENCE_string_defined
#define _IDL_SEQUENCE_string_defined
typedef struct {
    unsigned long _maximum;
    unsigned long _length;
    string *_buffer;
} _IDL_SEQUENCE_string;
#endif /* _IDL_SEQUENCE_string_defined */ 
typedef
_IDL_SEQUENCE_string ORB_ObjectIdList;
#define ex_ORB_InvalidName "::ORB::InvalidName"
#define ORB_InvalidName NULL

#ifndef SOM_DONT_USE_SHORT_NAMES
#ifndef SOMTGD_ObjectId
    #ifdef ObjectId
        #undef ObjectId
        #define SOMTGD_ObjectId 1
    #else
        #define ObjectId ORB_ObjectId
    #endif /* ObjectId */
#endif /* SOMTGD_ObjectId */
#endif /* SOM_DONT_USE_SHORT_NAMES */

#ifndef SOM_DONT_USE_SHORT_NAMES

#ifndef SOM_DONT_USE_SHORT_NAMES
#ifndef SOMTGD_ObjectIdList
    #ifdef ObjectIdList
        #undef ObjectIdList
        #define SOMTGD_ObjectIdList 1
    #else
        #define ObjectIdList ORB_ObjectIdList
    #endif /* ObjectIdList */
#endif /* SOMTGD_ObjectIdList */
#endif /* SOM_DONT_USE_SHORT_NAMES */
#ifndef SOMTGD_ex_InvalidName
    #ifdef ex_InvalidName
        #undef ex_InvalidName
        #define SOMTGD_ex_InvalidName 1
    #else
        #define ex_InvalidName ex_ORB_InvalidName
    #endif /* ex_InvalidName */
#endif /* SOMTGD_ex_InvalidName */
#ifndef SOMTGD_InvalidName
    #ifdef InvalidName
        #undef InvalidName
        #define SOMTGD_InvalidName 1
    #else
        #define InvalidName ORB_InvalidName
    #endif /* InvalidName */
#endif /* SOMTGD_InvalidName */
#endif /* SOM_DONT_USE_SHORT_NAMES */

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

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

#ifndef SOM_IMPORTEXPORT_somd
#if defined(_WIN32) && !defined(SOM_DLL_somd)
#define SOM_IMPORTEXPORT_somd SOMDLLIMPORT
#else
#define SOM_IMPORTEXPORT_somd
#endif
#endif
#ifdef SOM_STRICT_IDL
SOMEXTERN SOM_IMPORTEXPORT_somd ORB   SOMDLINK SOMD_ORBObject;
#else
SOMEXTERN SOM_IMPORTEXPORT_somd ORB * SOMDLINK SOMD_ORBObject;
#endif /* SOM_STRICT_IDL */

#include <somdobj.h>


#define ORB_MajorVersion 2
#define ORB_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_orb SOMClass  SOMLINK ORBNewClass(integer4 somtmajorVersion,
		integer4 somtminorVersion);

/*
 * Declare the ABI 2 ClassData structure
 */
SOMEXTERN struct ORBClassDataStructure {
	SOMClass classObject;
	somMToken object_to_string;
	somMToken string_to_object;
	somMToken create_list;
	somMToken create_operation_list;
	somMToken get_default_context;
	somMToken private1;
	somMToken private2;
	somMToken private3;
	somMToken private4;
	somMToken list_initial_services;
	somMToken resolve_initial_references;
	somMToken _get_stringToObject30;
	somMToken _set_stringToObject30;
	somMToken private5;
	somMToken private6;
	somMToken private7;
	somMToken private8;
} SOM_IMPORTEXPORT_somd_orb SOMDLINK ORBClassData;

/*
 * Declare the ABI 2 CClassData structure
 */
SOMEXTERN struct ORBCClassDataStructure {
	somMethodTabs parentMtab;
	somDToken instanceDataToken;
} SOM_IMPORTEXPORT_somd_orb SOMDLINK ORBCClassData;

/*
 * Class Object and Method Token Macros
 */
#define _SOMCLASS_ORB (ORBClassData.classObject)
#ifndef SOMGD_ORB
    #if (defined(_ORB) || defined(__ORB))
        #undef _ORB
        #undef __ORB
        #define SOMGD_ORB 1
    #else
        #define _ORB _SOMCLASS_ORB
    #endif /* _ORB */
#endif /* SOMGD_ORB */
#define ORB_classObj _SOMCLASS_ORB
#define _SOMMTOKEN_ORB(method) ((somMToken)ORBClassData.method)

/*
 * New and Renew macros for ORB
 */
#define ORBNew() \
   ( _ORB ? \
	_somNew(_ORB) \
	: ( ORBNewClass(\
		ORB_MajorVersion, \
		ORB_MinorVersion),\
	   _somNew(_ORB)))
#define ORBRenew(buf) \
   ( _ORB ? \
	_somRenew(_ORB, buf) \
	: ( ORBNewClass(\
		ORB_MajorVersion, \
		ORB_MinorVersion),\
	   _somRenew(_ORB, buf)))

/*
 * New Method: object_to_string
 */
typedef string   SOMLINK somTP_ORB_object_to_string(ORB somSelf, Environment *ev, 
		SOMObject obj);
typedef somTP_ORB_object_to_string *somTD_ORB_object_to_string;
/*
 *  Converts an object reference to its external form.  The external
 *  form of an object reference is defined by CORBA 2.0.  One
 *  exception is the external form of a local object in a client-only
 *  process, which will have a different form.
 *  OWNERSHIP of allocated memory is transferred to the caller.
 */
#define somMD_ORB_object_to_string "::ORB::object_to_string"
#define ORB_object_to_string(somSelf,ev,obj) \
    (SOM_Resolve(somSelf, ORB, object_to_string) \
	(somSelf,ev,obj))
#ifndef SOMGD_object_to_string
    #if (defined(_object_to_string) || defined(__object_to_string))
        #undef _object_to_string
        #undef __object_to_string
        #define SOMGD_object_to_string 1
    #else
        #define _object_to_string ORB_object_to_string
    #endif /* _object_to_string */
#endif /* SOMGD_object_to_string */

/*
 * New Method: string_to_object
 */
typedef SOMObject   SOMLINK somTP_ORB_string_to_object(ORB somSelf, Environment *ev, 
		string str);
typedef somTP_ORB_string_to_object *somTD_ORB_string_to_object;
/*
 *  Converts externalized form back to an object reference.  If the
 *  input string represents a local object in a client-only process,
 *  and the object is no longer valid, another instance of the class
 *  will be created.
 *  OWNERSHIP of allocated memory is transferred to the caller.
 */
#define somMD_ORB_string_to_object "::ORB::string_to_object"
#define ORB_string_to_object(somSelf,ev,str) \
    (SOM_Resolve(somSelf, ORB, string_to_object) \
	(somSelf,ev,str))
#ifndef SOMGD_string_to_object
    #if (defined(_string_to_object) || defined(__string_to_object))
        #undef _string_to_object
        #undef __string_to_object
        #define SOMGD_string_to_object 1
    #else
        #define _string_to_object ORB_string_to_object
    #endif /* _string_to_object */
#endif /* SOMGD_string_to_object */

/*
 * New Method: create_list
 */
typedef ORBStatus   SOMLINK somTP_ORB_create_list(ORB somSelf, Environment *ev, 
		long count, 
		NVList* new_list);
typedef somTP_ORB_create_list *somTD_ORB_create_list;
/*
 *  Creates an NVList of the specified size.
 *  OWNERSHIP of allocated "new_list" is transferred to the caller.
 */
#define somMD_ORB_create_list "::ORB::create_list"
#define ORB_create_list(somSelf,ev,count,new_list) \
    (SOM_Resolve(somSelf, ORB, create_list) \
	(somSelf,ev,count,new_list))
#ifndef SOMGD_create_list
    #if (defined(_create_list) || defined(__create_list))
        #undef _create_list
        #undef __create_list
        #define SOMGD_create_list 1
    #else
        #define _create_list ORB_create_list
    #endif /* _create_list */
#endif /* SOMGD_create_list */

/*
 * New Method: create_operation_list
 */
typedef ORBStatus   SOMLINK somTP_ORB_create_operation_list(ORB somSelf, Environment *ev, 
		OperationDef oper, 
		NVList* new_list);
typedef somTP_ORB_create_operation_list *somTD_ORB_create_operation_list;
/*
 *  Creates a NamedValue list for the specified operation,
 *  for use in Requests invoking that operation.
 *  OWNERSHIP of allocated "new_list" is transferred to the caller.
 */
#define somMD_ORB_create_operation_list "::ORB::create_operation_list"
#define ORB_create_operation_list(somSelf,ev,oper,new_list) \
    (SOM_Resolve(somSelf, ORB, create_operation_list) \
	(somSelf,ev,oper,new_list))
#ifndef SOMGD_create_operation_list
    #if (defined(_create_operation_list) || defined(__create_operation_list))
        #undef _create_operation_list
        #undef __create_operation_list
        #define SOMGD_create_operation_list 1
    #else
        #define _create_operation_list ORB_create_operation_list
    #endif /* _create_operation_list */
#endif /* SOMGD_create_operation_list */

/*
 * New Method: get_default_context
 */
typedef ORBStatus   SOMLINK somTP_ORB_get_default_context(ORB somSelf, Environment *ev, 
		Context* ctx);
typedef somTP_ORB_get_default_context *somTD_ORB_get_default_context;
/*
 *  Returns the default process Context object.
 *  OWNERSHIP of allocated Context object is transferred to the caller.
 */
#define somMD_ORB_get_default_context "::ORB::get_default_context"
#define ORB_get_default_context(somSelf,ev,ctx) \
    (SOM_Resolve(somSelf, ORB, get_default_context) \
	(somSelf,ev,ctx))
#ifndef SOMGD_get_default_context
    #if (defined(_get_default_context) || defined(__get_default_context))
        #undef _get_default_context
        #undef __get_default_context
        #define SOMGD_get_default_context 1
    #else
        #define _get_default_context ORB_get_default_context
    #endif /* _get_default_context */
#endif /* SOMGD_get_default_context */

/*
 * New Method: list_initial_services
 */
typedef ORB_ObjectIdList   SOMLINK somTP_ORB_list_initial_services(ORB somSelf, Environment *ev);
typedef somTP_ORB_list_initial_services *somTD_ORB_list_initial_services;
/*
 *  Lists which objects have references available by calling
 *  resolve_initial_references.  This list is returned as a sequence
 *  of well-known strings.  Each well-known string specifies a basic
 *  object service and is referred to as an ObjectId.
 *  OWNERSHIP of returned strings is transferred to the caller.
 */
#define somMD_ORB_list_initial_services "::ORB::list_initial_services"
#define ORB_list_initial_services(somSelf,ev) \
    (SOM_Resolve(somSelf, ORB, list_initial_services) \
	(somSelf,ev))
#ifndef SOMGD_list_initial_services
    #if (defined(_list_initial_services) || defined(__list_initial_services))
        #undef _list_initial_services
        #undef __list_initial_services
        #define SOMGD_list_initial_services 1
    #else
        #define _list_initial_services ORB_list_initial_services
    #endif /* _list_initial_services */
#endif /* SOMGD_list_initial_services */

/*
 * New Method: resolve_initial_references
 */
typedef SOMObject   SOMLINK somTP_ORB_resolve_initial_references(ORB somSelf, Environment *ev, 
		ORB_ObjectId identifier);
typedef somTP_ORB_resolve_initial_references *somTD_ORB_resolve_initial_references;
/*
 *  Takes a single ObjectId and returns an appropriate object reference
 *  for the requested object service.  Since resolve_initial_references
 *  returns different types of objects, it is prototyped to simply return
 *  a SOMObject.  The caller may need to cast the return value to the
 *  actual object class.
 */
#define somMD_ORB_resolve_initial_references "::ORB::resolve_initial_references"
#define ORB_resolve_initial_references(somSelf,ev,identifier) \
    (SOM_Resolve(somSelf, ORB, resolve_initial_references) \
	(somSelf,ev,identifier))
#ifndef SOMGD_resolve_initial_references
    #if (defined(_resolve_initial_references) || defined(__resolve_initial_references))
        #undef _resolve_initial_references
        #undef __resolve_initial_references
        #define SOMGD_resolve_initial_references 1
    #else
        #define _resolve_initial_references ORB_resolve_initial_references
    #endif /* _resolve_initial_references */
#endif /* SOMGD_resolve_initial_references */

/*
 * New Method: _get_stringToObject30
 */
typedef boolean   SOMLINK somTP_ORB__get_stringToObject30(ORB somSelf, Environment *ev);
typedef somTP_ORB__get_stringToObject30 *somTD_ORB__get_stringToObject30;
/*
 *  If TRUE, indicates string_to_object should return SOMObject.
 *  If FALSE, a SOMDObject will be returned (as in previous releases).
 */
#define somMD_ORB__get_stringToObject30 "::ORB::_get_stringToObject30"
#define ORB__get_stringToObject30(somSelf,ev) \
    (SOM_Resolve(somSelf, ORB, _get_stringToObject30) \
	(somSelf,ev))
#ifndef SOMGD_get_stringToObject30
    #if (defined(_get_stringToObject30) || defined(__get_stringToObject30))
        #undef _get_stringToObject30
        #undef __get_stringToObject30
        #define SOMGD_get_stringToObject30 1
    #else
        #define __get_stringToObject30 ORB__get_stringToObject30
    #endif /* __get_stringToObject30 */
#endif /* SOMGD_get_stringToObject30 */

/*
 * New Method: _set_stringToObject30
 */
typedef void   SOMLINK somTP_ORB__set_stringToObject30(ORB somSelf, Environment *ev, 
		boolean stringToObject30);
typedef somTP_ORB__set_stringToObject30 *somTD_ORB__set_stringToObject30;
/*
 *  If TRUE, indicates string_to_object should return SOMObject.
 *  If FALSE, a SOMDObject will be returned (as in previous releases).
 */
#define somMD_ORB__set_stringToObject30 "::ORB::_set_stringToObject30"
#define ORB__set_stringToObject30(somSelf,ev,stringToObject30) \
    (SOM_Resolve(somSelf, ORB, _set_stringToObject30) \
	(somSelf,ev,stringToObject30))
#ifndef SOMGD_set_stringToObject30
    #if (defined(_set_stringToObject30) || defined(__set_stringToObject30))
        #undef _set_stringToObject30
        #undef __set_stringToObject30
        #define SOMGD_set_stringToObject30 1
    #else
        #define __set_stringToObject30 ORB__set_stringToObject30
    #endif /* __set_stringToObject30 */
#endif /* SOMGD_set_stringToObject30 */

/*
 * Full Names for Inherited Methods
 */
/* overridden methods */
#define ORB_somDefaultInit SOMObject_somDefaultInit
#define ORB_somDestruct SOMObject_somDestruct

#ifndef SOM_DONT_USE_INHERITED_MACROS
#define ORB_somDefaultCopyInit SOMObject_somDefaultCopyInit
#define ORB_somDefaultAssign SOMObject_somDefaultAssign
#define ORB_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
#define ORB_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
#define ORB_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
#define ORB_somDefaultConstAssign SOMObject_somDefaultConstAssign
#define ORB_somDefaultVAssign SOMObject_somDefaultVAssign
#define ORB_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
#define ORB_somInit SOMObject_somInit
#define ORB_somUninit SOMObject_somUninit
#define ORB_somFree SOMObject_somFree
#define ORB_somGetClass SOMObject_somGetClass
#define ORB_somGetClassName SOMObject_somGetClassName
#define ORB_somGetSize SOMObject_somGetSize
#define ORB_somIsA SOMObject_somIsA
#define ORB_somIsInstanceOf SOMObject_somIsInstanceOf
#define ORB_somRespondsTo SOMObject_somRespondsTo
#define ORB_somDispatch SOMObject_somDispatch
#define ORB_somClassDispatch SOMObject_somClassDispatch
#define ORB_somCastObj SOMObject_somCastObj
#define ORB_somResetObj SOMObject_somResetObj
#define ORB_somPrintSelf SOMObject_somPrintSelf
#define ORB_somDumpSelf SOMObject_somDumpSelf
#define ORB_somDumpSelfInt SOMObject_somDumpSelfInt
#endif /* SOM_DONT_USE_INHERITED_MACROS */

#endif       /* SOM_ORB_h */
