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

#ifndef SOM_Contained_xh
#define SOM_Contained_xh


/*
 *  CORBA 1.1, 7.5.1, p.130
 * 
 *  The Contained interface is the most generic form of interface
 *  for the objects in the SOM CORBA-compliant Interface Repository (IR).
 *  All objects contained in the IR inherit this interface.
 */

#define Contained_MajorVersion 2
#define Contained_MinorVersion 3
class Contained;

/*
 *  CORBA 1.1, 7.5.1, p.130
 * 
 *  The Contained interface is the most generic form of interface
 *  for the objects in the SOM CORBA-compliant Interface Repository (IR).
 *  All objects contained in the IR inherit this interface.
 */

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

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

    #define RepositoryId string
    #define _IDL_SEQUENCE_RepositoryId _IDL_SEQUENCE_string
    #define TC_Contained ((TypeCode) &TC__Contained)
    typedef struct {TCKind t; long f; string s;} TC_Contained_td;
    SOMEXTERN TC_Contained_td SOMDLINK TC__Contained;


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

/*
 * Start of bindings for IDL types
 */

class SOMClass;
class SOMObject;
class Container;
typedef
struct Contained_Description {
Identifier name;
any  value;
} Contained_Description;
struct somModifier;
#ifndef _IDL_SEQUENCE_somModifier_defined
#define _IDL_SEQUENCE_somModifier_defined
typedef struct {
    unsigned long _maximum;
    unsigned long _length;
    struct somModifier *_buffer;
} _IDL_SEQUENCE_somModifier;
#endif /* _IDL_SEQUENCE_somModifier_defined */ 
#ifndef _IDL_SEQUENCE_Container_defined
#define _IDL_SEQUENCE_Container_defined
typedef struct {
    unsigned long _maximum;
    unsigned long _length;
    Container **_buffer;
} _IDL_SEQUENCE_Container;
#endif /* _IDL_SEQUENCE_Container_defined */ 

#ifndef SOM_DONT_USE_SHORT_NAMES
#ifndef SOMTGD_Description
    #ifdef Description
        #undef Description
        #define SOMTGD_Description 1
    #else
        #define Description Contained_Description
    #endif /* Description */
#endif /* SOMTGD_Description */
#endif /* SOM_DONT_USE_SHORT_NAMES */

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

/*
 * A function to create the Contained class object...
 */
SOMEXTERN SOM_IMPORTEXPORT_somir_containd SOMClass * SOMLINK ContainedNewClass(
		integer4 majorVersion,
		integer4 minorVersion);


/*
 * The API 2 ClassData Structures...
 */
SOMEXTERN struct ContainedClassDataStructure {
	SOMClass *classObject;
	somMToken within;
	somMToken describe;
	somMToken _get_name;
	somMToken _set_name;
	somMToken _get_id;
	somMToken _set_id;
	somMToken _get_defined_in;
	somMToken _set_defined_in;
	somMToken _get_somModifiers;
	somMToken _set_somModifiers;
} SOMDLINK SOM_IMPORTEXPORT_somir_containd ContainedClassData;
SOMEXTERN struct ContainedCClassDataStructure {
	som3ClassDetailsPtr    parentMtab;
	somDToken              instanceDataToken;
} SOMDLINK SOM_IMPORTEXPORT_somir_containd ContainedCClassData;


/*
 * Class Object and Method Token Macros
 */
#define _SOMCLASS_Contained (ContainedClassData.classObject)
#ifndef SOMGD_Contained
    #if (defined(_Contained) || defined(__Contained))
        #undef _Contained
        #undef __Contained
        #define SOMGD_Contained 1
    #else
        #define _Contained _SOMCLASS_Contained
    #endif /* _Contained */
#endif /* SOMGD_Contained */
#define Contained_classObj _SOMCLASS_Contained
#define _SOMMTOKEN_Contained(method) ((somMToken)ContainedClassData.method)

/*
 * -- Typedefs for Contained Method Procedures
 */
