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

/*
 *    COMPONENT_NAME: somx
 * 
 *    ORIGINS: 27
 * 
 * 
 *    25H7912  (C)  COPYRIGHT International Business Machines Corp. 1992,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.
 * 
 *    @(#) 1.1 src/somples.os2/somk/cpp/simple/simple.idl, somples.somk, som3.0 12/2/96 14:12:44 [12/4/96 15:12:42]
 * 
 * 
 * DISCLAIMER OF WARRANTIES.
 * The following [enclosed] code is sample code created by IBM
 * Corporation. This sample code is not part of any standard or IBM
 * product and is provided to you solely for the purpose of assisting
 * you in the development of your applications.  The code is provided
 * "AS IS". IBM MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT
 * NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
 * FOR A PARTICULAR PURPOSE, REGARDING THE FUNCTION OR PERFORMANCE OF
 * THIS CODE.  IBM shall not be liable for any damages arising out of
 * your use of the sample code, even if they have been advised of the
 * possibility of such damages.
 * 
 * DISTRIBUTION.
 * This sample code can be freely distributed, copied, altered, and
 * incorporated into other software, provided that it bears the above
 * Copyright notice and DISCLAIMER intact.
 */


#ifndef SOM_Simple_xh
#define SOM_Simple_xh


#define Simple_MajorVersion 0
#define Simple_MinorVersion 0
class Simple;

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

/*
 * Start of bindings for IDL types
 */

class SOMClass;
class SOMObject;

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

/*
 * A function to create the Simple class object...
 */
SOMEXTERN 
#if defined(SOM_Module_simple_Source)
    SOMDLLEXPORT
#else
    SOMDLLIMPORT
#endif
 SOMClass * SOMLINK SimpleNewClass(
		integer4 majorVersion,
		integer4 minorVersion);


/*
 * The API 2 ClassData Structures...
 */
SOMEXTERN struct SimpleClassDataStructure {
	SOMClass *classObject;
	somMToken _get_x;
	somMToken _set_x;
	somMToken _get_y;
	somMToken _set_y;
	somMToken withX;
	somMToken withXandY;
} SOMDLINK 
#if defined(SOM_Module_simple_Source)
    SOMDLLEXPORT
#else
    SOMDLLIMPORT
#endif
 SimpleClassData;
SOMEXTERN struct SimpleCClassDataStructure {
	som3ClassDetailsPtr    parentMtab;
	somDToken              instanceDataToken;
} SOMDLINK 
#if defined(SOM_Module_simple_Source)
    SOMDLLEXPORT
#else
    SOMDLLIMPORT
#endif
 SimpleCClassData;


/*
 * Class Object and Method Token Macros
 */
#define _SOMCLASS_Simple (SimpleClassData.classObject)
#ifndef SOMGD_Simple
    #if (defined(_Simple) || defined(__Simple))
        #undef _Simple
        #undef __Simple
        #define SOMGD_Simple 1
    #else
        #define _Simple _SOMCLASS_Simple
    #endif /* _Simple */
#endif /* SOMGD_Simple */
#define Simple_classObj _SOMCLASS_Simple
#define _SOMMTOKEN_Simple(method) ((somMToken)SimpleClassData.method)

/*
 * -- Typedefs for Simple Method Procedures
 */
