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

#ifndef SOM_OperationDef_xh
#define SOM_OperationDef_xh

class OperationDef;

/*
 *  This interface is used to access information associated with
 *  operations defined in an IDL interface.
 * 
 *  See CORBA 1.1, 7.5.6, pp.135-136
 */

#define OperationDef_MajorVersion 2
#define OperationDef_MinorVersion 3

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

    #include <somtcnst.xh>
    #include <somir.xh>
    #include <paramdef.xh>
    #include <excptdef.xh>

    #define ContextIdentifier string
    #define _IDL_SEQUENCE_ContextIdentifier _IDL_SEQUENCE_string


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

/* C++ parent defs */
#ifndef SOM_Contained_xh
#include <containd.xh>
#endif
#ifndef SOM_Container_xh
#include <containr.xh>
#endif

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

/*
 * Start of bindings for IDL types
 */

class SOMClass;
class SOMObject;
class Container;
typedef unsigned long OperationDef_OperationMode;
#define OperationDef_NORMAL 1UL
#define OperationDef_ONEWAY 2UL
#ifndef _IDL_SEQUENCE_string_defined
#define _IDL_SEQUENCE_string_defined
typedef struct {
    unsigned long _maximum;
    unsigned long _length;
    string *_buffer;
} _IDL_SEQUENCE_string;
#endif /* _IDL_SEQUENCE_string_defined */ 
struct ParameterDef_ParameterDescription;
#ifndef _IDL_SEQUENCE_ParameterDef_ParameterDescription_defined
#define _IDL_SEQUENCE_ParameterDef_ParameterDescription_defined
typedef struct {
    unsigned long _maximum;
    unsigned long _length;
    struct ParameterDef_ParameterDescription *_buffer;
} _IDL_SEQUENCE_ParameterDef_ParameterDescription;
#endif /* _IDL_SEQUENCE_ParameterDef_ParameterDescription_defined */ 
struct ExceptionDef_ExceptionDescription;
#ifndef _IDL_SEQUENCE_ExceptionDef_ExceptionDescription_defined
#define _IDL_SEQUENCE_ExceptionDef_ExceptionDescription_defined
typedef struct {
    unsigned long _maximum;
    unsigned long _length;
    struct ExceptionDef_ExceptionDescription *_buffer;
} _IDL_SEQUENCE_ExceptionDef_ExceptionDescription;
#endif /* _IDL_SEQUENCE_ExceptionDef_ExceptionDescription_defined */ 
typedef
struct OperationDef_OperationDescription {
Identifier name;
RepositoryId id;
RepositoryId defined_in;
TypeCode result;
OperationDef_OperationMode mode;
_IDL_SEQUENCE_string contexts;
_IDL_SEQUENCE_ParameterDef_ParameterDescription parameter;
_IDL_SEQUENCE_ExceptionDef_ExceptionDescription exceptions;
} OperationDef_OperationDescription;
/*
 *  The inherited describe method returns an instance of this
 *  (OperationDescription) structure in the "value" member of the
 *  Description structure defined in the Contained interface.
 *  The inherited describe_contents method in the Container
 *  interface returns a sequence of these Description structures
 *  each carrying a reference to an OperationDescription structure
 *  in its "value" member.
 */


#ifndef SOM_DONT_USE_SHORT_NAMES
#ifndef SOMTGD_OperationMode
    #ifdef OperationMode
        #undef OperationMode
        #define SOMTGD_OperationMode 1
    #else
        #define OperationMode OperationDef_OperationMode
    #endif /* OperationMode */
#endif /* SOMTGD_OperationMode */
#ifndef SOMTGD__IDL_SEQUENCE_ParameterDescription
    #ifdef _IDL_SEQUENCE_ParameterDescription
        #undef _IDL_SEQUENCE_ParameterDescription
        #define SOMTGD__IDL_SEQUENCE_ParameterDescription 1
    #else
        #define _IDL_SEQUENCE_ParameterDescription _IDL_SEQUENCE_ParameterDef_ParameterDescription
    #endif /* _IDL_SEQUENCE_ParameterDescription */
