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

/*
 *    @(#) 1.4 src/somd/comm_fw/include/formarsh.idl, somd, som3.0 12/28/95 13:23:06 [12/22/96 21:42:24]
 * 
 *    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.
 * 
 */


#ifndef SOM_SOMDForeignMarshaler_xh
#define SOM_SOMDForeignMarshaler_xh


/*
 *  An abstract base class for dynamic foreign marshallers, to be
 *  subclasses by users to provide marshalling for SOMFOREIGN datatypes.
 *  The subclass name is to be specified in the "impctx" IDL modifier
 *  for the SOMFOREIGN type.
 */

#define SOMDForeignMarshaler_MajorVersion 3
#define SOMDForeignMarshaler_MinorVersion 0
class SOMDForeignMarshaler;

/*
 *  An abstract base class for dynamic foreign marshallers, to be
 *  subclasses by users to provide marshalling for SOMFOREIGN datatypes.
 *  The subclass name is to be specified in the "impctx" IDL modifier
 *  for the SOMFOREIGN type.
 */

/* 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 SOMDForeignMarshaler_API
#define SOMDForeignMarshaler_API
/*
 * -- The Class API
 */
#ifndef SOM_IMPORTEXPORT_somdcomm_formarsh
#ifdef SOM_DLL_somdcomm
	/* export semantics */
	#if defined(SOM_DEFFILE_somdcomm)\
	||(defined(SOM_DEFFILE_BY_DEFAULT)&&!defined(SOM_NODEFFILE_somdcomm))\
	|| !defined(SOM_Module_formarsh_Source)
	#define SOM_IMPORTEXPORT_somdcomm_formarsh
	#else
	#define SOM_IMPORTEXPORT_somdcomm_formarsh SOMDLLEXPORT
	#endif
#else
	#define SOM_IMPORTEXPORT_somdcomm_formarsh SOMDLLIMPORT
#endif
#endif

/*
 * Start of bindings for IDL types
 */

class SOMClass;
class SOMObject;
class Container;
class ExtendedNaming_PropertyBindingIterator;
class ExtendedNaming_PropertyIterator;
class ExtendedNaming_IndexIterator;
class SOMDObject;
class Principal;
class ImplementationDef;
class InterfaceDef;
class NVList;
class Context;
class Request;
class CosObjectIdentity_IdentifiableObject;
class CosStream_Streamable;
class CosStream_StreamableFactory;

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

/*
 * A function to create the SOMDForeignMarshaler class object...
 */
SOMEXTERN SOM_IMPORTEXPORT_somdcomm_formarsh SOMClass * SOMLINK SOMDForeignMarshalerNewClass(
		integer4 majorVersion,
		integer4 minorVersion);


/*
 * The API 2 ClassData Structures...
 */
SOMEXTERN struct SOMDForeignMarshalerClassDataStructure {
	SOMClass *classObject;
	somMToken marshal;
} SOMDLINK SOM_IMPORTEXPORT_somdcomm_formarsh SOMDForeignMarshalerClassData;
SOMEXTERN struct SOMDForeignMarshalerCClassDataStructure {
	som3ClassDetailsPtr    parentMtab;
	somDToken              instanceDataToken;
} SOMDLINK SOM_IMPORTEXPORT_somdcomm_formarsh SOMDForeignMarshalerCClassData;


/*
 * Class Object and Method Token Macros
 */
#define _SOMCLASS_SOMDForeignMarshaler (SOMDForeignMarshalerClassData.classObject)
#ifndef SOMGD_SOMDForeignMarshaler
    #if (defined(_SOMDForeignMarshaler) || defined(__SOMDForeignMarshaler))
        #undef _SOMDForeignMarshaler
        #undef __SOMDForeignMarshaler
        #define SOMGD_SOMDForeignMarshaler 1
    #else
        #define _SOMDForeignMarshaler _SOMCLASS_SOMDForeignMarshaler
    #endif /* _SOMDForeignMarshaler */
#endif /* SOMGD_SOMDForeignMarshaler */
#define SOMDForeignMarshaler_classObj _SOMCLASS_SOMDForeignMarshaler
#define _SOMMTOKEN_SOMDForeignMarshaler(method) ((somMToken)SOMDForeignMarshalerClassData.method)

/*
 * -- Typedefs for SOMDForeignMarshaler Method Procedures
 */
