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

/*
 *    @(#) 2.28 src/somd/request.idl, somd, som3.0 9/26/96 14:02:11 [12/22/96 21:11:50]
 * 
 *    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.
 * 
 * 
 *   The Request class implements the CORBA Request object.  The Request
 *   object is used by the Dynamic Invocation Interface to dynamically
 *   create and issue a request to a remote object.  Request objects are
 *   created by the create_request method in SOMObject.
 */


#ifndef SOM_Request_xh
#define SOM_Request_xh


#define Request_MajorVersion 2
#define Request_MinorVersion 2
class Request;

/* 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 Request_API
#define Request_API
/*
 * -- The Class API
 */
#ifndef SOM_IMPORTEXPORT_somd_request
#ifdef SOM_DLL_somd
	/* export semantics */
	#if defined(SOM_DEFFILE_somd)\
	||(defined(SOM_DEFFILE_BY_DEFAULT)&&!defined(SOM_NODEFFILE_somd))\
	|| !defined(SOM_Module_request_Source)
	#define SOM_IMPORTEXPORT_somd_request
	#else
	#define SOM_IMPORTEXPORT_somd_request SOMDLLEXPORT
	#endif
#else
	#define SOM_IMPORTEXPORT_somd_request SOMDLLIMPORT
#endif
#endif

/*
 * Start of bindings for IDL types
 */

class SOMClass;
class SOMObject;
class Container;

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

/*
 * Passthru lines: File: "C.xh", "after"
 */
/*
 *  Flags defined on requests
 */

#define ARG_IN		0x00000001  	/* defined in somir.h */
#define ARG_OUT		0x00000002	/* defined in somir.h */
#define ARG_INOUT	0x00000004	/* defined in somir.h */
#define IN_COPY_VALUE	0x00000008	/* add_arg flag */
#define DEPENDENT_LIST	0x00000010	/* add_item flag */
#define OUT_LIST_MEMORY	0x00000020	/* req flag */
#define INV_NO_RESPONSE	0x00000040	/* invoke flag */
#define INV_TERM_ON_ERR	0x00000080	/* invoke flag */
#define RESP_NO_WAIT	0x00000100	/* response flag */
/* Internal Use Flags */
#define AUTH_IN_MSG      0x00010000      /* msg includes auth info */
#define ACKONEWAY        0x00020000      /* ack oneway messages */
#define ENV_IN_MSG       0x00040000      /* msg includes env info */
#define CTX_IN_MSG       0x00080000      /* msg includes ctx info */
#define OBJ_OWNED        0x00100000	/* arg. mem. is obj. owned */
#define CALLER_OWNED     0x00200000	/* arg mem is caller owned */
#define RESULT_OUT       0x00400000	/* method result, not arg  */
#define CLIENT_SIDE      0x00800000	/* client side of request */
#define SERVER_SIDE      0x01000000	/* server side of request */
#define TXCTX_IN_MSG     0x02000000      /* msg includes trans info */
#define ARG_IS_PTRARG    0x10000000      /* ptr to arg, !aggregate */
#define ARG_IS_COMPONENT 0x20000000      /* comp of aggregate type */
#define ROOT_NOT_PTRARG  0x40000000      /* root struct not ptr */
#define RESERVED_FLAGS	0x8c00fe00	/* future/internal use */

class Request;
/*
 *  Functions for multiple deferred-synchronous requests.
 */
ORBStatus SOMLINK send_multiple_requests (
	IN	Request*	reqs[],		/* array of Requests */
	IN	Environment	*env,
	IN	long		count,		/* number of Requests */
	IN	Flags		invoke_flags
    );

ORBStatus SOMLINK get_next_response (
	INOUT	Environment	*env,
	IN	Flags		response_flags,
	OUT	Request*	*req
);


/*
 * A function to create the Request class object...
 */
SOMEXTERN SOM_IMPORTEXPORT_somd_request SOMClass * SOMLINK RequestNewClass(
		integer4 majorVersion,
		integer4 minorVersion);


/*
 * The API 2 ClassData Structures...
 */