#endif /* SOMTGD__IDL_SEQUENCE_ParameterDescription */
#ifndef SOMTGD__IDL_SEQUENCE_ExceptionDescription
    #ifdef _IDL_SEQUENCE_ExceptionDescription
        #undef _IDL_SEQUENCE_ExceptionDescription
        #define SOMTGD__IDL_SEQUENCE_ExceptionDescription 1
    #else
        #define _IDL_SEQUENCE_ExceptionDescription _IDL_SEQUENCE_ExceptionDef_ExceptionDescription
    #endif /* _IDL_SEQUENCE_ExceptionDescription */
#endif /* SOMTGD__IDL_SEQUENCE_ExceptionDescription */
#ifndef SOMTGD_OperationDescription
    #ifdef OperationDescription
        #undef OperationDescription
        #define SOMTGD_OperationDescription 1
    #else
        #define OperationDescription OperationDef_OperationDescription
    #endif /* OperationDescription */
#endif /* SOMTGD_OperationDescription */
#endif /* SOM_DONT_USE_SHORT_NAMES */

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

/* A procedure to create the OperationDef Class */
SOMEXTERN SOMClass * SOMLINK OperationDefNewClass(
		integer4 majorVersion,
		integer4 minorVersion);

/* The API to the OperationDef class object, and the methods it introduces. */
SOMEXTERN struct OperationDefClassDataStructure {
	SOMClass *classObject;
	somMToken _get_result;
	somMToken _set_result;
	somMToken _get_mode;
	somMToken _set_mode;
	somMToken _get_contexts;
	somMToken _set_contexts;
} SOMDLINK OperationDefClassData;
#define _OperationDef OperationDefClassData.classObject

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

/*
 * -- Typedefs for OperationDef Method Procedures
 */
