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

#ifndef SOM_Container_xh
#define SOM_Container_xh

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,
 */

#define Container_MajorVersion 2
#define Container_MinorVersion 3

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

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


/* C++ SOM defs */
#include <somcls.xh>
#include <somcm.xh>

/* C++ parent defs */
#ifndef SOM_SOMObject_xh
#include <somobj.xh>
#endif

#ifndef Container_API
#define Container_API
/*
 * -- The Class API
 */

/*
 * 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 procedure to create the Container Class */
SOMEXTERN SOMClass * SOMLINK ContainerNewClass(
		integer4 majorVersion,
		integer4 minorVersion);

/* The API to the Container class object, and the methods it introduces. */
SOMEXTERN struct ContainerClassDataStructure {
	SOMClass *classObject;
	somMToken contents;
	somMToken lookup_name;
	somMToken describe_contents;
} SOMDLINK ContainerClassData;
#define _Container ContainerClassData.classObject

/* The API to parentMtabs for Container, and the instance data it introduces. */
SOMEXTERN struct ContainerCClassDataStructure {
	somMethodTabs parentMtab;
	somDToken              instanceDataToken;
} SOMDLINK ContainerCClassData;

/*
 * -- 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_somFree(Container *somSelf);
typedef somTP_Container_somFree *somTD_Container_somFree;
typedef void   SOMLINK somTP_Container_somUninit(Container *somSelf);
typedef somTP_Container_somUninit *somTD_Container_somUninit;
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* cls);
typedef somTP_Container_somCastObj *somTD_Container_somCastObj;
typedef boolean   SOMLINK somTP_Container_somResetObj(Container *somSelf);
typedef somTP_Container_somResetObj *somTD_Container_somResetObj;
typedef void   SOMLINK somTP_Container_somDispatchV(Container *somSelf, 
		somId methodId, 
		somId descriptor, 
		va_list ap);
typedef somTP_Container_somDispatchV *somTD_Container_somDispatchV;
typedef long   SOMLINK somTP_Container_somDispatchL(Container *somSelf, 
		somId methodId, 
		somId descriptor, 
		va_list ap);
typedef somTP_Container_somDispatchL *somTD_Container_somDispatchL;
typedef void*   SOMLINK somTP_Container_somDispatchA(Container *somSelf, 
		somId methodId, 
		somId descriptor, 
		va_list ap);
typedef somTP_Container_somDispatchA *somTD_Container_somDispatchA;
typedef double   SOMLINK somTP_Container_somDispatchD(Container *somSelf, 
		somId methodId, 
		somId descriptor, 
		va_list ap);
typedef somTP_Container_somDispatchD *somTD_Container_somDispatchD;
typedef SOMObject*   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 */


/*
 * -- This emitter treats Method Tokens as Thunks by default.
 * -- Use the sc modifier "nothunks" to change this default
 */
#undef somresolve_
#define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))

/*
 * -- 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*)
      SOM_Resolve(_Container,SOMClass,somNewNoInit)
         ((SOMClass *)((void*)_Container));
}

// Container::delete uses somDestruct.
void operator delete(void * obj)
{
   if (obj && *(void**)obj) {
      SOM_Resolve(obj,SOMObject,somFree)
         ((SOMObject*)obj);
   }
}

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

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

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

#ifdef __IBMCPP__
#pragma info(nocnv,nopar)
#endif
Container(const Container* fromObj)
{
   if (*(void**)this != 
       ((somParentMtabStructPtr)
        (ContainerCClassData.parentMtab))->mtab)
      return;
   ((SOMObject*)((void*)this))->somDefaultConstCopyInit(0,((SOMObject*)((void*)fromObj)));
}
#ifdef __IBMCPP__
#pragma info(restore)
#endif


/* 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_ResolveD(this,Container,Container,contents)
	(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_ResolveD(this,Container,Container,lookup_name)
	(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_ResolveD(this,Container,Container,describe_contents)
	(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_ResolveD(this,Container,SOMObject,somDefaultInit)
	(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_ResolveD(this,Container,SOMObject,somDestruct)
	(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_ResolveD(this,Container,SOMObject,somDefaultCopyInit)
	(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_ResolveD(this,Container,SOMObject,somDefaultAssign)
	(this,ctrl,fromObj);
}


/* initializer method: somDefaultConstCopyInit */
void   somDefaultConstCopyInit(som3InitCtrl* ctrl, 
		SOMObject* fromObj)
{
/*
 *  A default copy constructor that uses a const fromObj.
 */
   SOM_ResolveD(this,Container,SOMObject,somDefaultConstCopyInit)
	(this,ctrl,fromObj);
}


