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

/*
 *    @(#) 2.37 src/somd/somdobj.idl, somd, som3.0 9/26/96 14:02:18 [12/22/96 21:11:55]
 * 
 *    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 the class that implements the behavior of CORBA object references,
 *    e.g., get_implementation, get_interface, duplicate, release, etc.
 * 
 *    In DSOM, there is also another derivation of this class:  SOMDClientProxy.
 *    This subclass inherits the implementation of this class, but extends it
 *    by overriding sommProxyDispatch with a "remote dispatch" method, and
 *    caches the binding to the server process.  Whenever a remote object is
 *    accessed, it is represented in the client process by a SOMDClientProxy
 *    object.
 */


#ifndef SOM_SOMDObject_xh
#define SOM_SOMDObject_xh


#define SOMDObject_MajorVersion 2
#define SOMDObject_MinorVersion 2
class SOMDObject;

/*
 * Passthru lines: File: "C.xh", "before"
 */

#include <somdtype.xh>
#ifndef SOM_DONT_USE_SHORT_NAMES
#define SOM_DONT_USE_SHORT_NAMES
#include <unotypes.xh>
#undef SOM_DONT_USE_SHORT_NAMES
#else
#include <unotypes.xh>
#endif


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

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

#ifndef SOMDObject_API
#define SOMDObject_API
/*
 * -- The Class API
 */
#ifndef SOM_IMPORTEXPORT_somd_somdobj
#ifdef SOM_DLL_somd
	/* export semantics */
	#if defined(SOM_DEFFILE_somd)\
	||(defined(SOM_DEFFILE_BY_DEFAULT)&&!defined(SOM_NODEFFILE_somd))\
	|| !defined(SOM_Module_somdobj_Source)
	#define SOM_IMPORTEXPORT_somd_somdobj
	#else
	#define SOM_IMPORTEXPORT_somd_somdobj SOMDLLEXPORT
	#endif
#else
	#define SOM_IMPORTEXPORT_somd_somdobj SOMDLLIMPORT
#endif
#endif

/*
 * Start of bindings for IDL types
 */

class SOMClass;
class SOMObject;
class Container;
class Principal;
class ImplementationDef;
class InterfaceDef;
class NVList;
class Context;
class Request;

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

/*
 * A function to create the SOMDObject class object...
 */
SOMEXTERN SOM_IMPORTEXPORT_somd_somdobj SOMClass * SOMLINK SOMDObjectNewClass(
		integer4 majorVersion,
		integer4 minorVersion);


/*
 * The API 2 ClassData Structures...
 */
SOMEXTERN struct SOMDObjectClassDataStructure {
	SOMClass *classObject;
	somMToken get_implementation;
	somMToken get_interface;
	somMToken unused1;
	somMethodProc *is_nil;
	somMToken is_SOM_ref;
	somMToken is_constant;
	somMToken is_proxy;
	somMToken duplicate;
	somMToken release;
	somMToken create_request;
	somMToken create_request_args;
	somMToken private1;
	somMToken private2;
	somMToken private3;
	somMToken private4;
	somMToken private5;
	somMToken private6;
	somMToken private7;
	somMToken private8;
	somMToken private9;
	somMToken private10;
	somMToken private11;
	somMToken _get_type_id;
	somMToken _set_type_id;
} SOMDLINK SOM_IMPORTEXPORT_somd_somdobj SOMDObjectClassData;
SOMEXTERN struct SOMDObjectCClassDataStructure {
	som3ClassDetailsPtr    parentMtab;
	somDToken              instanceDataToken;
} SOMDLINK SOM_IMPORTEXPORT_somd_somdobj SOMDObjectCClassData;


/*
 * Class Object and Method Token Macros
 */
#define _SOMCLASS_SOMDObject (SOMDObjectClassData.classObject)
#ifndef SOMGD_SOMDObject
    #if (defined(_SOMDObject) || defined(__SOMDObject))
        #undef _SOMDObject
        #undef __SOMDObject
        #define SOMGD_SOMDObject 1
    #else
        #define _SOMDObject _SOMCLASS_SOMDObject
    #endif /* _SOMDObject */
#endif /* SOMGD_SOMDObject */
#define SOMDObject_classObj _SOMCLASS_SOMDObject
#define _SOMMTOKEN_SOMDObject(method) ((somMToken)SOMDObjectClassData.method)

/*
 * -- Typedefs for SOMDObject Method Procedures
 */