SOMEXTERN {
typedef TypeCode   SOMLINK somTP_OperationDef__get_result(OperationDef *somSelf, Environment *ev);
typedef somTP_OperationDef__get_result *somTD_OperationDef__get_result;
typedef void   SOMLINK somTP_OperationDef__set_result(OperationDef *somSelf, Environment *ev, 
		TypeCode result);
typedef somTP_OperationDef__set_result *somTD_OperationDef__set_result;
typedef OperationDef_OperationMode   SOMLINK somTP_OperationDef__get_mode(OperationDef *somSelf, Environment *ev);
typedef somTP_OperationDef__get_mode *somTD_OperationDef__get_mode;
typedef void   SOMLINK somTP_OperationDef__set_mode(OperationDef *somSelf, Environment *ev, 
		OperationDef_OperationMode mode);
typedef somTP_OperationDef__set_mode *somTD_OperationDef__set_mode;
typedef _IDL_SEQUENCE_string   SOMLINK somTP_OperationDef__get_contexts(OperationDef *somSelf, Environment *ev);
typedef somTP_OperationDef__get_contexts *somTD_OperationDef__get_contexts;
typedef void   SOMLINK somTP_OperationDef__set_contexts(OperationDef *somSelf, Environment *ev, 
		_IDL_SEQUENCE_string* contexts);
typedef somTP_OperationDef__set_contexts *somTD_OperationDef__set_contexts;

/*
 * -- Typedefs for Reintroduced Wrapper Methods
 */
typedef Identifier   SOMLINK somTP_OperationDef__get_name(OperationDef *somSelf, Environment *ev);
typedef somTP_OperationDef__get_name *somTD_OperationDef__get_name;
typedef void   SOMLINK somTP_OperationDef__set_name(OperationDef *somSelf, Environment *ev, 
		Identifier name);
typedef somTP_OperationDef__set_name *somTD_OperationDef__set_name;
typedef RepositoryId   SOMLINK somTP_OperationDef__get_id(OperationDef *somSelf, Environment *ev);
typedef somTP_OperationDef__get_id *somTD_OperationDef__get_id;
typedef void   SOMLINK somTP_OperationDef__set_id(OperationDef *somSelf, Environment *ev, 
		RepositoryId id);
typedef somTP_OperationDef__set_id *somTD_OperationDef__set_id;
typedef RepositoryId   SOMLINK somTP_OperationDef__get_defined_in(OperationDef *somSelf, Environment *ev);
typedef somTP_OperationDef__get_defined_in *somTD_OperationDef__get_defined_in;
typedef void   SOMLINK somTP_OperationDef__set_defined_in(OperationDef *somSelf, Environment *ev, 
		RepositoryId defined_in);
typedef somTP_OperationDef__set_defined_in *somTD_OperationDef__set_defined_in;
typedef _IDL_SEQUENCE_somModifier   SOMLINK somTP_OperationDef__get_somModifiers(OperationDef *somSelf, Environment *ev);
typedef somTP_OperationDef__get_somModifiers *somTD_OperationDef__get_somModifiers;
typedef void   SOMLINK somTP_OperationDef__set_somModifiers(OperationDef *somSelf, Environment *ev, 
		_IDL_SEQUENCE_somModifier* somModifiers);
typedef somTP_OperationDef__set_somModifiers *somTD_OperationDef__set_somModifiers;
typedef _IDL_SEQUENCE_Container   SOMLINK somTP_OperationDef_within(OperationDef *somSelf, Environment *ev);
typedef somTP_OperationDef_within *somTD_OperationDef_within;
typedef Contained_Description   SOMLINK somTP_OperationDef_describe(OperationDef *somSelf, Environment *ev);
typedef somTP_OperationDef_describe *somTD_OperationDef_describe;
typedef void   SOMLINK somTP_OperationDef_somFree(OperationDef *somSelf);
typedef somTP_OperationDef_somFree *somTD_OperationDef_somFree;
typedef void   SOMLINK somTP_OperationDef_somDefaultInit(OperationDef *somSelf, 
		som3InitCtrl* ctrl);
typedef somTP_OperationDef_somDefaultInit *somTD_OperationDef_somDefaultInit;
typedef void   SOMLINK somTP_OperationDef_somDestruct(OperationDef *somSelf, 
		octet doFree, 
		som3DestructCtrl* ctrl);
typedef somTP_OperationDef_somDestruct *somTD_OperationDef_somDestruct;
typedef void   SOMLINK somTP_OperationDef_somDumpSelf(OperationDef *somSelf, 
		long level);
typedef somTP_OperationDef_somDumpSelf *somTD_OperationDef_somDumpSelf;
typedef void   SOMLINK somTP_OperationDef_somDumpSelfInt(OperationDef *somSelf, 
		long level);
typedef somTP_OperationDef_somDumpSelfInt *somTD_OperationDef_somDumpSelfInt;
typedef void   SOMLINK somTP_OperationDef_somDefaultCopyInit(OperationDef *somSelf, 
		som3InitCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_OperationDef_somDefaultCopyInit *somTD_OperationDef_somDefaultCopyInit;
typedef OperationDef*   SOMLINK somTP_OperationDef_somDefaultAssign(OperationDef *somSelf, 
		som3AssignCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_OperationDef_somDefaultAssign *somTD_OperationDef_somDefaultAssign;
typedef void   SOMLINK somTP_OperationDef_somDefaultConstCopyInit(OperationDef *somSelf, 
		som3InitCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_OperationDef_somDefaultConstCopyInit *somTD_OperationDef_somDefaultConstCopyInit;
typedef void   SOMLINK somTP_OperationDef_somDefaultVCopyInit(OperationDef *somSelf, 
		som3InitCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_OperationDef_somDefaultVCopyInit *somTD_OperationDef_somDefaultVCopyInit;
typedef void   SOMLINK somTP_OperationDef_somDefaultConstVCopyInit(OperationDef *somSelf, 
		som3InitCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_OperationDef_somDefaultConstVCopyInit *somTD_OperationDef_somDefaultConstVCopyInit;
typedef OperationDef*   SOMLINK somTP_OperationDef_somDefaultConstAssign(OperationDef *somSelf, 
		som3AssignCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_OperationDef_somDefaultConstAssign *somTD_OperationDef_somDefaultConstAssign;
typedef OperationDef*   SOMLINK somTP_OperationDef_somDefaultVAssign(OperationDef *somSelf, 
		som3AssignCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_OperationDef_somDefaultVAssign *somTD_OperationDef_somDefaultVAssign;
typedef OperationDef*   SOMLINK somTP_OperationDef_somDefaultConstVAssign(OperationDef *somSelf, 
		som3AssignCtrl* ctrl, 
		SOMObject* fromObj);
typedef somTP_OperationDef_somDefaultConstVAssign *somTD_OperationDef_somDefaultConstVAssign;
typedef void   SOMLINK somTP_OperationDef_somInit(OperationDef *somSelf);
typedef somTP_OperationDef_somInit *somTD_OperationDef_somInit;
typedef void   SOMLINK somTP_OperationDef_somUninit(OperationDef *somSelf);
typedef somTP_OperationDef_somUninit *somTD_OperationDef_somUninit;
typedef SOMClass*   SOMLINK somTP_OperationDef_somGetClass(OperationDef *somSelf);
typedef somTP_OperationDef_somGetClass *somTD_OperationDef_somGetClass;
typedef string   SOMLINK somTP_OperationDef_somGetClassName(OperationDef *somSelf);
typedef somTP_OperationDef_somGetClassName *somTD_OperationDef_somGetClassName;
typedef long   SOMLINK somTP_OperationDef_somGetSize(OperationDef *somSelf);
typedef somTP_OperationDef_somGetSize *somTD_OperationDef_somGetSize;
typedef boolean   SOMLINK somTP_OperationDef_somIsA(OperationDef *somSelf, 
		SOMClass* aClassObj);
typedef somTP_OperationDef_somIsA *somTD_OperationDef_somIsA;
typedef boolean   SOMLINK somTP_OperationDef_somIsInstanceOf(OperationDef *somSelf, 
		SOMClass* aClassObj);
typedef somTP_OperationDef_somIsInstanceOf *somTD_OperationDef_somIsInstanceOf;
typedef boolean   SOMLINK somTP_OperationDef_somRespondsTo(OperationDef *somSelf, 
		somId mId);
typedef somTP_OperationDef_somRespondsTo *somTD_OperationDef_somRespondsTo;
typedef boolean   SOMLINK somTP_OperationDef_somDispatch(OperationDef *somSelf, 
		somToken* retValue, 
		somId methodId, 
		va_list ap);
typedef somTP_OperationDef_somDispatch *somTD_OperationDef_somDispatch;
typedef boolean   SOMLINK somTP_OperationDef_somClassDispatch(OperationDef *somSelf, 
		SOMClass* clsObj, 
		somToken* retValue, 
		somId methodId, 
		va_list ap);
typedef somTP_OperationDef_somClassDispatch *somTD_OperationDef_somClassDispatch;
typedef boolean   SOMLINK somTP_OperationDef_somCastObj(OperationDef *somSelf, 
		SOMClass* cls);
typedef somTP_OperationDef_somCastObj *somTD_OperationDef_somCastObj;
typedef boolean   SOMLINK somTP_OperationDef_somResetObj(OperationDef *somSelf);
typedef somTP_OperationDef_somResetObj *somTD_OperationDef_somResetObj;
typedef void   SOMLINK somTP_OperationDef_somDispatchV(OperationDef *somSelf, 
		somId methodId, 
		somId descriptor, 
		va_list ap);
typedef somTP_OperationDef_somDispatchV *somTD_OperationDef_somDispatchV;
typedef long   SOMLINK somTP_OperationDef_somDispatchL(OperationDef *somSelf, 
		somId methodId, 
		somId descriptor, 
		va_list ap);
typedef somTP_OperationDef_somDispatchL *somTD_OperationDef_somDispatchL;
typedef void*   SOMLINK somTP_OperationDef_somDispatchA(OperationDef *somSelf, 
		somId methodId, 
		somId descriptor, 
		va_list ap);
typedef somTP_OperationDef_somDispatchA *somTD_OperationDef_somDispatchA;
typedef double   SOMLINK somTP_OperationDef_somDispatchD(OperationDef *somSelf, 
		somId methodId, 
		somId descriptor, 
		va_list ap);
typedef somTP_OperationDef_somDispatchD *somTD_OperationDef_somDispatchD;
typedef SOMObject*   SOMLINK somTP_OperationDef_somPrintSelf(OperationDef *somSelf);
typedef somTP_OperationDef_somPrintSelf *somTD_OperationDef_somPrintSelf;
typedef _IDL_SEQUENCE_Contained   SOMLINK somTP_OperationDef_contents(OperationDef *somSelf, Environment *ev, 
		Container_InterfaceName limit_type, 
		boolean exclude_inherited);
typedef somTP_OperationDef_contents *somTD_OperationDef_contents;
typedef _IDL_SEQUENCE_Contained   SOMLINK somTP_OperationDef_lookup_name(OperationDef *somSelf, Environment *ev, 
		Identifier search_name, 
		long levels_to_search, 
		Container_InterfaceName limit_type, 
		boolean exclude_inherited);
typedef somTP_OperationDef_lookup_name *somTD_OperationDef_lookup_name;
typedef _IDL_SEQUENCE_Container_ContainerDescription   SOMLINK somTP_OperationDef_describe_contents(OperationDef *somSelf, Environment *ev, 
		Container_InterfaceName limit_type, 
		boolean exclude_inherited, 
		long max_returned_objs);
typedef somTP_OperationDef_describe_contents *somTD_OperationDef_describe_contents;
}

#endif /* OperationDef_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 OperationDef
 */
class OperationDef : public Contained, public Container
{
/*
 *  This interface is used to access information associated with
 *  operations defined in an IDL interface.
 * 
 *  See CORBA 1.1, 7.5.6, pp.135-136
 */
public:

// OperationDef::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 (!_OperationDef) OperationDefNewClass(OperationDef_MajorVersion,OperationDef_MinorVersion);
   return (void*)
      SOM_Resolve(_OperationDef,SOMClass,somNewNoInit)
         ((SOMClass *)((void*)_OperationDef));
}

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

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

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

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

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


/* method: _get_result */
TypeCode   _get_result(Environment *ev)
{
/*
 *  The TypeCode of the receiving object.  The memory used to hold
 *  the TypeCode is contained in the receiving object, which retains
 *  ownership.  Hence, do not free the returned TypeCode.  If you want
 *  to obtain a separate copy, use the TypeCode_copy operation.
 */
   return SOM_ResolveD(this,OperationDef,OperationDef,_get_result)
	(this, ev);
}


/* method: _set_result */
void   _set_result(Environment *ev, 
		TypeCode result)
{
/*
 *  The TypeCode of the receiving object.  The memory used to hold
 *  the TypeCode is contained in the receiving object, which retains
 *  ownership.  Hence, do not free the returned TypeCode.  If you want
 *  to obtain a separate copy, use the TypeCode_copy operation.
 */
   SOM_ResolveD(this,OperationDef,OperationDef,_set_result)
	(this, ev,result);
}


/* method: _get_mode */
OperationDef_OperationMode   _get_mode(Environment *ev)
{
/*
 *  The OperationMode of the receiving object;
 */
   return SOM_ResolveD(this,OperationDef,OperationDef,_get_mode)
	(this, ev);
}


/* method: _set_mode */
void   _set_mode(Environment *ev, 
		OperationDef_OperationMode mode)
{
/*
 *  The OperationMode of the receiving object;
 */
   SOM_ResolveD(this,OperationDef,OperationDef,_set_mode)
	(this, ev,mode);
}


/* method: _get_contexts */
_IDL_SEQUENCE_string   _get_contexts(Environment *ev)
{
/*
 *  The list of ContextIdentifiers associated with the
 *  receiving object.
 */
   return SOM_ResolveD(this,OperationDef,OperationDef,_get_contexts)
	(this, ev);
}


/* method: _set_contexts */
void   _set_contexts(Environment *ev, 
		_IDL_SEQUENCE_string* contexts)
{
/*
 *  The list of ContextIdentifiers associated with the
 *  receiving object.
 */
   SOM_ResolveD(this,OperationDef,OperationDef,_set_contexts)
	(this, ev,contexts);
}


/*
 * Reintroduce inherited methods
 */

/* 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_ResolveD(this,OperationDef,Contained,_get_name)
	(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_ResolveD(this,OperationDef,Contained,_set_name)
	(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_ResolveD(this,OperationDef,Contained,_get_id)
	(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_ResolveD(this,OperationDef,Contained,_set_id)
	(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_ResolveD(this,OperationDef,Contained,_get_defined_in)
	(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_ResolveD(this,OperationDef,Contained,_set_defined_in)
	(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_ResolveD(this,OperationDef,Contained,_get_somModifiers)
	(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_ResolveD(this,OperationDef,Contained,_set_somModifiers)
	(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_ResolveD(this,OperationDef,Contained,within)
	(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_ResolveD(this,OperationDef,Contained,describe)
	(this, ev);
}


/* method: somFree */
void   somFree()
{
   SOM_ResolveD(this,OperationDef,SOMObject,somFree)
	(this);
}


/* initializer method: somDefaultInit */
void   somDefaultInit(som3InitCtrl* ctrl)
{
   SOM_ResolveD(this,OperationDef,SOMObject,somDefaultInit)
	(this,ctrl);
}


/* method: somDestruct */
void   somDestruct(octet doFree, 
		som3DestructCtrl* ctrl)
{
   SOM_ResolveD(this,OperationDef,SOMObject,somDestruct)
	(this,doFree,ctrl);
}


/* method: somDumpSelf */
void   somDumpSelf(long level)
{
   SOM_ResolveD(this,OperationDef,SOMObject,somDumpSelf)
	(this,level);
}


/* method: somDumpSelfInt */
void   somDumpSelfInt(long level)
{
   SOM_ResolveD(this,OperationDef,SOMObject,somDumpSelfInt)
	(this,level);
}


/* 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,OperationDef,SOMObject,somDefaultCopyInit)
	(this,ctrl,fromObj);
}


/* method: somDefaultAssign */
OperationDef*  somDefaultAssign(som3AssignCtrl* ctrl, 
		SOMObject* fromObj)
{
/*
 *  A default assignment operator. Use this to "assign" the state of one
 *  object to another.
 */
   return SOM_ResolveD(this,OperationDef,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,OperationDef,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,OperationDef,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,OperationDef,SOMObject,somDefaultConstVCopyInit)
	(this,ctrl,fromObj);
}


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


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


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


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


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


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


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


/* method: somGetSize */
long   somGetSize()
{
/*
 *  Return the size of the receiver.
 */
   return SOM_ResolveD(this,OperationDef,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,OperationDef,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,OperationDef,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,OperationDef,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   OperationDef_somDispatch(somToken* retValue, 
		somId methodId, 
		va_list ap)
{return SOM_ResolveD(this,OperationDef,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,OperationDef,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   OperationDef_somClassDispatch(SOMClass* clsObj, 
		somToken* retValue, 
		somId methodId, 
		va_list ap)
{return SOM_ResolveD(this,OperationDef,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,OperationDef,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,OperationDef,SOMObject,somCastObj)
	(this,cls);
}


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


/* va_list method: somDispatchV */

/*
 *  Obsolete. Use somDispatch instead.
 */
/* the va_list invocation form */
void   OperationDef_somDispatchV(somId methodId, 
		somId descriptor, 
		va_list ap)
{   SOM_ResolveD(this,OperationDef,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,OperationDef,SOMObject,somDispatchV)
	(this,methodId,descriptor,ap);
   va_end(ap);
}


/* va_list method: somDispatchL */

/*
 *  Obsolete. Use somDispatch instead.
 */
/* the va_list invocation form */
long   OperationDef_somDispatchL(somId methodId, 
		somId descriptor, 
		va_list ap)
{return SOM_ResolveD(this,OperationDef,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,OperationDef,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*   OperationDef_somDispatchA(somId methodId, 
		somId descriptor, 
		va_list ap)
{return SOM_ResolveD(this,OperationDef,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,OperationDef,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   OperationDef_somDispatchD(somId methodId, 
		somId descriptor, 
		va_list ap)
{return SOM_ResolveD(this,OperationDef,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,OperationDef,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,OperationDef,SOMObject,somPrintSelf)
	(this);
}


/* 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,OperationDef,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,OperationDef,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,OperationDef,Container,describe_contents)
	(this, ev,limit_type,exclude_inherited,max_returned_objs);
}



};   /* OperationDef */



#endif       /* SOM_OperationDef_xh */
