
/*
 * This file was generated by the SOM Compiler.
 * FileName: orb.xh.
 * Generated using:
 *     SOM Precompiler somipc: 2.29.1.19
 *     SOM Emitter emitxh.dll: 2.108
 */

/*
 *   @(#) 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_xh
#define SOM_ORB_xh


#define ORB_MajorVersion 2
#define ORB_MinorVersion 2
class ORB;

/* Parents */
#ifndef SOM_SOMObject_xh
#ifdef SOMLOCALINCLUDES
#include "somobj.xh"
#else
#include <somobj.xh>
#endif
#endif

/* Metaclass */
#ifndef SOM_SOMMSingleInstance_xh
#ifdef SOMLOCALINCLUDES
#include "snglicls.xh"
#else
#include <snglicls.xh>
#endif
#endif

/* Useful C++ SOM defs */
#include <somcls.xh>
#include <somcm.xh>

#ifndef ORB_API
#define ORB_API
/*
 * -- The Class API
 */
#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

/*
 * Start of bindings for IDL types
 */

class SOMClass;
class SOMObject;
class Container;
class Principal;
class OperationDef;
class SOMDObject;
class NVList;
class 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.xh", "after"
 */

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

#include <somdobj.xh>


/*
 * A function to create the ORB class object...
 */
SOMEXTERN SOM_IMPORTEXPORT_somd_orb SOMMSingleInstance * SOMLINK ORBNewClass(
		integer4 majorVersion,
		integer4 minorVersion);


/*
 * The API 2 ClassData Structures...
 */
class SOMMSingleInstance;
SOMEXTERN struct ORBClassDataStructure {
	SOMMSingleInstance *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;
} SOMDLINK SOM_IMPORTEXPORT_somd_orb ORBClassData;
SOMEXTERN struct ORBCClassDataStructure {
	som3ClassDetailsPtr    parentMtab;
	somDToken              instanceDataToken;
} SOMDLINK SOM_IMPORTEXPORT_somd_orb 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)

/*
 * -- Typedefs for ORB Method Procedures
 */
