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

#ifndef SOM_Container_xh
#define SOM_Container_xh


/*
 *  CORBA 1.1, 7.5.1, p.131
 * 
 *  Container is a generic interface that is common to all of the
 *  SOM CORBA-compliant Interface Repository (IR) objects that can
 *  be used to hold or contain other objects.  The different types
 *  of Container objects are: ModuleDefs, InterfaceDefs, and OperationDefs,
 */

#define Container_MajorVersion 2
#define Container_MinorVersion 3
class Container;

/*
 *  CORBA 1.1, 7.5.1, p.131
 * 
 *  Container is a generic interface that is common to all of the
 *  SOM CORBA-compliant Interface Repository (IR) objects that can
 *  be used to hold or contain other objects.  The different types
 *  of Container objects are: ModuleDefs, InterfaceDefs, and OperationDefs,
 */

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

    #include <somtcnst.xh>
    #include <stdio.h>
    #include <somir.xh>
    #include <containd.xh>


/* 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 Container_API
#define Container_API
/*
 * -- The Class API
 */
#ifndef SOM_IMPORTEXPORT_somir_containr
#ifdef SOM_DLL_somir
	/* export semantics */
	#if defined(SOM_DEFFILE_somir)\
	||(defined(SOM_DEFFILE_BY_DEFAULT)&&!defined(SOM_NODEFFILE_somir))\
	|| !defined(SOM_Module_containr_Source)
	#define SOM_IMPORTEXPORT_somir_containr
	#else
	#define SOM_IMPORTEXPORT_somir_containr SOMDLLEXPORT
	#endif
#else
	#define SOM_IMPORTEXPORT_somir_containr SOMDLLIMPORT
#endif
#endif

/*
 * Start of bindings for IDL types
 */

class SOMClass;
class SOMObject;
class Contained;
typedef
string  Container_InterfaceName;
/*
 *  Valid values for InterfaceName are limited to the following set:
 * 	 {"AttributeDef", "ConstantDef", "ExceptionDef", "InterfaceDef",
 * 	  "ModuleDef", "ParameterDef", "OperationDef", "TypeDef", "all"}
 */

typedef
struct Container_ContainerDescription {
Contained* contained_object;
Identifier name;
any  value;
} Container_ContainerDescription;
#ifndef _IDL_SEQUENCE_Contained_defined
#define _IDL_SEQUENCE_Contained_defined
typedef struct {
    unsigned long _maximum;
    unsigned long _length;
    Contained **_buffer;
} _IDL_SEQUENCE_Contained;
#endif /* _IDL_SEQUENCE_Contained_defined */ 
struct Container_ContainerDescription;
#ifndef _IDL_SEQUENCE_Container_ContainerDescription_defined
#define _IDL_SEQUENCE_Container_ContainerDescription_defined
typedef struct {
    unsigned long _maximum;
    unsigned long _length;
    struct Container_ContainerDescription *_buffer;
} _IDL_SEQUENCE_Container_ContainerDescription;
#endif /* _IDL_SEQUENCE_Container_ContainerDescription_defined */ 

#ifndef SOM_DONT_USE_SHORT_NAMES
#ifndef SOMTGD_InterfaceName
    #ifdef InterfaceName
        #undef InterfaceName
        #define SOMTGD_InterfaceName 1
    #else
        #define InterfaceName Container_InterfaceName
    #endif /* InterfaceName */
#endif /* SOMTGD_InterfaceName */
#endif /* SOM_DONT_USE_SHORT_NAMES */

#ifndef SOM_DONT_USE_SHORT_NAMES
#ifndef SOMTGD_ContainerDescription
    #ifdef ContainerDescription
        #undef ContainerDescription
        #define SOMTGD_ContainerDescription 1
    #else
        #define ContainerDescription Container_ContainerDescription
    #endif /* ContainerDescription */
#endif /* SOMTGD_ContainerDescription */
#ifndef SOMTGD__IDL_SEQUENCE_ContainerDescription
    #ifdef _IDL_SEQUENCE_ContainerDescription
        #undef _IDL_SEQUENCE_ContainerDescription
        #define SOMTGD__IDL_SEQUENCE_ContainerDescription 1
    #else
        #define _IDL_SEQUENCE_ContainerDescription _IDL_SEQUENCE_Container_ContainerDescription
    #endif /* _IDL_SEQUENCE_ContainerDescription */
#endif /* SOMTGD__IDL_SEQUENCE_ContainerDescription */
#endif /* SOM_DONT_USE_SHORT_NAMES */

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

/*
 * A function to create the Container class object...
 */
SOMEXTERN SOM_IMPORTEXPORT_somir_containr SOMClass * SOMLINK ContainerNewClass(
		integer4 majorVersion,
		integer4 minorVersion);


/*
 * The API 2 ClassData Structures...
 */
