
/*
 * This file was generated by the SOM Compiler.
 * FileName: ORB.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 ORB pseudo-object, from CORBA document (8.1).
 */


#ifndef SOM_ORB_h
#define SOM_ORB_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 ORBClassData (*resolve_ORBClassData())
#define ORBCClassData (*resolve_ORBCClassData())

/*
 * Define the class name as an object type
 */
#ifndef ORB
#define ORB 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 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 */

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

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

#ifdef SOM_STRICT_IDL
#define SOMD_ORBObject (*resolve_SOMD_ORBObject())
SOMEXTERN ORB * SOMLINK resolve_SOMD_ORBObject(void);
#else
#define SOMD_ORBObject (*resolve_SOMD_ORBObject())
SOMEXTERN ORB * * SOMLINK resolve_SOMD_ORBObject(void);
#endif /* SOM_STRICT_IDL */

#include <somdobj.h>


#define ORB_MajorVersion 2
#define ORB_MinorVersion 1

/*
 * External name shortening if required
 */
#ifdef SOM_USE_SHORT_EXTERNAL_NAMES
#define ORBNewClass c
#define ORBClassData d
#define ORBCClassData x
#endif /* SOM_USE_SHORT_EXTERNAL_NAMES */

/*
 * Include the meta class file
 */
#include <snglicls.h>
/*--------------Migration------------*/
#define ORB_classObj ORBClassData.classObject
#define _ORB ORB_classObj

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

/*
 * Declare the class data 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 object_to_binary;
	somMToken binary_to_object;
}  _ORBClassData;
SOMEXTERN struct ORBClassDataStructure * SOMLINK resolve_ORBClassData(void);

/*
 * Declare the C specific class data structure
 */
SOMEXTERN struct ORBCClassDataStructure {
	somMethodTabs parentMtab;
	somDToken instanceDataToken;
}  _ORBCClassData;
SOMEXTERN struct ORBCClassDataStructure * SOMLINK resolve_ORBCClassData(void);

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

/*
 * New Method: object_to_string
 */
typedef string   (SOMLINK * somTD_ORB_object_to_string)(ORB *somSelf, Environment *ev,
		SOMDObject* obj);
#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 SOMDObject*   (SOMLINK * somTD_ORB_string_to_object)(ORB *somSelf, Environment *ev,
		string str);
#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 * somTD_ORB_create_list)(ORB *somSelf, Environment *ev,
		long count,
		NVList** new_list);
#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 * somTD_ORB_create_operation_list)(ORB *somSelf, Environment *ev,
		OperationDef* oper,
		NVList** new_list);
#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 * somTD_ORB_get_default_context)(ORB *somSelf, Environment *ev,
		Context** ctx);
#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 */
#ifndef SOM_DONT_USE_INHERITED_MACROS
#define ORB_somDefaultInit SOMObject_somDefaultInit
#define ORB_somDestruct SOMObject_somDestruct
#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_somFree SOMObject_somFree
#define ORB_somUninit SOMObject_somUninit
#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_somDispatchV SOMObject_somDispatchV
#define ORB_somDispatchL SOMObject_somDispatchL
#define ORB_somDispatchA SOMObject_somDispatchA
#define ORB_somDispatchD SOMObject_somDispatchD
#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 */