SOMEXTERN struct RequestClassDataStructure {
	SOMClass *classObject;
	somMToken add_arg;
	somMToken invoke;
	somMToken send;
	somMToken get_response;
	somMToken destroy;
	somMToken private1;
	somMToken private2;
	somMToken private3;
	somMToken private4;
	somMToken private5;
	somMToken private6;
	somMToken private7;
	somMToken private8;
	somMToken private9;
	somMToken private10;
	somMToken private11;
	somMToken private12;
	somMToken private13;
	somMToken private14;
} SOMDLINK SOM_IMPORTEXPORT_somd_request RequestClassData;
SOMEXTERN struct RequestCClassDataStructure {
	som3ClassDetailsPtr    parentMtab;
	somDToken              instanceDataToken;
} SOMDLINK SOM_IMPORTEXPORT_somd_request RequestCClassData;


/*
 * Class Object and Method Token Macros
 */
#define _SOMCLASS_Request (RequestClassData.classObject)
#ifndef SOMGD_Request
    #if (defined(_Request) || defined(__Request))
        #undef _Request
        #undef __Request
        #define SOMGD_Request 1
    #else
        #define _Request _SOMCLASS_Request
    #endif /* _Request */
#endif /* SOMGD_Request */
#define Request_classObj _SOMCLASS_Request
#define _SOMMTOKEN_Request(method) ((somMToken)RequestClassData.method)

/*
 * -- Typedefs for Request Method Procedures
 */