SOMEXTERN {
typedef long   SOMLINK somTP_Simple__get_x(Simple *somSelf);
typedef somTP_Simple__get_x *somTD_Simple__get_x;
typedef void   SOMLINK somTP_Simple__set_x(Simple *somSelf, 
		long x);
typedef somTP_Simple__set_x *somTD_Simple__set_x;
typedef long   SOMLINK somTP_Simple__get_y(Simple *somSelf);
typedef somTP_Simple__get_y *somTD_Simple__get_y;
typedef void   SOMLINK somTP_Simple__set_y(Simple *somSelf, 
		long y);
typedef somTP_Simple__set_y *somTD_Simple__set_y;
typedef void   SOMLINK somTP_Simple_withXandY(Simple *somSelf, 
		somInitCtrl* ctrl, 
		long xValue, 
		long yValue);
typedef somTP_Simple_withXandY *somTD_Simple_withXandY;
typedef void   SOMLINK somTP_Simple_withX(Simple *somSelf, 
		somInitCtrl* ctrl, 
		long xValue);
typedef somTP_Simple_withX *somTD_Simple_withX;

/*
 * -- Typedefs for Reintroduced Wrapper Methods
 */
typedef void   SOMLINK somTP_Simple_somDefaultInit(Simple *somSelf, 
		som3InitCtrl* ctrl);
typedef somTP_Simple_somDefaultInit *somTD_Simple_somDefaultInit;
typedef void   SOMLINK somTP_Simple_somDestruct(Simple *somSelf, 
		octet doFree, 
		som3DestructCtrl* ctrl);
typedef somTP_Simple_somDestruct *somTD_Simple_somDestruct;
typedef void   SOMLINK somTP_Simple_somDefaultCopyInit(Simple *somSelf, 
		som3InitCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_Simple_somDefaultCopyInit *somTD_Simple_somDefaultCopyInit;
typedef Simple*   SOMLINK somTP_Simple_somDefaultAssign(Simple *somSelf, 
		som3AssignCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_Simple_somDefaultAssign *somTD_Simple_somDefaultAssign;
typedef void   SOMLINK somTP_Simple_somDefaultConstCopyInit(Simple *somSelf, 
		som3InitCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_Simple_somDefaultConstCopyInit *somTD_Simple_somDefaultConstCopyInit;
typedef void   SOMLINK somTP_Simple_somDefaultVCopyInit(Simple *somSelf, 
		som3InitCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_Simple_somDefaultVCopyInit *somTD_Simple_somDefaultVCopyInit;
typedef void   SOMLINK somTP_Simple_somDefaultConstVCopyInit(Simple *somSelf, 
		som3InitCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_Simple_somDefaultConstVCopyInit *somTD_Simple_somDefaultConstVCopyInit;
typedef Simple*   SOMLINK somTP_Simple_somDefaultConstAssign(Simple *somSelf, 
		som3AssignCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_Simple_somDefaultConstAssign *somTD_Simple_somDefaultConstAssign;
typedef Simple*   SOMLINK somTP_Simple_somDefaultVAssign(Simple *somSelf, 
		som3AssignCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_Simple_somDefaultVAssign *somTD_Simple_somDefaultVAssign;
typedef Simple*   SOMLINK somTP_Simple_somDefaultConstVAssign(Simple *somSelf, 
		som3AssignCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_Simple_somDefaultConstVAssign *somTD_Simple_somDefaultConstVAssign;
typedef void   SOMLINK somTP_Simple_somInit(Simple *somSelf);
typedef somTP_Simple_somInit *somTD_Simple_somInit;
typedef void   SOMLINK somTP_Simple_somUninit(Simple *somSelf);
typedef somTP_Simple_somUninit *somTD_Simple_somUninit;
typedef void   SOMLINK somTP_Simple_somFree(Simple *somSelf);
typedef somTP_Simple_somFree *somTD_Simple_somFree;
typedef SOMClass*   SOMLINK somTP_Simple_somGetClass(Simple *somSelf);
typedef somTP_Simple_somGetClass *somTD_Simple_somGetClass;
typedef string   SOMLINK somTP_Simple_somGetClassName(Simple *somSelf);
typedef somTP_Simple_somGetClassName *somTD_Simple_somGetClassName;
typedef long   SOMLINK somTP_Simple_somGetSize(Simple *somSelf);
typedef somTP_Simple_somGetSize *somTD_Simple_somGetSize;
typedef boolean   SOMLINK somTP_Simple_somIsA(Simple *somSelf, 
		SOMClass* aClassObj);
typedef somTP_Simple_somIsA *somTD_Simple_somIsA;
typedef boolean   SOMLINK somTP_Simple_somIsInstanceOf(Simple *somSelf, 
		SOMClass* aClassObj);
typedef somTP_Simple_somIsInstanceOf *somTD_Simple_somIsInstanceOf;
typedef boolean   SOMLINK somTP_Simple_somRespondsTo(Simple *somSelf, 
		somId mId);
typedef somTP_Simple_somRespondsTo *somTD_Simple_somRespondsTo;
typedef boolean   SOMLINK somTP_Simple_somDispatch(Simple *somSelf, 
		somToken* retValue, 
		somId methodId, 
		va_list ap);
typedef somTP_Simple_somDispatch *somTD_Simple_somDispatch;
typedef boolean   SOMLINK somTP_Simple_somClassDispatch(Simple *somSelf, 
		SOMClass* clsObj, 
		somToken* retValue, 
		somId methodId, 
		va_list ap);
typedef somTP_Simple_somClassDispatch *somTD_Simple_somClassDispatch;
typedef boolean   SOMLINK somTP_Simple_somCastObj(Simple *somSelf, 
		SOMClass* castedCls);
typedef somTP_Simple_somCastObj *somTD_Simple_somCastObj;
typedef boolean   SOMLINK somTP_Simple_somResetObj(Simple *somSelf);
typedef somTP_Simple_somResetObj *somTD_Simple_somResetObj;
typedef Simple*   SOMLINK somTP_Simple_somPrintSelf(Simple *somSelf);
typedef somTP_Simple_somPrintSelf *somTD_Simple_somPrintSelf;
typedef void   SOMLINK somTP_Simple_somDumpSelf(Simple *somSelf, 
		long level);
typedef somTP_Simple_somDumpSelf *somTD_Simple_somDumpSelf;
typedef void   SOMLINK somTP_Simple_somDumpSelfInt(Simple *somSelf, 
		long level);
typedef somTP_Simple_somDumpSelfInt *somTD_Simple_somDumpSelfInt;
}

#endif /* Simple_API */


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

// Simple::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 (!_Simple) SimpleNewClass(Simple_MajorVersion,Simple_MinorVersion);
   return (void*)
   (((somTD_SOMClass_somNewNoInit)(SOMClassClassData.somNewNoInit))
         ((SOMClass *)((void*)_Simple)));
}

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

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

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

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

Simple(long xValue,long yValue) 
{
   withXandY(0,xValue,yValue);
}

Simple(long xValue) 
{
   withX(0,xValue);
}


/* method: _get_x */
long   _get_x()
{
/*
 * Method from the IDL attribute statement:
 * "attribute long x"
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_Simple),
	 ((somTD_Simple__get_x)(SimpleClassData._get_x))(((Simple *)((void *)this)))
	);
}


/* method: _set_x */
void   _set_x(long x)
{
/*
 * Method from the IDL attribute statement:
 * "attribute long x"
 */
   	(
	 SOM_TestCls(this,_SOMCLASS_Simple),
	 ((somTD_Simple__set_x)(SimpleClassData._set_x))(((Simple *)((void *)this)),x)
	);
}


/* method: _get_y */
long   _get_y()
{
/*
 * Method from the IDL attribute statement:
 * "attribute long y"
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_Simple),
	 ((somTD_Simple__get_y)(SimpleClassData._get_y))(((Simple *)((void *)this)))
	);
}


/* method: _set_y */
void   _set_y(long y)
{
/*
 * Method from the IDL attribute statement:
 * "attribute long y"
 */
   	(
	 SOM_TestCls(this,_SOMCLASS_Simple),
	 ((somTD_Simple__set_y)(SimpleClassData._set_y))(((Simple *)((void *)this)),y)
	);
}


/* initializer method: withXandY */
void   withXandY(somInitCtrl* ctrl, 
		long xValue, 
		long yValue)
{
/*
 *  an initializer for Simple. sets x and y.
 */
   	(
	 SOM_TestCls(this,_SOMCLASS_Simple),
	 ((somTD_Simple_withXandY)(SimpleClassData.withXandY))(((Simple *)((void *)this)),ctrl,xValue,yValue)
	);
}


/* initializer method: withX */
void   withX(somInitCtrl* ctrl, 
		long xValue)
{
/*
 *  an initializer for Simple. sets y = x+1.
 */
   	(
	 SOM_TestCls(this,_SOMCLASS_Simple),
	 ((somTD_Simple_withX)(SimpleClassData.withX))(((Simple *)((void *)this)),ctrl,xValue)
	);
}


/*
 * 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_Simple_somDefaultInit)(SOMObjectClassData.somDefaultInit))(((Simple *)((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_Simple_somDestruct)(SOMObjectClassData.somDestruct))(((Simple *)((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_Simple_somDefaultCopyInit)(SOMObjectClassData.somDefaultCopyInit))(((Simple *)((void *)this)),ctrl,fromObj)
	);
}


/* method: somDefaultAssign */
Simple*  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_Simple_somDefaultAssign)(SOMObjectClassData.somDefaultAssign))(((Simple *)((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_Simple_somDefaultConstCopyInit)(SOMObjectClassData.somDefaultConstCopyInit))(((Simple *)((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_Simple_somDefaultVCopyInit)(SOMObjectClassData.somDefaultVCopyInit))(((Simple *)((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_Simple_somDefaultConstVCopyInit)(SOMObjectClassData.somDefaultConstVCopyInit))(((Simple *)((void *)this)),ctrl,fromObj)
	);
}


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


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


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


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


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


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


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


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


/* method: somGetSize */
long   somGetSize()
{
/*
 *  Return the size of the receiver.
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_SOMObject),
	 ((somTD_Simple_somGetSize)(SOMObjectClassData.somGetSize))(((Simple *)((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_Simple_somIsA)(SOMObjectClassData.somIsA))(((Simple *)((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_Simple_somIsInstanceOf)(SOMObjectClassData.somIsInstanceOf))(((Simple *)((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_Simple_somRespondsTo)(SOMObjectClassData.somRespondsTo))(((Simple *)((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_Simple_somDispatch)(SOMObjectClassData.somDispatch))(((Simple *)((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_Simple_somDispatch)(SOMObjectClassData.somDispatch))(((Simple *)((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_Simple_somClassDispatch)(SOMObjectClassData.somClassDispatch))(((Simple *)((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_Simple_somClassDispatch)(SOMObjectClassData.somClassDispatch))(((Simple *)((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_Simple_somCastObj)(SOMObjectClassData.somCastObj))(((Simple *)((void *)this)),castedCls)
	);
}


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


/* method: somPrintSelf */
Simple*  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_Simple_somPrintSelf)(SOMObjectClassData.somPrintSelf))(((Simple *)((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_Simple_somDumpSelf)(SOMObjectClassData.somDumpSelf))(((Simple *)((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_Simple_somDumpSelfInt)(SOMObjectClassData.somDumpSelfInt))(((Simple *)((void *)this)),level)
	);
}



};   /* Simple */



#endif       /* SOM_Simple_xh */