SOMEXTERN {
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;
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;
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;
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;
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;
typedef ORB_ObjectIdList   SOMLINK somTP_ORB_list_initial_services(ORB *somSelf, Environment *ev);
typedef somTP_ORB_list_initial_services *somTD_ORB_list_initial_services;
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;
typedef boolean   SOMLINK somTP_ORB__get_stringToObject30(ORB *somSelf, Environment *ev);
typedef somTP_ORB__get_stringToObject30 *somTD_ORB__get_stringToObject30;
typedef void   SOMLINK somTP_ORB__set_stringToObject30(ORB *somSelf, Environment *ev, 
		boolean stringToObject30);
typedef somTP_ORB__set_stringToObject30 *somTD_ORB__set_stringToObject30;

/*
 * -- Typedefs for Reintroduced Wrapper Methods
 */
typedef void   SOMLINK somTP_ORB_somDefaultInit(ORB *somSelf, 
		som3InitCtrl* ctrl);
typedef somTP_ORB_somDefaultInit *somTD_ORB_somDefaultInit;
typedef void   SOMLINK somTP_ORB_somDestruct(ORB *somSelf, 
		octet doFree, 
		som3DestructCtrl* ctrl);
typedef somTP_ORB_somDestruct *somTD_ORB_somDestruct;
typedef void   SOMLINK somTP_ORB_somDefaultCopyInit(ORB *somSelf, 
		som3InitCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_ORB_somDefaultCopyInit *somTD_ORB_somDefaultCopyInit;
typedef ORB*   SOMLINK somTP_ORB_somDefaultAssign(ORB *somSelf, 
		som3AssignCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_ORB_somDefaultAssign *somTD_ORB_somDefaultAssign;
typedef void   SOMLINK somTP_ORB_somDefaultConstCopyInit(ORB *somSelf, 
		som3InitCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_ORB_somDefaultConstCopyInit *somTD_ORB_somDefaultConstCopyInit;
typedef void   SOMLINK somTP_ORB_somDefaultVCopyInit(ORB *somSelf, 
		som3InitCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_ORB_somDefaultVCopyInit *somTD_ORB_somDefaultVCopyInit;
typedef void   SOMLINK somTP_ORB_somDefaultConstVCopyInit(ORB *somSelf, 
		som3InitCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_ORB_somDefaultConstVCopyInit *somTD_ORB_somDefaultConstVCopyInit;
typedef ORB*   SOMLINK somTP_ORB_somDefaultConstAssign(ORB *somSelf, 
		som3AssignCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_ORB_somDefaultConstAssign *somTD_ORB_somDefaultConstAssign;
typedef ORB*   SOMLINK somTP_ORB_somDefaultVAssign(ORB *somSelf, 
		som3AssignCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_ORB_somDefaultVAssign *somTD_ORB_somDefaultVAssign;
typedef ORB*   SOMLINK somTP_ORB_somDefaultConstVAssign(ORB *somSelf, 
		som3AssignCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_ORB_somDefaultConstVAssign *somTD_ORB_somDefaultConstVAssign;
typedef void   SOMLINK somTP_ORB_somInit(ORB *somSelf);
typedef somTP_ORB_somInit *somTD_ORB_somInit;
typedef void   SOMLINK somTP_ORB_somUninit(ORB *somSelf);
typedef somTP_ORB_somUninit *somTD_ORB_somUninit;
typedef void   SOMLINK somTP_ORB_somFree(ORB *somSelf);
typedef somTP_ORB_somFree *somTD_ORB_somFree;
typedef SOMMSingleInstance*   SOMLINK somTP_ORB_somGetClass(ORB *somSelf);
typedef somTP_ORB_somGetClass *somTD_ORB_somGetClass;
typedef string   SOMLINK somTP_ORB_somGetClassName(ORB *somSelf);
typedef somTP_ORB_somGetClassName *somTD_ORB_somGetClassName;
typedef long   SOMLINK somTP_ORB_somGetSize(ORB *somSelf);
typedef somTP_ORB_somGetSize *somTD_ORB_somGetSize;
typedef boolean   SOMLINK somTP_ORB_somIsA(ORB *somSelf, 
		SOMClass* aClassObj);
typedef somTP_ORB_somIsA *somTD_ORB_somIsA;
typedef boolean   SOMLINK somTP_ORB_somIsInstanceOf(ORB *somSelf, 
		SOMClass* aClassObj);
typedef somTP_ORB_somIsInstanceOf *somTD_ORB_somIsInstanceOf;
typedef boolean   SOMLINK somTP_ORB_somRespondsTo(ORB *somSelf, 
		somId mId);
typedef somTP_ORB_somRespondsTo *somTD_ORB_somRespondsTo;
typedef boolean   SOMLINK somTP_ORB_somDispatch(ORB *somSelf, 
		somToken* retValue, 
		somId methodId, 
		va_list ap);
typedef somTP_ORB_somDispatch *somTD_ORB_somDispatch;
typedef boolean   SOMLINK somTP_ORB_somClassDispatch(ORB *somSelf, 
		SOMClass* clsObj, 
		somToken* retValue, 
		somId methodId, 
		va_list ap);
typedef somTP_ORB_somClassDispatch *somTD_ORB_somClassDispatch;
typedef boolean   SOMLINK somTP_ORB_somCastObj(ORB *somSelf, 
		SOMClass* castedCls);
typedef somTP_ORB_somCastObj *somTD_ORB_somCastObj;
typedef boolean   SOMLINK somTP_ORB_somResetObj(ORB *somSelf);
typedef somTP_ORB_somResetObj *somTD_ORB_somResetObj;
typedef ORB*   SOMLINK somTP_ORB_somPrintSelf(ORB *somSelf);
typedef somTP_ORB_somPrintSelf *somTD_ORB_somPrintSelf;
typedef void   SOMLINK somTP_ORB_somDumpSelf(ORB *somSelf, 
		long level);
typedef somTP_ORB_somDumpSelf *somTD_ORB_somDumpSelf;
typedef void   SOMLINK somTP_ORB_somDumpSelfInt(ORB *somSelf, 
		long level);
typedef somTP_ORB_somDumpSelfInt *somTD_ORB_somDumpSelfInt;
}

#endif /* ORB_API */


/*
 * -- The C++ Wrapper Class for ORB
 */
class ORB : public SOMObject
{
public:

// ORB::new creates the class object if necessary, and then uses
// somNewNoInit to allocate memory and create the object.
// Initialization is in ctors.
void *operator new(size_t)
{
   if (!_ORB) ORBNewClass(ORB_MajorVersion,ORB_MinorVersion);
   return (void*)
   (((somTD_SOMClass_somNewNoInit)(SOMClassClassData.somNewNoInit))
         ((SOMClass *)((void*)_ORB)));
}

// ORB::delete uses somFree.
void operator delete(void * obj)
{
   if (obj && *(void**)obj)
      ((SOMObject*)obj)->somFree();
}

ORB& operator=(ORB& fromObj)
{
   this->somDefaultAssign(0,(SOMObject*)((void*)&fromObj));
   return *this;
}

ORB()
{
   if (*(void**)this != (ORBCClassData.parentMtab)->mtab)
      return;
   ((SOMObject*)((void*)this))->somDefaultInit(0);
}

ORB(ORB* fromObj)
{
   if (*(void**)this != (ORBCClassData.parentMtab)->mtab)
      return;
   ((SOMObject*)((void*)this))->somDefaultCopyInit(0,((SOMObject*)((void*)fromObj)));
}


/* method: object_to_string */
string   object_to_string(Environment *ev, 
		SOMObject* obj)
{
/*
 *  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.
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_ORB),
	 ((somTD_ORB_object_to_string)(ORBClassData.object_to_string))(((ORB *)((void *)this)), ev,obj)
	);
}


/* method: string_to_object */
SOMObject*   string_to_object(Environment *ev, 
		string str)
{
/*
 *  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.
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_ORB),
	 ((somTD_ORB_string_to_object)(ORBClassData.string_to_object))(((ORB *)((void *)this)), ev,str)
	);
}


/* method: create_list */
ORBStatus   create_list(Environment *ev, 
		long count, 
		NVList** new_list)
{
/*
 *  Creates an NVList of the specified size.
 *  OWNERSHIP of allocated "new_list" is transferred to the caller.
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_ORB),
	 ((somTD_ORB_create_list)(ORBClassData.create_list))(((ORB *)((void *)this)), ev,count,new_list)
	);
}


/* method: create_operation_list */
ORBStatus   create_operation_list(Environment *ev, 
		OperationDef* oper, 
		NVList** new_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.
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_ORB),
	 ((somTD_ORB_create_operation_list)(ORBClassData.create_operation_list))(((ORB *)((void *)this)), ev,oper,new_list)
	);
}


/* method: get_default_context */
ORBStatus   get_default_context(Environment *ev, 
		Context** ctx)
{
/*
 *  Returns the default process Context object.
 *  OWNERSHIP of allocated Context object is transferred to the caller.
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_ORB),
	 ((somTD_ORB_get_default_context)(ORBClassData.get_default_context))(((ORB *)((void *)this)), ev,ctx)
	);
}


/* method: list_initial_services */
ORB_ObjectIdList   list_initial_services(Environment *ev)
{
/*
 *  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.
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_ORB),
	 ((somTD_ORB_list_initial_services)(ORBClassData.list_initial_services))(((ORB *)((void *)this)), ev)
	);
}


/* method: resolve_initial_references */
SOMObject*   resolve_initial_references(Environment *ev, 
		ORB_ObjectId identifier)
{
/*
 *  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.
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_ORB),
	 ((somTD_ORB_resolve_initial_references)(ORBClassData.resolve_initial_references))(((ORB *)((void *)this)), ev,identifier)
	);
}


/* method: _get_stringToObject30 */
boolean   _get_stringToObject30(Environment *ev)
{
/*
 *  If TRUE, indicates string_to_object should return SOMObject.
 *  If FALSE, a SOMDObject will be returned (as in previous releases).
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_ORB),
	 ((somTD_ORB__get_stringToObject30)(ORBClassData._get_stringToObject30))(((ORB *)((void *)this)), ev)
	);
}


/* method: _set_stringToObject30 */
void   _set_stringToObject30(Environment *ev, 
		boolean stringToObject30)
{
/*
 *  If TRUE, indicates string_to_object should return SOMObject.
 *  If FALSE, a SOMDObject will be returned (as in previous releases).
 */
   	(
	 SOM_TestCls(this,_SOMCLASS_ORB),
	 ((somTD_ORB__set_stringToObject30)(ORBClassData._set_stringToObject30))(((ORB *)((void *)this)), ev,stringToObject30)
	);
}


/*
 * Reintroduce inherited methods
 */

/* initializer method: somDefaultInit */
void   somDefaultInit(som3InitCtrl* ctrl)
{
/*
 *  A default initializer for a SOM object. Passing a null ctrl
 *  indicates to the receiver that its class is the class of the
 *  object being initialized, whereby the initializer will determine
 *  an appropriate control structure.
 */
   	(
	 SOM_TestCls(this,_SOMCLASS_SOMObject),
	 ((somTD_ORB_somDefaultInit)(SOMObjectClassData.somDefaultInit))(((ORB *)((void *)this)),ctrl)
	);
}


/* method: somDestruct */
void   somDestruct(octet doFree, 
		som3DestructCtrl* ctrl)
{
/*
 *  The default destructor for a SOM object. A nonzero <doFree>
 *  indicates that the object storage should be freed by the
 *  object's class (via somDeallocate) after uninitialization.
 *  As with somDefaultInit, a null ctrl can be passed.
 */
   	(
	 SOM_TestCls(this,_SOMCLASS_SOMObject),
	 ((somTD_ORB_somDestruct)(SOMObjectClassData.somDestruct))(((ORB *)((void *)this)),doFree,ctrl)
	);
}


/* initializer method: somDefaultCopyInit */
void   somDefaultCopyInit(som3InitCtrl* ctrl, 
		SOMObject* fromObj)
{
/*
 *  A default copy constructor. Use this to make copies of objects for
 *  calling methods with "by-value" argument semantics.
 */
   	(
	 SOM_TestCls(this,_SOMCLASS_SOMObject),
	 ((somTD_ORB_somDefaultCopyInit)(SOMObjectClassData.somDefaultCopyInit))(((ORB *)((void *)this)),ctrl,fromObj)
	);
}


/* method: somDefaultAssign */
ORB*  somDefaultAssign(som3AssignCtrl* ctrl, 
		SOMObject* fromObj)
{
/*
 *  A default assignment operator. Use this to "assign" the state of one
 *  object to another.
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_SOMObject),
	 ((somTD_ORB_somDefaultAssign)(SOMObjectClassData.somDefaultAssign))(((ORB *)((void *)this)),ctrl,fromObj)
	);
}


/* initializer method: somDefaultConstCopyInit */
void   somDefaultConstCopyInit(som3InitCtrl* ctrl, 
		SOMObject* fromObj)
{
/*
 *  A default copy constructor that uses a const fromObj.
 */
   	(
	 SOM_TestCls(this,_SOMCLASS_SOMObject),
	 ((somTD_ORB_somDefaultConstCopyInit)(SOMObjectClassData.somDefaultConstCopyInit))(((ORB *)((void *)this)),ctrl,fromObj)
	);
}


/* initializer method: somDefaultVCopyInit */
void   somDefaultVCopyInit(som3InitCtrl* ctrl, 
		SOMObject* fromObj)
{
/*
 *  A default copy constructor that uses a volatile fromObj.
 */
   	(
	 SOM_TestCls(this,_SOMCLASS_SOMObject),
	 ((somTD_ORB_somDefaultVCopyInit)(SOMObjectClassData.somDefaultVCopyInit))(((ORB *)((void *)this)),ctrl,fromObj)
	);
}


/* initializer method: somDefaultConstVCopyInit */
void   somDefaultConstVCopyInit(som3InitCtrl* ctrl, 
		SOMObject* fromObj)
{
/*
 *  A default copy constructor that uses a const volatile fromObj.
 */
   	(
	 SOM_TestCls(this,_SOMCLASS_SOMObject),
	 ((somTD_ORB_somDefaultConstVCopyInit)(SOMObjectClassData.somDefaultConstVCopyInit))(((ORB *)((void *)this)),ctrl,fromObj)
	);
}


/* method: somDefaultConstAssign */
ORB*  somDefaultConstAssign(som3AssignCtrl* ctrl, 
		SOMObject* fromObj)
{
/*
 *  A default assignment operator that uses a const fromObj.
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_SOMObject),
	 ((somTD_ORB_somDefaultConstAssign)(SOMObjectClassData.somDefaultConstAssign))(((ORB *)((void *)this)),ctrl,fromObj)
	);
}


/* method: somDefaultVAssign */
ORB*  somDefaultVAssign(som3AssignCtrl* ctrl, 
		SOMObject* fromObj)
{
/*
 *  A default assignment operator that uses a volatile fromObj.
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_SOMObject),
	 ((somTD_ORB_somDefaultVAssign)(SOMObjectClassData.somDefaultVAssign))(((ORB *)((void *)this)),ctrl,fromObj)
	);
}


/* method: somDefaultConstVAssign */
ORB*  somDefaultConstVAssign(som3AssignCtrl* ctrl, 
		SOMObject* fromObj)
{
/*
 *  A default assignment operator that uses a const volatile fromObj.
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_SOMObject),
	 ((somTD_ORB_somDefaultConstVAssign)(SOMObjectClassData.somDefaultConstVAssign))(((ORB *)((void *)this)),ctrl,fromObj)
	);
}


/* method: somInit */
void   somInit()
{
/*
 *  Obsolete but still supported. Override somDefaultInit instead of somInit.
 */
   	(
	 SOM_TestCls(this,_SOMCLASS_SOMObject),
	 ((somTD_ORB_somInit)(SOMObjectClassData.somInit))(((ORB *)((void *)this)))
	);
}


/* method: somUninit */
void   somUninit()
{
/*
 *  Obsolete but still supported. Override somDestruct instead of somUninit.
 */
   	(
	 SOM_TestCls(this,_SOMCLASS_SOMObject),
	 ((somTD_ORB_somUninit)(SOMObjectClassData.somUninit))(((ORB *)((void *)this)))
	);
}


/* method: somFree */
void   somFree()
{
/*
 *  The default implementation just calls somDestruct.
 */
   	(
	 SOM_TestCls(this,_SOMCLASS_SOMObject),
	 ((somTD_ORB_somFree)(SOMObjectClassData.somFree))(((ORB *)((void *)this)))
	);
}


/* method: somGetClass */
SOMMSingleInstance*  somGetClass()
{
/*
 *  Return the receiver's class.
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_SOMObject),
	 ((somTD_ORB_somGetClass)(SOMObjectClassData.somGetClass))(((ORB *)((void *)this)))
	);
}


/* method: somGetClassName */
string   somGetClassName()
{
/*
 *  Return the name of the receiver's class.
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_SOMObject),
	 ((somTD_ORB_somGetClassName)(SOMObjectClassData.somGetClassName))(((ORB *)((void *)this)))
	);
}


/* method: somGetSize */
long   somGetSize()
{
/*
 *  Return the size of the receiver.
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_SOMObject),
	 ((somTD_ORB_somGetSize)(SOMObjectClassData.somGetSize))(((ORB *)((void *)this)))
	);
}


/* method: somIsA */
boolean   somIsA(SOMClass* aClassObj)
{
/*
 *  Returns 1 (true) if the receiver responds to methods
 *  introduced by <aClassObj>, and 0 (false) otherwise.
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_SOMObject),
	 ((somTD_ORB_somIsA)(SOMObjectClassData.somIsA))(((ORB *)((void *)this)),aClassObj)
	);
}


/* method: somIsInstanceOf */
boolean   somIsInstanceOf(SOMClass* aClassObj)
{
/*
 *  Returns 1 (true) if the receiver is an instance of
 *  <aClassObj> and 0 (false) otherwise.
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_SOMObject),
	 ((somTD_ORB_somIsInstanceOf)(SOMObjectClassData.somIsInstanceOf))(((ORB *)((void *)this)),aClassObj)
	);
}


/* method: somRespondsTo */
boolean   somRespondsTo(somId mId)
{
/*
 *  Returns 1 (true) if the indicated method can be invoked
 *  on the receiver and 0 (false) otherwise.
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_SOMObject),
	 ((somTD_ORB_somRespondsTo)(SOMObjectClassData.somRespondsTo))(((ORB *)((void *)this)),mId)
	);
}


/* va_list method: somDispatch */

/*
 *  This method provides a generic, class-specific dispatch mechanism.
 *  It accepts as input <retValue> a pointer to the memory area to be
 *  loaded with the result of dispatching the method indicated by
 *  <methodId> using the arguments in <ap>. <ap> contains the object
 *  on which the method is to be invoked as the first argument.
 * 
 *  Default redispatch stubs invoke this method.
 */
/* the va_list invocation form */
boolean   SOMObject_somDispatch(somToken* retValue, 
		somId methodId, 
		va_list ap)
{   return 	(
	 SOM_TestCls(this,_SOMCLASS_SOMObject),
	 ((somTD_ORB_somDispatch)(SOMObjectClassData.somDispatch))(((ORB *)((void *)this)),retValue,methodId,ap)
	);
}

/* the varargs invocation form */
boolean   somDispatch(somToken* retValue, 
		somId methodId, 
		...)
{
/*
 *  This method provides a generic, class-specific dispatch mechanism.
 *  It accepts as input <retValue> a pointer to the memory area to be
 *  loaded with the result of dispatching the method indicated by
 *  <methodId> using the arguments in <ap>. <ap> contains the object
 *  on which the method is to be invoked as the first argument.
 * 
 *  Default redispatch stubs invoke this method.
 */
   va_list ap;
   va_start(ap, methodId);
   boolean __somResult = 
      	(
	 SOM_TestCls(this,_SOMCLASS_SOMObject),
	 ((somTD_ORB_somDispatch)(SOMObjectClassData.somDispatch))(((ORB *)((void *)this)),retValue,methodId,ap)
	);
   va_end(ap);
   return __somResult;
}


/* va_list method: somClassDispatch */

/*
 *  Like somDispatch, but method resolution for static methods is done
 *  according to the clsObj instance method table.
 */
/* the va_list invocation form */
boolean   SOMObject_somClassDispatch(SOMClass* clsObj, 
		somToken* retValue, 
		somId methodId, 
		va_list ap)
{   return 	(
	 SOM_TestCls(this,_SOMCLASS_SOMObject),
	 ((somTD_ORB_somClassDispatch)(SOMObjectClassData.somClassDispatch))(((ORB *)((void *)this)),clsObj,retValue,methodId,ap)
	);
}

/* the varargs invocation form */
boolean   somClassDispatch(SOMClass* clsObj, 
		somToken* retValue, 
		somId methodId, 
		...)
{
/*
 *  Like somDispatch, but method resolution for static methods is done
 *  according to the clsObj instance method table.
 */
   va_list ap;
   va_start(ap, methodId);
   boolean __somResult = 
      	(
	 SOM_TestCls(this,_SOMCLASS_SOMObject),
	 ((somTD_ORB_somClassDispatch)(SOMObjectClassData.somClassDispatch))(((ORB *)((void *)this)),clsObj,retValue,methodId,ap)
	);
   va_end(ap);
   return __somResult;
}


/* method: somCastObj */
boolean   somCastObj(SOMClass* castedCls)
{
/*
 *  Changes the behavior of the target object to that implemented
 *  by castedCls. This is possible when all concrete data in castedCls
 *  is also concrete in the true class of the target object.
 *  Returns true (1) on success, and false (0) otherwise.
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_SOMObject),
	 ((somTD_ORB_somCastObj)(SOMObjectClassData.somCastObj))(((ORB *)((void *)this)),castedCls)
	);
}


/* method: somResetObj */
boolean   somResetObj()
{
/*
 *  reset an object to its true class. Returns true always.
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_SOMObject),
	 ((somTD_ORB_somResetObj)(SOMObjectClassData.somResetObj))(((ORB *)((void *)this)))
	);
}


/* method: somPrintSelf */
ORB*  somPrintSelf()
{
/*
 *  Uses <SOMOutCharRoutine> to write a brief string with identifying
 *  information about this object.  The default implementation just gives
 *  the object's class name and its address in memory.
 *  <self> is returned.
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_SOMObject),
	 ((somTD_ORB_somPrintSelf)(SOMObjectClassData.somPrintSelf))(((ORB *)((void *)this)))
	);
}


/* method: somDumpSelf */
void   somDumpSelf(long level)
{
/*
 *  Uses <SOMOutCharRoutine> to write a detailed description of this object
 *  and its current state.
 * 
 *  <level> indicates the nesting level for describing compound objects
 *  it must be greater than or equal to zero.  All lines in the
 *  description will be preceeded by <2*level> spaces.
 * 
 *  This routine only actually writes the data that concerns the object
 *  as a whole, such as class, and uses <somDumpSelfInt> to describe
 *  the object's current state.  This approach allows readable
 *  descriptions of compound objects to be constructed.
 * 
 *  Generally it is not necessary to override this method, if it is
 *  overriden it generally must be completely replaced.
 */
   	(
	 SOM_TestCls(this,_SOMCLASS_SOMObject),
	 ((somTD_ORB_somDumpSelf)(SOMObjectClassData.somDumpSelf))(((ORB *)((void *)this)),level)
	);
}


/* method: somDumpSelfInt */
void   somDumpSelfInt(long level)
{
/*
 *  Uses <SOMOutCharRoutine> to write in the current state of this object.
 *  Generally this method will need to be overridden.  When overriding
 *  it, begin by calling the parent class form of this method and then
 *  write in a description of your class's instance data. This will
 *  result in a description of all the object's instance data going
 *  from its root ancestor class to its specific class.
 */
   	(
	 SOM_TestCls(this,_SOMCLASS_SOMObject),
	 ((somTD_ORB_somDumpSelfInt)(SOMObjectClassData.somDumpSelfInt))(((ORB *)((void *)this)),level)
	);
}



};   /* ORB */



#endif       /* SOM_ORB_xh */