SOMEXTERN {
typedef Identifier   SOMLINK somTP_Contained__get_name(Contained *somSelf, Environment *ev);
typedef somTP_Contained__get_name *somTD_Contained__get_name;
typedef void   SOMLINK somTP_Contained__set_name(Contained *somSelf, Environment *ev, 
		Identifier name);
typedef somTP_Contained__set_name *somTD_Contained__set_name;
typedef RepositoryId   SOMLINK somTP_Contained__get_id(Contained *somSelf, Environment *ev);
typedef somTP_Contained__get_id *somTD_Contained__get_id;
typedef void   SOMLINK somTP_Contained__set_id(Contained *somSelf, Environment *ev, 
		RepositoryId id);
typedef somTP_Contained__set_id *somTD_Contained__set_id;
typedef RepositoryId   SOMLINK somTP_Contained__get_defined_in(Contained *somSelf, Environment *ev);
typedef somTP_Contained__get_defined_in *somTD_Contained__get_defined_in;
typedef void   SOMLINK somTP_Contained__set_defined_in(Contained *somSelf, Environment *ev, 
		RepositoryId defined_in);
typedef somTP_Contained__set_defined_in *somTD_Contained__set_defined_in;
typedef _IDL_SEQUENCE_somModifier   SOMLINK somTP_Contained__get_somModifiers(Contained *somSelf, Environment *ev);
typedef somTP_Contained__get_somModifiers *somTD_Contained__get_somModifiers;
typedef void   SOMLINK somTP_Contained__set_somModifiers(Contained *somSelf, Environment *ev, 
		_IDL_SEQUENCE_somModifier* somModifiers);
typedef somTP_Contained__set_somModifiers *somTD_Contained__set_somModifiers;
typedef _IDL_SEQUENCE_Container   SOMLINK somTP_Contained_within(Contained *somSelf, Environment *ev);
typedef somTP_Contained_within *somTD_Contained_within;
typedef Contained_Description   SOMLINK somTP_Contained_describe(Contained *somSelf, Environment *ev);
typedef somTP_Contained_describe *somTD_Contained_describe;

/*
 * -- Typedefs for Reintroduced Wrapper Methods
 */
typedef void   SOMLINK somTP_Contained_somDefaultInit(Contained *somSelf, 
		som3InitCtrl* ctrl);
typedef somTP_Contained_somDefaultInit *somTD_Contained_somDefaultInit;
typedef void   SOMLINK somTP_Contained_somDestruct(Contained *somSelf, 
		octet doFree, 
		som3DestructCtrl* ctrl);
typedef somTP_Contained_somDestruct *somTD_Contained_somDestruct;
typedef void   SOMLINK somTP_Contained_somDefaultCopyInit(Contained *somSelf, 
		som3InitCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_Contained_somDefaultCopyInit *somTD_Contained_somDefaultCopyInit;
typedef Contained*   SOMLINK somTP_Contained_somDefaultAssign(Contained *somSelf, 
		som3AssignCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_Contained_somDefaultAssign *somTD_Contained_somDefaultAssign;
typedef void   SOMLINK somTP_Contained_somDefaultConstCopyInit(Contained *somSelf, 
		som3InitCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_Contained_somDefaultConstCopyInit *somTD_Contained_somDefaultConstCopyInit;
typedef void   SOMLINK somTP_Contained_somDefaultVCopyInit(Contained *somSelf, 
		som3InitCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_Contained_somDefaultVCopyInit *somTD_Contained_somDefaultVCopyInit;
typedef void   SOMLINK somTP_Contained_somDefaultConstVCopyInit(Contained *somSelf, 
		som3InitCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_Contained_somDefaultConstVCopyInit *somTD_Contained_somDefaultConstVCopyInit;
typedef Contained*   SOMLINK somTP_Contained_somDefaultConstAssign(Contained *somSelf, 
		som3AssignCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_Contained_somDefaultConstAssign *somTD_Contained_somDefaultConstAssign;
typedef Contained*   SOMLINK somTP_Contained_somDefaultVAssign(Contained *somSelf, 
		som3AssignCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_Contained_somDefaultVAssign *somTD_Contained_somDefaultVAssign;
typedef Contained*   SOMLINK somTP_Contained_somDefaultConstVAssign(Contained *somSelf, 
		som3AssignCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_Contained_somDefaultConstVAssign *somTD_Contained_somDefaultConstVAssign;
typedef void   SOMLINK somTP_Contained_somInit(Contained *somSelf);
typedef somTP_Contained_somInit *somTD_Contained_somInit;
typedef void   SOMLINK somTP_Contained_somUninit(Contained *somSelf);
typedef somTP_Contained_somUninit *somTD_Contained_somUninit;
typedef void   SOMLINK somTP_Contained_somFree(Contained *somSelf);
typedef somTP_Contained_somFree *somTD_Contained_somFree;
typedef SOMClass*   SOMLINK somTP_Contained_somGetClass(Contained *somSelf);
typedef somTP_Contained_somGetClass *somTD_Contained_somGetClass;
typedef string   SOMLINK somTP_Contained_somGetClassName(Contained *somSelf);
typedef somTP_Contained_somGetClassName *somTD_Contained_somGetClassName;
typedef long   SOMLINK somTP_Contained_somGetSize(Contained *somSelf);
typedef somTP_Contained_somGetSize *somTD_Contained_somGetSize;
typedef boolean   SOMLINK somTP_Contained_somIsA(Contained *somSelf, 
		SOMClass* aClassObj);
typedef somTP_Contained_somIsA *somTD_Contained_somIsA;
typedef boolean   SOMLINK somTP_Contained_somIsInstanceOf(Contained *somSelf, 
		SOMClass* aClassObj);
typedef somTP_Contained_somIsInstanceOf *somTD_Contained_somIsInstanceOf;
typedef boolean   SOMLINK somTP_Contained_somRespondsTo(Contained *somSelf, 
		somId mId);
typedef somTP_Contained_somRespondsTo *somTD_Contained_somRespondsTo;
typedef boolean   SOMLINK somTP_Contained_somDispatch(Contained *somSelf, 
		somToken* retValue, 
		somId methodId, 
		va_list ap);
typedef somTP_Contained_somDispatch *somTD_Contained_somDispatch;
typedef boolean   SOMLINK somTP_Contained_somClassDispatch(Contained *somSelf, 
		SOMClass* clsObj, 
		somToken* retValue, 
		somId methodId, 
		va_list ap);
typedef somTP_Contained_somClassDispatch *somTD_Contained_somClassDispatch;
typedef boolean   SOMLINK somTP_Contained_somCastObj(Contained *somSelf, 
		SOMClass* castedCls);
typedef somTP_Contained_somCastObj *somTD_Contained_somCastObj;
typedef boolean   SOMLINK somTP_Contained_somResetObj(Contained *somSelf);
typedef somTP_Contained_somResetObj *somTD_Contained_somResetObj;
typedef Contained*   SOMLINK somTP_Contained_somPrintSelf(Contained *somSelf);
typedef somTP_Contained_somPrintSelf *somTD_Contained_somPrintSelf;
typedef void   SOMLINK somTP_Contained_somDumpSelf(Contained *somSelf, 
		long level);
typedef somTP_Contained_somDumpSelf *somTD_Contained_somDumpSelf;
typedef void   SOMLINK somTP_Contained_somDumpSelfInt(Contained *somSelf, 
		long level);
typedef somTP_Contained_somDumpSelfInt *somTD_Contained_somDumpSelfInt;
}

#endif /* Contained_API */


/*
 * -- The C++ Wrapper Class for Contained
 */
class Contained : public SOMObject
{
/*
 *  CORBA 1.1, 7.5.1, p.130
 * 
 *  The Contained interface is the most generic form of interface
 *  for the objects in the SOM CORBA-compliant Interface Repository (IR).
 *  All objects contained in the IR inherit this interface.
 */
public:

// Contained::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 (!_Contained) ContainedNewClass(Contained_MajorVersion,Contained_MinorVersion);
   return (void*)
   (((somTD_SOMClass_somNewNoInit)(SOMClassClassData.somNewNoInit))
         ((SOMClass *)((void*)_Contained)));
}

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

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

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

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


/* method: _get_name */
Identifier   _get_name(Environment *ev)
{
/*
 *  The value of the "name" field of the receiving object
 * 
 *  This is a simple name that indentifies the receiving object
 *  within its containment hierarchy.  Outside of the containment
 *  hierarchy this name is not necessarily unique, and may require
 *  qualification by ModuleDef name, InterfaceDef name, etc.
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_Contained),
	 ((somTD_Contained__get_name)(ContainedClassData._get_name))(((Contained *)((void *)this)), ev)
	);
}


/* method: _set_name */
void   _set_name(Environment *ev, 
		Identifier name)
{
/*
 *  The value of the "name" field of the receiving object
 * 
 *  This is a simple name that indentifies the receiving object
 *  within its containment hierarchy.  Outside of the containment
 *  hierarchy this name is not necessarily unique, and may require
 *  qualification by ModuleDef name, InterfaceDef name, etc.
 */
   	(
	 SOM_TestCls(this,_SOMCLASS_Contained),
	 ((somTD_Contained__set_name)(ContainedClassData._set_name))(((Contained *)((void *)this)), ev,name)
	);
}


/* method: _get_id */
RepositoryId   _get_id(Environment *ev)
{
/*
 *  The value of the "id" field of the receiving object
 * 
 *  The "id" is a string that uniquely identifies any object in
 *  the interface repository.  No qualification is needed for
 *  an "id".  Notice that "RepositoryId"s have no relationship
 *  to the SOM type "somId".
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_Contained),
	 ((somTD_Contained__get_id)(ContainedClassData._get_id))(((Contained *)((void *)this)), ev)
	);
}


/* method: _set_id */
void   _set_id(Environment *ev, 
		RepositoryId id)
{
/*
 *  The value of the "id" field of the receiving object
 * 
 *  The "id" is a string that uniquely identifies any object in
 *  the interface repository.  No qualification is needed for
 *  an "id".  Notice that "RepositoryId"s have no relationship
 *  to the SOM type "somId".
 */
   	(
	 SOM_TestCls(this,_SOMCLASS_Contained),
	 ((somTD_Contained__set_id)(ContainedClassData._set_id))(((Contained *)((void *)this)), ev,id)
	);
}


/* method: _get_defined_in */
RepositoryId   _get_defined_in(Environment *ev)
{
/*
 *  The value of the "defined_in" field of the receiving object
 * 
 *  This "id" uniquely identifies the container where the
 *  receiving object is defined.  Objects that have global scope
 *  and do not appear within any other objects are by default
 *  placed in the "Repository" object.
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_Contained),
	 ((somTD_Contained__get_defined_in)(ContainedClassData._get_defined_in))(((Contained *)((void *)this)), ev)
	);
}


/* method: _set_defined_in */
void   _set_defined_in(Environment *ev, 
		RepositoryId defined_in)
{
/*
 *  The value of the "defined_in" field of the receiving object
 * 
 *  This "id" uniquely identifies the container where the
 *  receiving object is defined.  Objects that have global scope
 *  and do not appear within any other objects are by default
 *  placed in the "Repository" object.
 */
   	(
	 SOM_TestCls(this,_SOMCLASS_Contained),
	 ((somTD_Contained__set_defined_in)(ContainedClassData._set_defined_in))(((Contained *)((void *)this)), ev,defined_in)
	);
}


/* method: _get_somModifiers */
_IDL_SEQUENCE_somModifier   _get_somModifiers(Environment *ev)
{
/*
 *  [SOM-unique extension]
 * 
 *  The somModifiers attribute is a sequence containing all of
 *  the "modifiers" attached to the corresponding IDL object in
 *  the SOM-unique implementation section of the IDL file where
 *  the receiving object was originally defined.
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_Contained),
	 ((somTD_Contained__get_somModifiers)(ContainedClassData._get_somModifiers))(((Contained *)((void *)this)), ev)
	);
}


/* method: _set_somModifiers */
void   _set_somModifiers(Environment *ev, 
		_IDL_SEQUENCE_somModifier* somModifiers)
{
/*
 *  [SOM-unique extension]
 * 
 *  The somModifiers attribute is a sequence containing all of
 *  the "modifiers" attached to the corresponding IDL object in
 *  the SOM-unique implementation section of the IDL file where
 *  the receiving object was originally defined.
 */
   	(
	 SOM_TestCls(this,_SOMCLASS_Contained),
	 ((somTD_Contained__set_somModifiers)(ContainedClassData._set_somModifiers))(((Contained *)((void *)this)), ev,somModifiers)
	);
}


/* method: within */
_IDL_SEQUENCE_Container   within(Environment *ev)
{
/*
 *  Returns a list of objects that contain the receiving object.
 *  If the object is an interface or module, it can only be contained
 *  by the object that defines it.  Other objects can be contained by
 *  objects that define or inherit them.
 * 
 *  When you have finished using the sequence returned by this method
 *  it is your responsibility to release the storage allocated for it.
 *  To free the sequence, use a call similar to the following:
 * 
 * 	  if (seqname._length)
 * 	      long i;
 * 	      for(i=0; i<seqname._length; i++)
 * 		_somFree(seqname._buffer[i]);
 * 	      SOMFree (seqname._buffer);
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_Contained),
	 ((somTD_Contained_within)(ContainedClassData.within))(((Contained *)((void *)this)), ev)
	);
}


/* method: describe */
Contained_Description   describe(Environment *ev)
{
/*
 *  Returns a structure containing all of the attributes defined in
 *  the interface of the receiving object.
 * 
 *  Warning: this method returns pointers to things withing objects
 *  (for example, name).  Don't use the somFree method to release
 *  any of these objects while this information is still needed..
 * 
 *  When you have finished using the information in the returned
 *  Description structure, it is your responsibility to release
 *  the associated storage using a call similar to the following:
 * 
 * 	  if (desc.value._value)
 * 	      SOMFree (desc.value._value);
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_Contained),
	 ((somTD_Contained_describe)(ContainedClassData.describe))(((Contained *)((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_Contained_somDefaultInit)(SOMObjectClassData.somDefaultInit))(((Contained *)((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_Contained_somDestruct)(SOMObjectClassData.somDestruct))(((Contained *)((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_Contained_somDefaultCopyInit)(SOMObjectClassData.somDefaultCopyInit))(((Contained *)((void *)this)),ctrl,fromObj)
	);
}


/* method: somDefaultAssign */
Contained*  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_Contained_somDefaultAssign)(SOMObjectClassData.somDefaultAssign))(((Contained *)((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_Contained_somDefaultConstCopyInit)(SOMObjectClassData.somDefaultConstCopyInit))(((Contained *)((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_Contained_somDefaultVCopyInit)(SOMObjectClassData.somDefaultVCopyInit))(((Contained *)((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_Contained_somDefaultConstVCopyInit)(SOMObjectClassData.somDefaultConstVCopyInit))(((Contained *)((void *)this)),ctrl,fromObj)
	);
}


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


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


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


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


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


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


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


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


/* method: somGetSize */
long   somGetSize()
{
/*
 *  Return the size of the receiver.
 */
   return 	(
	 SOM_TestCls(this,_SOMCLASS_SOMObject),
	 ((somTD_Contained_somGetSize)(SOMObjectClassData.somGetSize))(((Contained *)((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_Contained_somIsA)(SOMObjectClassData.somIsA))(((Contained *)((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_Contained_somIsInstanceOf)(SOMObjectClassData.somIsInstanceOf))(((Contained *)((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_Contained_somRespondsTo)(SOMObjectClassData.somRespondsTo))(((Contained *)((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_Contained_somDispatch)(SOMObjectClassData.somDispatch))(((Contained *)((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_Contained_somDispatch)(SOMObjectClassData.somDispatch))(((Contained *)((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_Contained_somClassDispatch)(SOMObjectClassData.somClassDispatch))(((Contained *)((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_Contained_somClassDispatch)(SOMObjectClassData.somClassDispatch))(((Contained *)((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_Contained_somCastObj)(SOMObjectClassData.somCastObj))(((Contained *)((void *)this)),castedCls)
	);
}


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


/* method: somPrintSelf */
Contained*  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_Contained_somPrintSelf)(SOMObjectClassData.somPrintSelf))(((Contained *)((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_Contained_somDumpSelf)(SOMObjectClassData.somDumpSelf))(((Contained *)((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_Contained_somDumpSelfInt)(SOMObjectClassData.somDumpSelfInt))(((Contained *)((void *)this)),level)
	);
}



};   /* Contained */



#endif       /* SOM_Contained_xh */