SOMEXTERN {
typedef ORBStatus   SOMLINK somTP_Request_add_arg(Request *somSelf, Environment *ev, 
		Identifier name, 
		TypeCode arg_type, 
		void* value, 
		long len, 
		Flags arg_flags);
typedef somTP_Request_add_arg *somTD_Request_add_arg;
typedef ORBStatus   SOMLINK somTP_Request_invoke(Request *somSelf, Environment *ev, 
		Flags invoke_flags);
typedef somTP_Request_invoke *somTD_Request_invoke;
typedef ORBStatus   SOMLINK somTP_Request_send(Request *somSelf, Environment *ev, 
		Flags invoke_flags);
typedef somTP_Request_send *somTD_Request_send;
typedef ORBStatus   SOMLINK somTP_Request_get_response(Request *somSelf, Environment *ev, 
		Flags response_flags);
typedef somTP_Request_get_response *somTD_Request_get_response;
typedef ORBStatus   SOMLINK somTP_Request_destroy(Request *somSelf, Environment *ev);
typedef somTP_Request_destroy *somTD_Request_destroy;

/*
 * -- Typedefs for Reintroduced Wrapper Methods
 */
typedef void   SOMLINK somTP_Request_somDefaultInit(Request *somSelf, 
		som3InitCtrl* ctrl);
typedef somTP_Request_somDefaultInit *somTD_Request_somDefaultInit;
typedef void   SOMLINK somTP_Request_somDestruct(Request *somSelf, 
		octet doFree, 
		som3DestructCtrl* ctrl);
typedef somTP_Request_somDestruct *somTD_Request_somDestruct;
typedef void   SOMLINK somTP_Request_somDefaultCopyInit(Request *somSelf, 
		som3InitCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_Request_somDefaultCopyInit *somTD_Request_somDefaultCopyInit;
typedef Request*   SOMLINK somTP_Request_somDefaultAssign(Request *somSelf, 
		som3AssignCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_Request_somDefaultAssign *somTD_Request_somDefaultAssign;
typedef void   SOMLINK somTP_Request_somDefaultConstCopyInit(Request *somSelf, 
		som3InitCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_Request_somDefaultConstCopyInit *somTD_Request_somDefaultConstCopyInit;
typedef void   SOMLINK somTP_Request_somDefaultVCopyInit(Request *somSelf, 
		som3InitCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_Request_somDefaultVCopyInit *somTD_Request_somDefaultVCopyInit;
typedef void   SOMLINK somTP_Request_somDefaultConstVCopyInit(Request *somSelf, 
		som3InitCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_Request_somDefaultConstVCopyInit *somTD_Request_somDefaultConstVCopyInit;
typedef Request*   SOMLINK somTP_Request_somDefaultConstAssign(Request *somSelf, 
		som3AssignCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_Request_somDefaultConstAssign *somTD_Request_somDefaultConstAssign;
typedef Request*   SOMLINK somTP_Request_somDefaultVAssign(Request *somSelf, 
		som3AssignCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_Request_somDefaultVAssign *somTD_Request_somDefaultVAssign;
typedef Request*   SOMLINK somTP_Request_somDefaultConstVAssign(Request *somSelf, 
		som3AssignCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_Request_somDefaultConstVAssign *somTD_Request_somDefaultConstVAssign;
typedef void   SOMLINK somTP_Request_somInit(Request *somSelf);
typedef somTP_Request_somInit *somTD_Request_somInit;
typedef void   SOMLINK somTP_Request_somUninit(Request *somSelf);
typedef somTP_Request_somUninit *somTD_Request_somUninit;
typedef void   SOMLINK somTP_Request_somFree(Request *somSelf);
typedef somTP_Request_somFree *somTD_Request_somFree;
typedef SOMClass*   SOMLINK somTP_Request_somGetClass(Request *somSelf);
typedef somTP_Request_somGetClass *somTD_Request_somGetClass;
typedef string   SOMLINK somTP_Request_somGetClassName(Request *somSelf);
typedef somTP_Request_somGetClassName *somTD_Request_somGetClassName;
typedef long   SOMLINK somTP_Request_somGetSize(Request *somSelf);
typedef somTP_Request_somGetSize *somTD_Request_somGetSize;
typedef boolean   SOMLINK somTP_Request_somIsA(Request *somSelf, 
		SOMClass* aClassObj);
typedef somTP_Request_somIsA *somTD_Request_somIsA;
typedef boolean   SOMLINK somTP_Request_somIsInstanceOf(Request *somSelf, 
		SOMClass* aClassObj);
typedef somTP_Request_somIsInstanceOf *somTD_Request_somIsInstanceOf;
typedef boolean   SOMLINK somTP_Request_somRespondsTo(Request *somSelf, 
		somId mId);
typedef somTP_Request_somRespondsTo *somTD_Request_somRespondsTo;
typedef boolean   SOMLINK somTP_Request_somDispatch(Request *somSelf, 
		somToken* retValue, 
		somId methodId, 
		va_list ap);
typedef somTP_Request_somDispatch *somTD_Request_somDispatch;
typedef boolean   SOMLINK somTP_Request_somClassDispatch(Request *somSelf, 
		SOMClass* clsObj, 
		somToken* retValue, 
		somId methodId, 
		va_list ap);
typedef somTP_Request_somClassDispatch *somTD_Request_somClassDispatch;
typedef boolean   SOMLINK somTP_Request_somCastObj(Request *somSelf, 
		SOMClass* castedCls);
typedef somTP_Request_somCastObj *somTD_Request_somCastObj;
typedef boolean   SOMLINK somTP_Request_somResetObj(Request *somSelf);
typedef somTP_Request_somResetObj *somTD_Request_somResetObj;
typedef Request*   SOMLINK somTP_Request_somPrintSelf(Request *somSelf);
typedef somTP_Request_somPrintSelf *somTD_Request_somPrintSelf;
typedef void   SOMLINK somTP_Request_somDumpSelf(Request *somSelf, 
		long level);
typedef somTP_Request_somDumpSelf *somTD_Request_somDumpSelf;
typedef void   SOMLINK somTP_Request_somDumpSelfInt(Request *somSelf, 
		long level);
typedef somTP_Request_somDumpSelfInt *somTD_Request_somDumpSelfInt;
}

#endif /* Request_API */


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

// Request::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 (!_Request) RequestNewClass(Request_MajorVersion,Request_MinorVersion);
   return (void*)
   (((somTD_SOMClass_somNewNoInit)(SOMClassClassData.somNewNoInit))
         ((SOMClass *)((void*)_Request)));
}

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

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

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

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


/* method: add_arg */
ORBStatus   add_arg(Environment *ev, 
		Identifier name, 
		TypeCode arg_type, 
		void* value, 
		long len, 
		Flags arg_flags)
{
/*
 *  Incrementally adds an arg to the Request.
 *  The Request must have been created using the "create_request"
 *  method, with an empty argument list.  (We can't add args to a
 *  list that was passed in to the create_request call. [pg. 109])
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_Request),
	 ((somTD_Request_add_arg)(RequestClassData.add_arg))(((Request *)((void *)this)), ev,name,arg_type,value,len,arg_flags)
	);
}


/* method: invoke */
ORBStatus   invoke(Environment *ev, 
		Flags invoke_flags)
{
/*
 *  Invokes the Request synchronously, waiting for the response.
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_Request),
	 ((somTD_Request_invoke)(RequestClassData.invoke))(((Request *)((void *)this)), ev,invoke_flags)
	);
}


/* method: send */
ORBStatus   send(Environment *ev, 
		Flags invoke_flags)
{
/*
 *  Invokes the Request asynchronously.  The response must eventually
 *  be checked by invoking get_response or get_next_response.
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_Request),
	 ((somTD_Request_send)(RequestClassData.send))(((Request *)((void *)this)), ev,invoke_flags)
	);
}


/* method: get_response */
ORBStatus   get_response(Environment *ev, 
		Flags response_flags)
{
/*
 *  Determines whether an asynchronous Request has completed.
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_Request),
	 ((somTD_Request_get_response)(RequestClassData.get_response))(((Request *)((void *)this)), ev,response_flags)
	);
}


/* method: destroy */
ORBStatus   destroy(Environment *ev)
{
/*
 *  Deletes the memory allocated by the ORB for the Request.
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_Request),
	 ((somTD_Request_destroy)(RequestClassData.destroy))(((Request *)((void *)this)), ev)
	);
}


/*
 * 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_Request_somDefaultInit)(SOMObjectClassData.somDefaultInit))(((Request *)((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_Request_somDestruct)(SOMObjectClassData.somDestruct))(((Request *)((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_Request_somDefaultCopyInit)(SOMObjectClassData.somDefaultCopyInit))(((Request *)((void *)this)),ctrl,fromObj)
	);
}


/* method: somDefaultAssign */
Request*  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_Request_somDefaultAssign)(SOMObjectClassData.somDefaultAssign))(((Request *)((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_Request_somDefaultConstCopyInit)(SOMObjectClassData.somDefaultConstCopyInit))(((Request *)((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_Request_somDefaultVCopyInit)(SOMObjectClassData.somDefaultVCopyInit))(((Request *)((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_Request_somDefaultConstVCopyInit)(SOMObjectClassData.somDefaultConstVCopyInit))(((Request *)((void *)this)),ctrl,fromObj)
	);
}


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


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


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


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


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


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


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


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


/* method: somGetSize */
long   somGetSize()
{
/*
 *  Return the size of the receiver.
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_SOMObject),
	 ((somTD_Request_somGetSize)(SOMObjectClassData.somGetSize))(((Request *)((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_Request_somIsA)(SOMObjectClassData.somIsA))(((Request *)((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_Request_somIsInstanceOf)(SOMObjectClassData.somIsInstanceOf))(((Request *)((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_Request_somRespondsTo)(SOMObjectClassData.somRespondsTo))(((Request *)((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_Request_somDispatch)(SOMObjectClassData.somDispatch))(((Request *)((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_Request_somDispatch)(SOMObjectClassData.somDispatch))(((Request *)((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_Request_somClassDispatch)(SOMObjectClassData.somClassDispatch))(((Request *)((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_Request_somClassDispatch)(SOMObjectClassData.somClassDispatch))(((Request *)((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_Request_somCastObj)(SOMObjectClassData.somCastObj))(((Request *)((void *)this)),castedCls)
	);
}


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


/* method: somPrintSelf */
Request*  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_Request_somPrintSelf)(SOMObjectClassData.somPrintSelf))(((Request *)((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_Request_somDumpSelf)(SOMObjectClassData.somDumpSelf))(((Request *)((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_Request_somDumpSelfInt)(SOMObjectClassData.somDumpSelfInt))(((Request *)((void *)this)),level)
	);
}



};   /* Request */



#endif       /* SOM_Request_xh */