SOMEXTERN struct ContainerClassDataStructure {
	SOMClass *classObject;
	somMToken contents;
	somMToken lookup_name;
	somMToken describe_contents;
} SOMDLINK SOM_IMPORTEXPORT_somir_containr ContainerClassData;
SOMEXTERN struct ContainerCClassDataStructure {
	som3ClassDetailsPtr    parentMtab;
	somDToken              instanceDataToken;
} SOMDLINK SOM_IMPORTEXPORT_somir_containr ContainerCClassData;


/*
 * Class Object and Method Token Macros
 */
#define _SOMCLASS_Container (ContainerClassData.classObject)
#ifndef SOMGD_Container
    #if (defined(_Container) || defined(__Container))
        #undef _Container
        #undef __Container
        #define SOMGD_Container 1
    #else
        #define _Container _SOMCLASS_Container
    #endif /* _Container */
#endif /* SOMGD_Container */
#define Container_classObj _SOMCLASS_Container
#define _SOMMTOKEN_Container(method) ((somMToken)ContainerClassData.method)

/*
 * -- Typedefs for Container Method Procedures
 */
SOMEXTERN {
typedef _IDL_SEQUENCE_Contained   SOMLINK somTP_Container_contents(Container *somSelf, Environment *ev, 
		Container_InterfaceName limit_type, 
		boolean exclude_inherited);
typedef somTP_Container_contents *somTD_Container_contents;
typedef _IDL_SEQUENCE_Contained   SOMLINK somTP_Container_lookup_name(Container *somSelf, Environment *ev, 
		Identifier search_name, 
		long levels_to_search, 
		Container_InterfaceName limit_type, 
		boolean exclude_inherited);
typedef somTP_Container_lookup_name *somTD_Container_lookup_name;
typedef _IDL_SEQUENCE_Container_ContainerDescription   SOMLINK somTP_Container_describe_contents(Container *somSelf, Environment *ev, 
		Container_InterfaceName limit_type, 
		boolean exclude_inherited, 
		long max_returned_objs);
typedef somTP_Container_describe_contents *somTD_Container_describe_contents;

/*
 * -- Typedefs for Reintroduced Wrapper Methods
 */
typedef void   SOMLINK somTP_Container_somDefaultInit(Container *somSelf, 
		som3InitCtrl* ctrl);
typedef somTP_Container_somDefaultInit *somTD_Container_somDefaultInit;
typedef void   SOMLINK somTP_Container_somDestruct(Container *somSelf, 
		octet doFree, 
		som3DestructCtrl* ctrl);
typedef somTP_Container_somDestruct *somTD_Container_somDestruct;
typedef void   SOMLINK somTP_Container_somDefaultCopyInit(Container *somSelf, 
		som3InitCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_Container_somDefaultCopyInit *somTD_Container_somDefaultCopyInit;
typedef Container*   SOMLINK somTP_Container_somDefaultAssign(Container *somSelf, 
		som3AssignCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_Container_somDefaultAssign *somTD_Container_somDefaultAssign;
typedef void   SOMLINK somTP_Container_somDefaultConstCopyInit(Container *somSelf, 
		som3InitCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_Container_somDefaultConstCopyInit *somTD_Container_somDefaultConstCopyInit;
typedef void   SOMLINK somTP_Container_somDefaultVCopyInit(Container *somSelf, 
		som3InitCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_Container_somDefaultVCopyInit *somTD_Container_somDefaultVCopyInit;
typedef void   SOMLINK somTP_Container_somDefaultConstVCopyInit(Container *somSelf, 
		som3InitCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_Container_somDefaultConstVCopyInit *somTD_Container_somDefaultConstVCopyInit;
typedef Container*   SOMLINK somTP_Container_somDefaultConstAssign(Container *somSelf, 
		som3AssignCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_Container_somDefaultConstAssign *somTD_Container_somDefaultConstAssign;
typedef Container*   SOMLINK somTP_Container_somDefaultVAssign(Container *somSelf, 
		som3AssignCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_Container_somDefaultVAssign *somTD_Container_somDefaultVAssign;
typedef Container*   SOMLINK somTP_Container_somDefaultConstVAssign(Container *somSelf, 
		som3AssignCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_Container_somDefaultConstVAssign *somTD_Container_somDefaultConstVAssign;
typedef void   SOMLINK somTP_Container_somInit(Container *somSelf);
typedef somTP_Container_somInit *somTD_Container_somInit;
typedef void   SOMLINK somTP_Container_somUninit(Container *somSelf);
typedef somTP_Container_somUninit *somTD_Container_somUninit;
typedef void   SOMLINK somTP_Container_somFree(Container *somSelf);
typedef somTP_Container_somFree *somTD_Container_somFree;
typedef SOMClass*   SOMLINK somTP_Container_somGetClass(Container *somSelf);
typedef somTP_Container_somGetClass *somTD_Container_somGetClass;
typedef string   SOMLINK somTP_Container_somGetClassName(Container *somSelf);
typedef somTP_Container_somGetClassName *somTD_Container_somGetClassName;
typedef long   SOMLINK somTP_Container_somGetSize(Container *somSelf);
typedef somTP_Container_somGetSize *somTD_Container_somGetSize;
typedef boolean   SOMLINK somTP_Container_somIsA(Container *somSelf, 
		SOMClass* aClassObj);
typedef somTP_Container_somIsA *somTD_Container_somIsA;
typedef boolean   SOMLINK somTP_Container_somIsInstanceOf(Container *somSelf, 
		SOMClass* aClassObj);
typedef somTP_Container_somIsInstanceOf *somTD_Container_somIsInstanceOf;
typedef boolean   SOMLINK somTP_Container_somRespondsTo(Container *somSelf, 
		somId mId);
typedef somTP_Container_somRespondsTo *somTD_Container_somRespondsTo;
typedef boolean   SOMLINK somTP_Container_somDispatch(Container *somSelf, 
		somToken* retValue, 
		somId methodId, 
		va_list ap);
typedef somTP_Container_somDispatch *somTD_Container_somDispatch;
typedef boolean   SOMLINK somTP_Container_somClassDispatch(Container *somSelf, 
		SOMClass* clsObj, 
		somToken* retValue, 
		somId methodId, 
		va_list ap);
typedef somTP_Container_somClassDispatch *somTD_Container_somClassDispatch;
typedef boolean   SOMLINK somTP_Container_somCastObj(Container *somSelf, 
		SOMClass* castedCls);
typedef somTP_Container_somCastObj *somTD_Container_somCastObj;
typedef boolean   SOMLINK somTP_Container_somResetObj(Container *somSelf);
typedef somTP_Container_somResetObj *somTD_Container_somResetObj;
typedef Container*   SOMLINK somTP_Container_somPrintSelf(Container *somSelf);
typedef somTP_Container_somPrintSelf *somTD_Container_somPrintSelf;
typedef void   SOMLINK somTP_Container_somDumpSelf(Container *somSelf, 
		long level);
typedef somTP_Container_somDumpSelf *somTD_Container_somDumpSelf;
typedef void   SOMLINK somTP_Container_somDumpSelfInt(Container *somSelf, 
		long level);
typedef somTP_Container_somDumpSelfInt *somTD_Container_somDumpSelfInt;
}

#endif /* Container_API */


/*
 * -- The C++ Wrapper Class for Container
 */
class Container : public SOMObject
{
/*
 *  CORBA 1.1, 7.5.1, p.131
 * 
 *  Container is a generic interface that is common to all of the
 *  SOM CORBA-compliant Interface Repository (IR) objects that can
 *  be used to hold or contain other objects.  The different types
 *  of Container objects are: ModuleDefs, InterfaceDefs, and OperationDefs,
 */
public:

// Container::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 (!_Container) ContainerNewClass(Container_MajorVersion,Container_MinorVersion);
   return (void*)
   (((somTD_SOMClass_somNewNoInit)(SOMClassClassData.somNewNoInit))
         ((SOMClass *)((void*)_Container)));
}

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

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

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

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


/* method: contents */
_IDL_SEQUENCE_Contained   contents(Environment *ev, 
		Container_InterfaceName limit_type, 
		boolean exclude_inherited)
{
/*
 *  Returns a list of objects contained by the receiving object.
 *  This operation is used to navigate thru the hierarchy of objects.
 *  Starting with the Repository object, use this operation to list
 *  all of the objects in the Repository, then all of the objects
 *  within the ModuleDef objects, then all of the objects in the
 *  InterfaceDefs, etc.
 * 
 *  If restrict_type is set to "all", objects of all interface types
 *  are returned, otherwise only objects of the requested interface type
 *  will be returned.  If exclude_inherited is set to TRUE, inherited
 *  objects, if any, will not be returned.
 * 
 *  You are responsible for freeing the contents of the returned
 *  sequence when you are finished with it.	Use a code fragment
 *  similar to the following to free it:
 * 
 * 	  if (containedSeq._length)
 * 	      long i;
 * 	      for(i=0; i<containedSeq._length; i++)
 * 		SOMObject_somFree(containedSeq._buffer[i]);
 * 	      SOMFree (containedSeq._buffer);
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_Container),
	 ((somTD_Container_contents)(ContainerClassData.contents))(((Container *)((void *)this)), ev,limit_type,exclude_inherited)
	);
}


/* method: lookup_name */
_IDL_SEQUENCE_Contained   lookup_name(Environment *ev, 
		Identifier search_name, 
		long levels_to_search, 
		Container_InterfaceName limit_type, 
		boolean exclude_inherited)
{
/*
 *  Locates an object by name within the receiving object, or within
 *  objects contained in the receiving object.  Search_name specifies
 *  the name of the object to be found.  Levels_to_search controls
 *  whether the lookup is constrained to the receiving object or
 *  whether it includes objects contained withing the receiving object.
 *  (Set levels_to_search to -1 to search the receiver and all contained
 *  objects, -- set it to 1 to search the receiver only.)  If
 *  limit_type is set to "all", objects of all interface types
 *  are returned, otherwise only objects of the requested interface type
 *  will be returned.  Only the values "AttributeDef", "ConstantDef",
 *  "ExceptionDef", "InterfaceDef", "ModuleDef", "ParameterDef",
 *  "OperationDef", "TypeDef", or "all" may be specified for limit_type.
 *  If exclude_inherited is set to TRUE, inherited objects will not be
 *  included in the returned sequence.
 * 
 *  You are responsible for freeing the contents of the returned
 *  sequence when you are finished with it.	Use a code fragment
 *  similar to the following to free it:
 * 
 * 	  if (containedSeq._length)
 * 	      long i;
 * 	      for(i=0; i<containedSeq._length; i++)
 * 		SOMObject_somFree(containedSeq._buffer[i]);
 * 	      SOMFree (containedSeq._buffer);
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_Container),
	 ((somTD_Container_lookup_name)(ContainerClassData.lookup_name))(((Container *)((void *)this)), ev,search_name,levels_to_search,limit_type,exclude_inherited)
	);
}


/* method: describe_contents */
_IDL_SEQUENCE_Container_ContainerDescription   describe_contents(Environment *ev, 
		Container_InterfaceName limit_type, 
		boolean exclude_inherited, 
		long max_returned_objs)
{
/*
 *  Combines the "contents" operation and the "describe" operation.  For
 *  each object returned by the contents operation, the description of
 *  the object is returned by invoking its "describe" operation.
 * 
 *  Max_returned_objs can be used to limit the number of objects that can
 *  be returned.  If max_returned_objs is set to -1, results for all
 *  contained objects will be returned.
 * 
 *  Note: You should SOMFree result._buffer when you are done with it
 *  as well as result._buffer[x].value._value !
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_Container),
	 ((somTD_Container_describe_contents)(ContainerClassData.describe_contents))(((Container *)((void *)this)), ev,limit_type,exclude_inherited,max_returned_objs)
	);
}


/*
 * 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_Container_somDefaultInit)(SOMObjectClassData.somDefaultInit))(((Container *)((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_Container_somDestruct)(SOMObjectClassData.somDestruct))(((Container *)((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_Container_somDefaultCopyInit)(SOMObjectClassData.somDefaultCopyInit))(((Container *)((void *)this)),ctrl,fromObj)
	);
}


/* method: somDefaultAssign */
Container*  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_Container_somDefaultAssign)(SOMObjectClassData.somDefaultAssign))(((Container *)((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_Container_somDefaultConstCopyInit)(SOMObjectClassData.somDefaultConstCopyInit))(((Container *)((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_Container_somDefaultVCopyInit)(SOMObjectClassData.somDefaultVCopyInit))(((Container *)((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_Container_somDefaultConstVCopyInit)(SOMObjectClassData.somDefaultConstVCopyInit))(((Container *)((void *)this)),ctrl,fromObj)
	);
}


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


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


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


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


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


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


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


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


/* method: somGetSize */
long   somGetSize()
{
/*
 *  Return the size of the receiver.
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_SOMObject),
	 ((somTD_Container_somGetSize)(SOMObjectClassData.somGetSize))(((Container *)((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_Container_somIsA)(SOMObjectClassData.somIsA))(((Container *)((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_Container_somIsInstanceOf)(SOMObjectClassData.somIsInstanceOf))(((Container *)((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_Container_somRespondsTo)(SOMObjectClassData.somRespondsTo))(((Container *)((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_Container_somDispatch)(SOMObjectClassData.somDispatch))(((Container *)((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_Container_somDispatch)(SOMObjectClassData.somDispatch))(((Container *)((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_Container_somClassDispatch)(SOMObjectClassData.somClassDispatch))(((Container *)((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_Container_somClassDispatch)(SOMObjectClassData.somClassDispatch))(((Container *)((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_Container_somCastObj)(SOMObjectClassData.somCastObj))(((Container *)((void *)this)),castedCls)
	);
}


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


/* method: somPrintSelf */
Container*  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_Container_somPrintSelf)(SOMObjectClassData.somPrintSelf))(((Container *)((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_Container_somDumpSelf)(SOMObjectClassData.somDumpSelf))(((Container *)((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_Container_somDumpSelfInt)(SOMObjectClassData.somDumpSelfInt))(((Container *)((void *)this)),level)
	);
}



};   /* Container */



#endif       /* SOM_Container_xh */