/* initializer method: somDefaultVCopyInit */
void   somDefaultVCopyInit(som3InitCtrl* ctrl, 
		SOMObject* fromObj)
{
/*
 *  A default copy constructor that uses a volatile fromObj.
 */
   SOM_ResolveD(this,Container,SOMObject,somDefaultVCopyInit)
	(this,ctrl,fromObj);
}


/* initializer method: somDefaultConstVCopyInit */
void   somDefaultConstVCopyInit(som3InitCtrl* ctrl, 
		SOMObject* fromObj)
{
/*
 *  A default copy constructor that uses a const volatile fromObj.
 */
   SOM_ResolveD(this,Container,SOMObject,somDefaultConstVCopyInit)
	(this,ctrl,fromObj);
}


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


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


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


/* method: somInit */
void   somInit()
{
/*
 *  Obsolete but still supported. Override somDefaultInit instead of somInit.
 */
   SOM_ResolveD(this,Container,SOMObject,somInit)
	(this);
}


/* method: somFree */
void   somFree()
{
/*
 *  Use as directed by framework implementations.
 */
   SOM_ResolveD(this,Container,SOMObject,somFree)
	(this);
}


/* method: somUninit */
void   somUninit()
{
/*
 *  Obsolete but still supported. Override somDestruct instead of somUninit.
 */
   SOM_ResolveD(this,Container,SOMObject,somUninit)
	(this);
}


/* method: somGetClass */
SOMClass*   somGetClass()
{
/*
 *  Return the receiver's class.
 */
   return SOM_ResolveD(this,Container,SOMObject,somGetClass)
	(this);
}


/* method: somGetClassName */
string   somGetClassName()
{
/*
 *  Return the name of the receiver's class.
 */
   return SOM_ResolveD(this,Container,SOMObject,somGetClassName)
	(this);
}