SOMEXTERN {
typedef void   SOMLINK somTP_SOMDForeignMarshaler_marshal(SOMDForeignMarshaler *somSelf, Environment *ev, 
		string latent_param, 
		somToken dataPtr, 
		SOMD_marshaling_direction_t direction, 
		SOMD_marshaling_op_t function, 
		CosStream_StreamIO* streamio);
typedef somTP_SOMDForeignMarshaler_marshal *somTD_SOMDForeignMarshaler_marshal;

/*
 * -- Typedefs for Reintroduced Wrapper Methods
 */
typedef void   SOMLINK somTP_SOMDForeignMarshaler_somDefaultInit(SOMDForeignMarshaler *somSelf, 
		som3InitCtrl* ctrl);
typedef somTP_SOMDForeignMarshaler_somDefaultInit *somTD_SOMDForeignMarshaler_somDefaultInit;
typedef void   SOMLINK somTP_SOMDForeignMarshaler_somDestruct(SOMDForeignMarshaler *somSelf, 
		octet doFree, 
		som3DestructCtrl* ctrl);
typedef somTP_SOMDForeignMarshaler_somDestruct *somTD_SOMDForeignMarshaler_somDestruct;
typedef void   SOMLINK somTP_SOMDForeignMarshaler_somDefaultCopyInit(SOMDForeignMarshaler *somSelf, 
		som3InitCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_SOMDForeignMarshaler_somDefaultCopyInit *somTD_SOMDForeignMarshaler_somDefaultCopyInit;
typedef SOMDForeignMarshaler*   SOMLINK somTP_SOMDForeignMarshaler_somDefaultAssign(SOMDForeignMarshaler *somSelf, 
		som3AssignCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_SOMDForeignMarshaler_somDefaultAssign *somTD_SOMDForeignMarshaler_somDefaultAssign;
typedef void   SOMLINK somTP_SOMDForeignMarshaler_somDefaultConstCopyInit(SOMDForeignMarshaler *somSelf, 
		som3InitCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_SOMDForeignMarshaler_somDefaultConstCopyInit *somTD_SOMDForeignMarshaler_somDefaultConstCopyInit;
typedef void   SOMLINK somTP_SOMDForeignMarshaler_somDefaultVCopyInit(SOMDForeignMarshaler *somSelf, 
		som3InitCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_SOMDForeignMarshaler_somDefaultVCopyInit *somTD_SOMDForeignMarshaler_somDefaultVCopyInit;
typedef void   SOMLINK somTP_SOMDForeignMarshaler_somDefaultConstVCopyInit(SOMDForeignMarshaler *somSelf, 
		som3InitCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_SOMDForeignMarshaler_somDefaultConstVCopyInit *somTD_SOMDForeignMarshaler_somDefaultConstVCopyInit;
typedef SOMDForeignMarshaler*   SOMLINK somTP_SOMDForeignMarshaler_somDefaultConstAssign(SOMDForeignMarshaler *somSelf, 
		som3AssignCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_SOMDForeignMarshaler_somDefaultConstAssign *somTD_SOMDForeignMarshaler_somDefaultConstAssign;
typedef SOMDForeignMarshaler*   SOMLINK somTP_SOMDForeignMarshaler_somDefaultVAssign(SOMDForeignMarshaler *somSelf, 
		som3AssignCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_SOMDForeignMarshaler_somDefaultVAssign *somTD_SOMDForeignMarshaler_somDefaultVAssign;
typedef SOMDForeignMarshaler*   SOMLINK somTP_SOMDForeignMarshaler_somDefaultConstVAssign(SOMDForeignMarshaler *somSelf, 
		som3AssignCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_SOMDForeignMarshaler_somDefaultConstVAssign *somTD_SOMDForeignMarshaler_somDefaultConstVAssign;
typedef void   SOMLINK somTP_SOMDForeignMarshaler_somInit(SOMDForeignMarshaler *somSelf);
typedef somTP_SOMDForeignMarshaler_somInit *somTD_SOMDForeignMarshaler_somInit;
typedef void   SOMLINK somTP_SOMDForeignMarshaler_somUninit(SOMDForeignMarshaler *somSelf);
typedef somTP_SOMDForeignMarshaler_somUninit *somTD_SOMDForeignMarshaler_somUninit;
typedef void   SOMLINK somTP_SOMDForeignMarshaler_somFree(SOMDForeignMarshaler *somSelf);
typedef somTP_SOMDForeignMarshaler_somFree *somTD_SOMDForeignMarshaler_somFree;
typedef SOMClass*   SOMLINK somTP_SOMDForeignMarshaler_somGetClass(SOMDForeignMarshaler *somSelf);
typedef somTP_SOMDForeignMarshaler_somGetClass *somTD_SOMDForeignMarshaler_somGetClass;
typedef string   SOMLINK somTP_SOMDForeignMarshaler_somGetClassName(SOMDForeignMarshaler *somSelf);
typedef somTP_SOMDForeignMarshaler_somGetClassName *somTD_SOMDForeignMarshaler_somGetClassName;
typedef long   SOMLINK somTP_SOMDForeignMarshaler_somGetSize(SOMDForeignMarshaler *somSelf);
typedef somTP_SOMDForeignMarshaler_somGetSize *somTD_SOMDForeignMarshaler_somGetSize;
typedef boolean   SOMLINK somTP_SOMDForeignMarshaler_somIsA(SOMDForeignMarshaler *somSelf, 
		SOMClass* aClassObj);
typedef somTP_SOMDForeignMarshaler_somIsA *somTD_SOMDForeignMarshaler_somIsA;
typedef boolean   SOMLINK somTP_SOMDForeignMarshaler_somIsInstanceOf(SOMDForeignMarshaler *somSelf, 
		SOMClass* aClassObj);
typedef somTP_SOMDForeignMarshaler_somIsInstanceOf *somTD_SOMDForeignMarshaler_somIsInstanceOf;
typedef boolean   SOMLINK somTP_SOMDForeignMarshaler_somRespondsTo(SOMDForeignMarshaler *somSelf, 
		somId mId);
typedef somTP_SOMDForeignMarshaler_somRespondsTo *somTD_SOMDForeignMarshaler_somRespondsTo;
typedef boolean   SOMLINK somTP_SOMDForeignMarshaler_somDispatch(SOMDForeignMarshaler *somSelf, 
		somToken* retValue, 
		somId methodId, 
		va_list ap);
typedef somTP_SOMDForeignMarshaler_somDispatch *somTD_SOMDForeignMarshaler_somDispatch;
typedef boolean   SOMLINK somTP_SOMDForeignMarshaler_somClassDispatch(SOMDForeignMarshaler *somSelf, 
		SOMClass* clsObj, 
		somToken* retValue, 
		somId methodId, 
		va_list ap);
typedef somTP_SOMDForeignMarshaler_somClassDispatch *somTD_SOMDForeignMarshaler_somClassDispatch;
typedef boolean   SOMLINK somTP_SOMDForeignMarshaler_somCastObj(SOMDForeignMarshaler *somSelf, 
		SOMClass* castedCls);
typedef somTP_SOMDForeignMarshaler_somCastObj *somTD_SOMDForeignMarshaler_somCastObj;
typedef boolean   SOMLINK somTP_SOMDForeignMarshaler_somResetObj(SOMDForeignMarshaler *somSelf);
typedef somTP_SOMDForeignMarshaler_somResetObj *somTD_SOMDForeignMarshaler_somResetObj;
typedef SOMDForeignMarshaler*   SOMLINK somTP_SOMDForeignMarshaler_somPrintSelf(SOMDForeignMarshaler *somSelf);
typedef somTP_SOMDForeignMarshaler_somPrintSelf *somTD_SOMDForeignMarshaler_somPrintSelf;
typedef void   SOMLINK somTP_SOMDForeignMarshaler_somDumpSelf(SOMDForeignMarshaler *somSelf, 
		long level);
typedef somTP_SOMDForeignMarshaler_somDumpSelf *somTD_SOMDForeignMarshaler_somDumpSelf;
typedef void   SOMLINK somTP_SOMDForeignMarshaler_somDumpSelfInt(SOMDForeignMarshaler *somSelf, 
		long level);
typedef somTP_SOMDForeignMarshaler_somDumpSelfInt *somTD_SOMDForeignMarshaler_somDumpSelfInt;
}

#endif /* SOMDForeignMarshaler_API */


/*
 * -- The C++ Wrapper Class for SOMDForeignMarshaler
 */
class SOMDForeignMarshaler : public SOMObject
{
/*
 *  An abstract base class for dynamic foreign marshallers, to be
 *  subclasses by users to provide marshalling for SOMFOREIGN datatypes.
 *  The subclass name is to be specified in the "impctx" IDL modifier
 *  for the SOMFOREIGN type.
 */
public:

// SOMDForeignMarshaler::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 (!_SOMDForeignMarshaler) SOMDForeignMarshalerNewClass(SOMDForeignMarshaler_MajorVersion,SOMDForeignMarshaler_MinorVersion);
   return (void*)
   (((somTD_SOMClass_somNewNoInit)(SOMClassClassData.somNewNoInit))
         ((SOMClass *)((void*)_SOMDForeignMarshaler)));
}

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

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

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

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


/* method: marshal */
void   marshal(Environment *ev, 
		string latent_param, 
		somToken dataPtr, 
		SOMD_marshaling_direction_t direction, 
		SOMD_marshaling_op_t function, 
		CosStream_StreamIO* streamio)
{
/*
 *  This method is to be overriden by subclasses to provide a
 *  marshalling function for some SOMFOREIGN datatype.
 *  The default implementation returns a NO_IMPLEMENT error.
 *  The latent_param parameter is passed by DSOM to the marshal method;
 *  its value can designate to the marshal method which SOMFOREIGN
 *  type is to be marshaled, as specified in the "impctx" IDL
 *  modifier for the SOMFOREIGN type.
 *  The dataPtr parameter is the foreign data to be marshalled.
 *  The direction parameter indicates whether the data is to be
 *  marshalled, demarshalled, or freed.
 *  The streamio parameter is a StreamIO object to/from which the
 *  foreign data is to be marshalled/demarshalled.
 */
   	(
	 SOM_TestCls(this,_SOMCLASS_SOMDForeignMarshaler),
	 ((somTD_SOMDForeignMarshaler_marshal)(SOMDForeignMarshalerClassData.marshal))(((SOMDForeignMarshaler *)((void *)this)), ev,latent_param,dataPtr,direction,function,streamio)
	);
}


/*
 * 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_SOMDForeignMarshaler_somDefaultInit)(SOMObjectClassData.somDefaultInit))(((SOMDForeignMarshaler *)((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_SOMDForeignMarshaler_somDestruct)(SOMObjectClassData.somDestruct))(((SOMDForeignMarshaler *)((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_SOMDForeignMarshaler_somDefaultCopyInit)(SOMObjectClassData.somDefaultCopyInit))(((SOMDForeignMarshaler *)((void *)this)),ctrl,fromObj)
	);
}


/* method: somDefaultAssign */
SOMDForeignMarshaler*  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_SOMDForeignMarshaler_somDefaultAssign)(SOMObjectClassData.somDefaultAssign))(((SOMDForeignMarshaler *)((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_SOMDForeignMarshaler_somDefaultConstCopyInit)(SOMObjectClassData.somDefaultConstCopyInit))(((SOMDForeignMarshaler *)((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_SOMDForeignMarshaler_somDefaultVCopyInit)(SOMObjectClassData.somDefaultVCopyInit))(((SOMDForeignMarshaler *)((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_SOMDForeignMarshaler_somDefaultConstVCopyInit)(SOMObjectClassData.somDefaultConstVCopyInit))(((SOMDForeignMarshaler *)((void *)this)),ctrl,fromObj)
	);
}


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


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


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


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


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


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


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


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


/* method: somGetSize */
long   somGetSize()
{
/*
 *  Return the size of the receiver.
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_SOMObject),
	 ((somTD_SOMDForeignMarshaler_somGetSize)(SOMObjectClassData.somGetSize))(((SOMDForeignMarshaler *)((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_SOMDForeignMarshaler_somIsA)(SOMObjectClassData.somIsA))(((SOMDForeignMarshaler *)((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_SOMDForeignMarshaler_somIsInstanceOf)(SOMObjectClassData.somIsInstanceOf))(((SOMDForeignMarshaler *)((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_SOMDForeignMarshaler_somRespondsTo)(SOMObjectClassData.somRespondsTo))(((SOMDForeignMarshaler *)((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_SOMDForeignMarshaler_somDispatch)(SOMObjectClassData.somDispatch))(((SOMDForeignMarshaler *)((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_SOMDForeignMarshaler_somDispatch)(SOMObjectClassData.somDispatch))(((SOMDForeignMarshaler *)((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_SOMDForeignMarshaler_somClassDispatch)(SOMObjectClassData.somClassDispatch))(((SOMDForeignMarshaler *)((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_SOMDForeignMarshaler_somClassDispatch)(SOMObjectClassData.somClassDispatch))(((SOMDForeignMarshaler *)((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_SOMDForeignMarshaler_somCastObj)(SOMObjectClassData.somCastObj))(((SOMDForeignMarshaler *)((void *)this)),castedCls)
	);
}


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


/* method: somPrintSelf */
SOMDForeignMarshaler*  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_SOMDForeignMarshaler_somPrintSelf)(SOMObjectClassData.somPrintSelf))(((SOMDForeignMarshaler *)((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_SOMDForeignMarshaler_somDumpSelf)(SOMObjectClassData.somDumpSelf))(((SOMDForeignMarshaler *)((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_SOMDForeignMarshaler_somDumpSelfInt)(SOMObjectClassData.somDumpSelfInt))(((SOMDForeignMarshaler *)((void *)this)),level)
	);
}



};   /* SOMDForeignMarshaler */



#endif       /* SOM_SOMDForeignMarshaler_xh */