SOMEXTERN {
typedef boolean   SOMLINK somTP_SOMDObject_is_nil(SOMDObject *somSelf, Environment *ev);
typedef somTP_SOMDObject_is_nil *somTD_SOMDObject_is_nil;
typedef boolean   SOMLINK somTP_SOMDObject_is_SOM_ref(SOMDObject *somSelf, Environment *ev);
typedef somTP_SOMDObject_is_SOM_ref *somTD_SOMDObject_is_SOM_ref;
typedef boolean   SOMLINK somTP_SOMDObject_is_constant(SOMDObject *somSelf, Environment *ev);
typedef somTP_SOMDObject_is_constant *somTD_SOMDObject_is_constant;
typedef ImplementationDef*   SOMLINK somTP_SOMDObject_get_implementation(SOMDObject *somSelf, Environment *ev);
typedef somTP_SOMDObject_get_implementation *somTD_SOMDObject_get_implementation;
typedef InterfaceDef*   SOMLINK somTP_SOMDObject_get_interface(SOMDObject *somSelf, Environment *ev);
typedef somTP_SOMDObject_get_interface *somTD_SOMDObject_get_interface;
typedef boolean   SOMLINK somTP_SOMDObject_is_proxy(SOMDObject *somSelf, Environment *ev);
typedef somTP_SOMDObject_is_proxy *somTD_SOMDObject_is_proxy;
typedef SOMObject*   SOMLINK somTP_SOMDObject_duplicate(SOMDObject *somSelf, Environment *ev);
typedef somTP_SOMDObject_duplicate *somTD_SOMDObject_duplicate;
typedef void   SOMLINK somTP_SOMDObject_release(SOMDObject *somSelf, Environment *ev);
typedef somTP_SOMDObject_release *somTD_SOMDObject_release;
typedef ORBStatus   SOMLINK somTP_SOMDObject_create_request(SOMDObject *somSelf, Environment *ev, 
		Context* ctx, 
		Identifier operation, 
		NVList* arg_list, 
		NamedValue* result, 
		Request** request, 
		Flags req_flags);
typedef somTP_SOMDObject_create_request *somTD_SOMDObject_create_request;
typedef ORBStatus   SOMLINK somTP_SOMDObject_create_request_args(SOMDObject *somSelf, Environment *ev, 
		Identifier operation, 
		NVList** arg_list, 
		NamedValue* result);
typedef somTP_SOMDObject_create_request_args *somTD_SOMDObject_create_request_args;
typedef string   SOMLINK somTP_SOMDObject__get_type_id(SOMDObject *somSelf, Environment *ev);
typedef somTP_SOMDObject__get_type_id *somTD_SOMDObject__get_type_id;
typedef void   SOMLINK somTP_SOMDObject__set_type_id(SOMDObject *somSelf, Environment *ev, 
		string type_id);
typedef somTP_SOMDObject__set_type_id *somTD_SOMDObject__set_type_id;

/*
 * -- Typedefs for Reintroduced Wrapper Methods
 */
typedef void   SOMLINK somTP_SOMDObject_somDefaultInit(SOMDObject *somSelf, 
		som3InitCtrl* ctrl);
typedef somTP_SOMDObject_somDefaultInit *somTD_SOMDObject_somDefaultInit;
typedef void   SOMLINK somTP_SOMDObject_somDestruct(SOMDObject *somSelf, 
		octet doFree, 
		som3DestructCtrl* ctrl);
typedef somTP_SOMDObject_somDestruct *somTD_SOMDObject_somDestruct;
typedef void   SOMLINK somTP_SOMDObject_somDefaultCopyInit(SOMDObject *somSelf, 
		som3InitCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_SOMDObject_somDefaultCopyInit *somTD_SOMDObject_somDefaultCopyInit;
typedef SOMDObject*   SOMLINK somTP_SOMDObject_somDefaultAssign(SOMDObject *somSelf, 
		som3AssignCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_SOMDObject_somDefaultAssign *somTD_SOMDObject_somDefaultAssign;
typedef void   SOMLINK somTP_SOMDObject_somDefaultConstCopyInit(SOMDObject *somSelf, 
		som3InitCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_SOMDObject_somDefaultConstCopyInit *somTD_SOMDObject_somDefaultConstCopyInit;
typedef void   SOMLINK somTP_SOMDObject_somDefaultVCopyInit(SOMDObject *somSelf, 
		som3InitCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_SOMDObject_somDefaultVCopyInit *somTD_SOMDObject_somDefaultVCopyInit;
typedef void   SOMLINK somTP_SOMDObject_somDefaultConstVCopyInit(SOMDObject *somSelf, 
		som3InitCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_SOMDObject_somDefaultConstVCopyInit *somTD_SOMDObject_somDefaultConstVCopyInit;
typedef SOMDObject*   SOMLINK somTP_SOMDObject_somDefaultConstAssign(SOMDObject *somSelf, 
		som3AssignCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_SOMDObject_somDefaultConstAssign *somTD_SOMDObject_somDefaultConstAssign;
typedef SOMDObject*   SOMLINK somTP_SOMDObject_somDefaultVAssign(SOMDObject *somSelf, 
		som3AssignCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_SOMDObject_somDefaultVAssign *somTD_SOMDObject_somDefaultVAssign;
typedef SOMDObject*   SOMLINK somTP_SOMDObject_somDefaultConstVAssign(SOMDObject *somSelf, 
		som3AssignCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_SOMDObject_somDefaultConstVAssign *somTD_SOMDObject_somDefaultConstVAssign;
typedef void   SOMLINK somTP_SOMDObject_somInit(SOMDObject *somSelf);
typedef somTP_SOMDObject_somInit *somTD_SOMDObject_somInit;
typedef void   SOMLINK somTP_SOMDObject_somUninit(SOMDObject *somSelf);
typedef somTP_SOMDObject_somUninit *somTD_SOMDObject_somUninit;
typedef void   SOMLINK somTP_SOMDObject_somFree(SOMDObject *somSelf);
typedef somTP_SOMDObject_somFree *somTD_SOMDObject_somFree;
typedef SOMClass*   SOMLINK somTP_SOMDObject_somGetClass(SOMDObject *somSelf);
typedef somTP_SOMDObject_somGetClass *somTD_SOMDObject_somGetClass;
typedef string   SOMLINK somTP_SOMDObject_somGetClassName(SOMDObject *somSelf);
typedef somTP_SOMDObject_somGetClassName *somTD_SOMDObject_somGetClassName;
typedef long   SOMLINK somTP_SOMDObject_somGetSize(SOMDObject *somSelf);
typedef somTP_SOMDObject_somGetSize *somTD_SOMDObject_somGetSize;
typedef boolean   SOMLINK somTP_SOMDObject_somIsA(SOMDObject *somSelf, 
		SOMClass* aClassObj);
typedef somTP_SOMDObject_somIsA *somTD_SOMDObject_somIsA;
typedef boolean   SOMLINK somTP_SOMDObject_somIsInstanceOf(SOMDObject *somSelf, 
		SOMClass* aClassObj);
typedef somTP_SOMDObject_somIsInstanceOf *somTD_SOMDObject_somIsInstanceOf;
typedef boolean   SOMLINK somTP_SOMDObject_somRespondsTo(SOMDObject *somSelf, 
		somId mId);
typedef somTP_SOMDObject_somRespondsTo *somTD_SOMDObject_somRespondsTo;
typedef boolean   SOMLINK somTP_SOMDObject_somDispatch(SOMDObject *somSelf, 
		somToken* retValue, 
		somId methodId, 
		va_list ap);
typedef somTP_SOMDObject_somDispatch *somTD_SOMDObject_somDispatch;
typedef boolean   SOMLINK somTP_SOMDObject_somClassDispatch(SOMDObject *somSelf, 
		SOMClass* clsObj, 
		somToken* retValue, 
		somId methodId, 
		va_list ap);
typedef somTP_SOMDObject_somClassDispatch *somTD_SOMDObject_somClassDispatch;
typedef boolean   SOMLINK somTP_SOMDObject_somCastObj(SOMDObject *somSelf, 
		SOMClass* castedCls);
typedef somTP_SOMDObject_somCastObj *somTD_SOMDObject_somCastObj;
typedef boolean   SOMLINK somTP_SOMDObject_somResetObj(SOMDObject *somSelf);
typedef somTP_SOMDObject_somResetObj *somTD_SOMDObject_somResetObj;
typedef SOMDObject*   SOMLINK somTP_SOMDObject_somPrintSelf(SOMDObject *somSelf);
typedef somTP_SOMDObject_somPrintSelf *somTD_SOMDObject_somPrintSelf;
typedef void   SOMLINK somTP_SOMDObject_somDumpSelf(SOMDObject *somSelf, 
		long level);
typedef somTP_SOMDObject_somDumpSelf *somTD_SOMDObject_somDumpSelf;
typedef void   SOMLINK somTP_SOMDObject_somDumpSelfInt(SOMDObject *somSelf, 
		long level);
typedef somTP_SOMDObject_somDumpSelfInt *somTD_SOMDObject_somDumpSelfInt;
}

#endif /* SOMDObject_API */


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

// SOMDObject::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 (!_SOMDObject) SOMDObjectNewClass(SOMDObject_MajorVersion,SOMDObject_MinorVersion);
   return (void*)
   (((somTD_SOMClass_somNewNoInit)(SOMClassClassData.somNewNoInit))
         ((SOMClass *)((void*)_SOMDObject)));
}

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

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

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

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


/* procedure: is_nil */
static boolean   is_nil(SOMDObject *somSelf, Environment *ev)
{
/*
 *  Tests to see if the target object is nil.  This is a procedure
 *  method.  Therefore, it can be invoked on OBJECT_NIL (a null pointer),
 *  but it cannot be overridden.
 */
   return  ((somTD_SOMDObject_is_nil)SOMDObjectClassData.is_nil)(((SOMDObject *)((void *)somSelf)), ev);
}


/* method: is_SOM_ref */
boolean   is_SOM_ref(Environment *ev)
{
/*
 *  Returns TRUE if target object was created by SOMOA::create_SOM_ref.
 *  This method can only be called from a server.
 *  SOM extension.
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_SOMDObject),
	 ((somTD_SOMDObject_is_SOM_ref)(SOMDObjectClassData.is_SOM_ref))(((SOMDObject *)((void *)this)), ev)
	);
}


/* method: is_constant */
boolean   is_constant(Environment *ev)
{
/*
 *  Returns TRUE if target object was created by SOMOA::create_SOM_ref or
 *  SOMOA::create_constant.  Indicates ReferenceData cannot be changed.
 *  This method can only be called from a server.
 *  SOM extension.
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_SOMDObject),
	 ((somTD_SOMDObject_is_constant)(SOMDObjectClassData.is_constant))(((SOMDObject *)((void *)this)), ev)
	);
}


/* method: get_implementation */
ImplementationDef*   get_implementation(Environment *ev)
{
/*
 *  Returns the implementation definition of the target object.
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_SOMDObject),
	 ((somTD_SOMDObject_get_implementation)(SOMDObjectClassData.get_implementation))(((SOMDObject *)((void *)this)), ev)
	);
}


/* method: get_interface */
InterfaceDef*   get_interface(Environment *ev)
{
/*
 *  Returns the interface definition of the target object.
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_SOMDObject),
	 ((somTD_SOMDObject_get_interface)(SOMDObjectClassData.get_interface))(((SOMDObject *)((void *)this)), ev)
	);
}


/* method: is_proxy */
boolean   is_proxy(Environment *ev)
{
/*
 *  Returns TRUE if target object is a proxy object (i.e., the target object
 *  is remote).  The default implementation returns FALSE.  Proxy classes
 *  which are subclasses of SOMDObject (e.g. SOMDClientProxy) should override
 *  this method to return TRUE.
 *  SOM extension.
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_SOMDObject),
	 ((somTD_SOMDObject_is_proxy)(SOMDObjectClassData.is_proxy))(((SOMDObject *)((void *)this)), ev)
	);
}


/* method: duplicate */
SOMObject*   duplicate(Environment *ev)
{
/*
 *  Returns a double of the target object.
 *  OWNERSHIP of returned object is transferred to the caller.
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_SOMDObject),
	 ((somTD_SOMDObject_duplicate)(SOMDObjectClassData.duplicate))(((SOMDObject *)((void *)this)), ev)
	);
}


/* method: release */
void   release(Environment *ev)
{
/*
 *  Frees the memory associated with the target object.
 */
   	(
	 SOM_TestCls(this,_SOMCLASS_SOMDObject),
	 ((somTD_SOMDObject_release)(SOMDObjectClassData.release))(((SOMDObject *)((void *)this)), ev)
	);
}


/* method: create_request */
ORBStatus   create_request(Environment *ev, 
		Context* ctx, 
		Identifier operation, 
		NVList* arg_list, 
		NamedValue* result, 
		Request** request, 
		Flags req_flags)
{
/*
 *  Creates a request to execute a particular operation on the target
 *  object.  CORBA introduces this method in this class, but DSOM actually
 *  implements this method in the SOMDClientProxy subclass.
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_SOMDObject),
	 ((somTD_SOMDObject_create_request)(SOMDObjectClassData.create_request))(((SOMDObject *)((void *)this)), ev,ctx,operation,arg_list,result,request,req_flags)
	);
}


/* method: create_request_args */
ORBStatus   create_request_args(Environment *ev, 
		Identifier operation, 
		NVList** arg_list, 
		NamedValue* result)
{
/*
 *  Creates the appropriate NVList for the specified operation and creates a
 *  NamedValue to hold the result.  (Similar in function to
 *  ORB::create_operation_list.)  This method is defined in this class as a
 *  companion to "create_request", but DSOM implements this method in the
 *  SOMDClientProxy subclass.
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_SOMDObject),
	 ((somTD_SOMDObject_create_request_args)(SOMDObjectClassData.create_request_args))(((SOMDObject *)((void *)this)), ev,operation,arg_list,result)
	);
}


/* method: _get_type_id */
string   _get_type_id(Environment *ev)
{
/*
 *  IDL-format repository ID.  Format defined by OMG Interface
 *  Repository Specificiation.
 *  D21205: Move _get_somd_id, _set_somd_id, _get_tagged_profiles,
 *          _set_tagged_profiles to private.
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_SOMDObject),
	 ((somTD_SOMDObject__get_type_id)(SOMDObjectClassData._get_type_id))(((SOMDObject *)((void *)this)), ev)
	);
}


/* method: _set_type_id */
void   _set_type_id(Environment *ev, 
		string type_id)
{
/*
 *  IDL-format repository ID.  Format defined by OMG Interface
 *  Repository Specificiation.
 *  D21205: Move _get_somd_id, _set_somd_id, _get_tagged_profiles,
 *          _set_tagged_profiles to private.
 */
   	(
	 SOM_TestCls(this,_SOMCLASS_SOMDObject),
	 ((somTD_SOMDObject__set_type_id)(SOMDObjectClassData._set_type_id))(((SOMDObject *)((void *)this)), ev,type_id)
	);
}


/*
 * 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_SOMDObject_somDefaultInit)(SOMObjectClassData.somDefaultInit))(((SOMDObject *)((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_SOMDObject_somDestruct)(SOMObjectClassData.somDestruct))(((SOMDObject *)((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_SOMDObject_somDefaultCopyInit)(SOMObjectClassData.somDefaultCopyInit))(((SOMDObject *)((void *)this)),ctrl,fromObj)
	);
}


/* method: somDefaultAssign */
SOMDObject*  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_SOMDObject_somDefaultAssign)(SOMObjectClassData.somDefaultAssign))(((SOMDObject *)((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_SOMDObject_somDefaultConstCopyInit)(SOMObjectClassData.somDefaultConstCopyInit))(((SOMDObject *)((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_SOMDObject_somDefaultVCopyInit)(SOMObjectClassData.somDefaultVCopyInit))(((SOMDObject *)((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_SOMDObject_somDefaultConstVCopyInit)(SOMObjectClassData.somDefaultConstVCopyInit))(((SOMDObject *)((void *)this)),ctrl,fromObj)
	);
}


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


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


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


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


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


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


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


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


/* method: somGetSize */
long   somGetSize()
{
/*
 *  Return the size of the receiver.
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_SOMObject),
	 ((somTD_SOMDObject_somGetSize)(SOMObjectClassData.somGetSize))(((SOMDObject *)((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_SOMDObject_somIsA)(SOMObjectClassData.somIsA))(((SOMDObject *)((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_SOMDObject_somIsInstanceOf)(SOMObjectClassData.somIsInstanceOf))(((SOMDObject *)((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_SOMDObject_somRespondsTo)(SOMObjectClassData.somRespondsTo))(((SOMDObject *)((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_SOMDObject_somDispatch)(SOMObjectClassData.somDispatch))(((SOMDObject *)((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_SOMDObject_somDispatch)(SOMObjectClassData.somDispatch))(((SOMDObject *)((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_SOMDObject_somClassDispatch)(SOMObjectClassData.somClassDispatch))(((SOMDObject *)((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_SOMDObject_somClassDispatch)(SOMObjectClassData.somClassDispatch))(((SOMDObject *)((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_SOMDObject_somCastObj)(SOMObjectClassData.somCastObj))(((SOMDObject *)((void *)this)),castedCls)
	);
}


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


/* method: somPrintSelf */
SOMDObject*  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_SOMDObject_somPrintSelf)(SOMObjectClassData.somPrintSelf))(((SOMDObject *)((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_SOMDObject_somDumpSelf)(SOMObjectClassData.somDumpSelf))(((SOMDObject *)((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_SOMDObject_somDumpSelfInt)(SOMObjectClassData.somDumpSelfInt))(((SOMDObject *)((void *)this)),level)
	);
}



};   /* SOMDObject */



#endif       /* SOM_SOMDObject_xh */