/* method: somGetSize */
long   somGetSize()
{
/*
 *  Return the size of the receiver.
 */
   return SOM_ResolveD(this,Container,SOMObject,somGetSize)
	(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_ResolveD(this,Container,SOMObject,somIsA)
	(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_ResolveD(this,Container,SOMObject,somIsInstanceOf)
	(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_ResolveD(this,Container,SOMObject,somRespondsTo)
	(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.
 */
/* the va_list invocation form */
boolean   Container_somDispatch(somToken* retValue, 
		somId methodId, 
		va_list ap)
{return SOM_ResolveD(this,Container,SOMObject,somDispatch)
	(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.
 */
   va_list ap;
   va_start(ap, methodId);
   boolean __somResult = 
      SOM_ResolveD(this,Container,SOMObject,somDispatch)
	(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   Container_somClassDispatch(SOMClass* clsObj, 
		somToken* retValue, 
		somId methodId, 
		va_list ap)
{return SOM_ResolveD(this,Container,SOMObject,somClassDispatch)
	(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_ResolveD(this,Container,SOMObject,somClassDispatch)
	(this,clsObj,retValue,methodId,ap);
   va_end(ap);
   return __somResult;
}


/* method: somCastObj */
boolean   somCastObj(SOMClass* cls)
{
/*
 *  cast the receiving object to cls (which must be an ancestor of the
 *  objects true class. Returns true on success.
 */
   return SOM_ResolveD(this,Container,SOMObject,somCastObj)
	(this,cls);
}


/* method: somResetObj */
boolean   somResetObj()
{
/*
 *  reset an object to its true class. Returns true always.
 */
   return SOM_ResolveD(this,Container,SOMObject,somResetObj)
	(this);
}


/* va_list method: somDispatchV */

/*
 *  Obsolete. Use somDispatch instead.
 */
/* the va_list invocation form */
void   Container_somDispatchV(somId methodId, 
		somId descriptor, 
		va_list ap)
{   SOM_ResolveD(this,Container,SOMObject,somDispatchV)
	(this,methodId,descriptor,ap);
}

/* the varargs invocation form */
void   somDispatchV(somId methodId, 
		somId descriptor, 
		...)
{
/*
 *  Obsolete. Use somDispatch instead.
 */
   va_list ap;
   va_start(ap, descriptor);
   SOM_ResolveD(this,Container,SOMObject,somDispatchV)
	(this,methodId,descriptor,ap);
   va_end(ap);
}


/* va_list method: somDispatchL */

/*
 *  Obsolete. Use somDispatch instead.
 */
/* the va_list invocation form */
long   Container_somDispatchL(somId methodId, 
		somId descriptor, 
		va_list ap)
{return SOM_ResolveD(this,Container,SOMObject,somDispatchL)
	(this,methodId,descriptor,ap);
}

/* the varargs invocation form */
long   somDispatchL(somId methodId, 
		somId descriptor, 
		...)
{
/*
 *  Obsolete. Use somDispatch instead.
 */
   va_list ap;
   va_start(ap, descriptor);
   long __somResult = 
      SOM_ResolveD(this,Container,SOMObject,somDispatchL)
	(this,methodId,descriptor,ap);
   va_end(ap);
   return __somResult;
}


/* va_list method: somDispatchA */

/*
 *  Obsolete. Use somDispatch instead.
 */
/* the va_list invocation form */
void*   Container_somDispatchA(somId methodId, 
		somId descriptor, 
		va_list ap)
{return SOM_ResolveD(this,Container,SOMObject,somDispatchA)
	(this,methodId,descriptor,ap);
}

/* the varargs invocation form */
void*   somDispatchA(somId methodId, 
		somId descriptor, 
		...)
{
/*
 *  Obsolete. Use somDispatch instead.
 */
   va_list ap;
   va_start(ap, descriptor);
   void* __somResult = 
      SOM_ResolveD(this,Container,SOMObject,somDispatchA)
	(this,methodId,descriptor,ap);
   va_end(ap);
   return __somResult;
}


/* va_list method: somDispatchD */

/*
 *  Obsolete. Use somDispatch instead.
 */
/* the va_list invocation form */
double   Container_somDispatchD(somId methodId, 
		somId descriptor, 
		va_list ap)
{return SOM_ResolveD(this,Container,SOMObject,somDispatchD)
	(this,methodId,descriptor,ap);
}

/* the varargs invocation form */
double   somDispatchD(somId methodId, 
		somId descriptor, 
		...)
{
/*
 *  Obsolete. Use somDispatch instead.
 */
   va_list ap;
   va_start(ap, descriptor);
   double __somResult = 
      SOM_ResolveD(this,Container,SOMObject,somDispatchD)
	(this,methodId,descriptor,ap);
   va_end(ap);
   return __somResult;
}


/* method: somPrintSelf */
SOMObject*   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_ResolveD(this,Container,SOMObject,somPrintSelf)
	(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_ResolveD(this,Container,SOMObject,somDumpSelf)
	(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_ResolveD(this,Container,SOMObject,somDumpSelfInt)
	(this,level);
}



};   /* Container */



#endif       /* SOM_Container_xh */
