
/*
 * This file was generated by the SOM Compiler.
 * FileName: operatdf.h.
 * Generated using:
 *     SOM Precompiler somipc: 2.29.1.3
 *     SOM Emitter emith.dll: 2.41
 */

/*
 * 
 *    COMPONENT_NAME: somi
 * 
 *    ORIGINS: 27
 * 
 * 
 *    10H9767, 10H9769  (C) COPYRIGHT International Business Machines Corp. 1992,1994
 *    All Rights Reserved
 *    Licensed Materials - Property of IBM
 *    US Government Users Restricted Rights - Use, duplication or
 *    disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
 * 
 *   OperationDef: CORBA Interface for operation definitions
 *   See CORBA 7.5.6, pp.135-136
 */


#ifndef SOM_OperationDef_h
#define SOM_OperationDef_h


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

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

    #define ContextIdentifier string
    #define _IDL_SEQUENCE_ContextIdentifier _IDL_SEQUENCE_string


#include <som.h>

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



/*
 * Define class data structures as resolution macros
 */
#define OperationDefClassData (*resolve_OperationDefClassData())
#define OperationDefCClassData (*resolve_OperationDefCClassData())

/*
 * Define the class name as an object type
 */
#ifndef OperationDef
#define OperationDef SOMObject
#endif
#include <containd.h>
#include <containr.h>

/*
 * Start of user-defined types:
 */
#ifndef SOMClass
    #define SOMClass SOMObject
#endif /* SOMClass */
#ifndef Container
    #define Container SOMObject
#endif /* 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 user-defined types.
 */

#define OperationDef_MajorVersion 2
#define OperationDef_MinorVersion 1

/*
 * External name shortening if required
 */
#ifdef SOM_USE_SHORT_EXTERNAL_NAMES
#define OperationDefNewClass c
#define OperationDefClassData d
#define OperationDefCClassData x
#endif /* SOM_USE_SHORT_EXTERNAL_NAMES */
/*--------------Migration------------*/
#define OperationDef_classObj OperationDefClassData.classObject
#define _OperationDef OperationDef_classObj

/*
 * Declare the class creation procedure
 */
SOMEXTERN SOMClass * SOMLINK OperationDefNewClass(integer4 somntmajorVersion,
		integer4 somntminorVersion);

/*
 * Declare the class data structure
 */
SOMEXTERN struct OperationDefClassDataStructure {
	SOMClass *classObject;
	somMToken _get_result;
	somMToken _set_result;
	somMToken _get_mode;
	somMToken _set_mode;
	somMToken _get_contexts;
	somMToken _set_contexts;
}  _OperationDefClassData;
SOMEXTERN struct OperationDefClassDataStructure * SOMLINK resolve_OperationDefClassData(void);

/*
 * Declare the C specific class data structure
 */
SOMEXTERN struct OperationDefCClassDataStructure {
	somMethodTabs parentMtab;
	somDToken instanceDataToken;
}  _OperationDefCClassData;
SOMEXTERN struct OperationDefCClassDataStructure * SOMLINK resolve_OperationDefCClassData(void);

/*
 * New and Renew macros for OperationDef
 */
#define OperationDefNew() \
   (_somNew(_OperationDef ? _OperationDef : OperationDefNewClass(OperationDef_MajorVersion, OperationDef_MinorVersion)))
#define OperationDefRenew(buf) \
   (_somRenew(_OperationDef ? _OperationDef : OperationDefNewClass(OperationDef_MajorVersion, OperationDef_MinorVersion), buf))

/*
 * Override method: somInit
 */
#define OperationDef_somInit(somSelf) \
	SOMObject_somInit(somSelf)

/*
 * Override method: somUninit
 */
#define OperationDef_somUninit(somSelf) \
	SOMObject_somUninit(somSelf)

/*
 * Override method: somDumpSelf
 */
#define OperationDef_somDumpSelf(somSelf,level) \
	SOMObject_somDumpSelf(somSelf,level)

/*
 * Override method: somDumpSelfInt
 */
#define OperationDef_somDumpSelfInt(somSelf,level) \
	SOMObject_somDumpSelfInt(somSelf,level)

/*
 * Override method: describe
 */
#define OperationDef_describe(somSelf,ev) \
	Contained_describe(somSelf,ev)

/*
 * New Method: _get_result
 */
typedef TypeCode   (SOMLINK * somTD_OperationDef__get_result)(OperationDef *somSelf, Environment *ev);
#define somMD_OperationDef__get_result "::OperationDef::result"
#define OperationDef__get_result(somSelf,ev) \
    (SOM_Resolve(somSelf, OperationDef, _get_result) \
	(somSelf,ev))
#ifndef SOMGD_get_result
    #if (defined(_get_result) || defined(__get_result))
        #undef _get_result
        #undef __get_result
        #define SOMGD_get_result 1
    #else
        #define __get_result OperationDef__get_result
    #endif /* __get_result */
#endif /* SOMGD_get_result */

/*
 * New Method: _set_result
 */
typedef void   (SOMLINK * somTD_OperationDef__set_result)(OperationDef *somSelf, Environment *ev,
		TypeCode result);
#define somMD_OperationDef__set_result "::OperationDef::result"
#define OperationDef__set_result(somSelf,ev,result) \
    (SOM_Resolve(somSelf, OperationDef, _set_result) \
	(somSelf,ev,result))
#ifndef SOMGD_set_result
    #if (defined(_set_result) || defined(__set_result))
        #undef _set_result
        #undef __set_result
        #define SOMGD_set_result 1
    #else
        #define __set_result OperationDef__set_result
    #endif /* __set_result */
#endif /* SOMGD_set_result */

/*
 * New Method: _get_mode
 */
typedef OperationDef_OperationMode   (SOMLINK * somTD_OperationDef__get_mode)(OperationDef *somSelf, Environment *ev);
#define somMD_OperationDef__get_mode "::OperationDef::mode"
#define OperationDef__get_mode(somSelf,ev) \
    (SOM_Resolve(somSelf, OperationDef, _get_mode) \
	(somSelf,ev))
#ifndef SOMGD_get_mode
    #if (defined(_get_mode) || defined(__get_mode))
        #undef _get_mode
        #undef __get_mode
        #define SOMGD_get_mode 1
    #else
        #define __get_mode OperationDef__get_mode
    #endif /* __get_mode */
#endif /* SOMGD_get_mode */

/*
 * New Method: _set_mode
 */
typedef void   (SOMLINK * somTD_OperationDef__set_mode)(OperationDef *somSelf, Environment *ev,
		OperationDef_OperationMode mode);
#define somMD_OperationDef__set_mode "::OperationDef::mode"
#define OperationDef__set_mode(somSelf,ev,mode) \
    (SOM_Resolve(somSelf, OperationDef, _set_mode) \
	(somSelf,ev,mode))
#ifndef SOMGD_set_mode
    #if (defined(_set_mode) || defined(__set_mode))
        #undef _set_mode
        #undef __set_mode
        #define SOMGD_set_mode 1
    #else
        #define __set_mode OperationDef__set_mode
    #endif /* __set_mode */
#endif /* SOMGD_set_mode */

/*
 * New Method: _get_contexts
 */
typedef _IDL_SEQUENCE_string   (SOMLINK * somTD_OperationDef__get_contexts)(OperationDef *somSelf, Environment *ev);
#define somMD_OperationDef__get_contexts "::OperationDef::contexts"
#define OperationDef__get_contexts(somSelf,ev) \
    (SOM_Resolve(somSelf, OperationDef, _get_contexts) \
	(somSelf,ev))
#ifndef SOMGD_get_contexts
    #if (defined(_get_contexts) || defined(__get_contexts))
        #undef _get_contexts
        #undef __get_contexts
        #define SOMGD_get_contexts 1
    #else
        #define __get_contexts OperationDef__get_contexts
    #endif /* __get_contexts */
#endif /* SOMGD_get_contexts */

/*
 * New Method: _set_contexts
 */
typedef void   (SOMLINK * somTD_OperationDef__set_contexts)(OperationDef *somSelf, Environment *ev,
		_IDL_SEQUENCE_string* contexts);
#define somMD_OperationDef__set_contexts "::OperationDef::contexts"
#define OperationDef__set_contexts(somSelf,ev,contexts) \
    (SOM_Resolve(somSelf, OperationDef, _set_contexts) \
	(somSelf,ev,contexts))
#ifndef SOMGD_set_contexts
    #if (defined(_set_contexts) || defined(__set_contexts))
        #undef _set_contexts
        #undef __set_contexts
        #define SOMGD_set_contexts 1
    #else
        #define __set_contexts OperationDef__set_contexts
    #endif /* __set_contexts */
#endif /* SOMGD_set_contexts */
#ifndef SOM_DONT_USE_INHERITED_MACROS
#define OperationDef__get_name Contained__get_name
#define OperationDef__set_name Contained__set_name
#define OperationDef__get_id Contained__get_id
#define OperationDef__set_id Contained__set_id
#define OperationDef__get_defined_in Contained__get_defined_in
#define OperationDef__set_defined_in Contained__set_defined_in
#define OperationDef__get_somModifiers Contained__get_somModifiers
#define OperationDef__set_somModifiers Contained__set_somModifiers
#define OperationDef_within Contained_within
#define OperationDef_somDefaultInit SOMObject_somDefaultInit
#define OperationDef_somDestruct SOMObject_somDestruct
#define OperationDef_somDefaultCopyInit SOMObject_somDefaultCopyInit
#define OperationDef_somDefaultAssign SOMObject_somDefaultAssign
#define OperationDef_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
#define OperationDef_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
#define OperationDef_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
#define OperationDef_somDefaultConstAssign SOMObject_somDefaultConstAssign
#define OperationDef_somDefaultVAssign SOMObject_somDefaultVAssign
#define OperationDef_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
#define OperationDef_somFree SOMObject_somFree
#define OperationDef_somGetClass SOMObject_somGetClass
#define OperationDef_somGetClassName SOMObject_somGetClassName
#define OperationDef_somGetSize SOMObject_somGetSize
#define OperationDef_somIsA SOMObject_somIsA
#define OperationDef_somIsInstanceOf SOMObject_somIsInstanceOf
#define OperationDef_somRespondsTo SOMObject_somRespondsTo
#define OperationDef_somDispatch SOMObject_somDispatch
#define OperationDef_somClassDispatch SOMObject_somClassDispatch
#define OperationDef_somCastObj SOMObject_somCastObj
#define OperationDef_somResetObj SOMObject_somResetObj
#define OperationDef_somDispatchV SOMObject_somDispatchV
#define OperationDef_somDispatchL SOMObject_somDispatchL
#define OperationDef_somDispatchA SOMObject_somDispatchA
#define OperationDef_somDispatchD SOMObject_somDispatchD
#define OperationDef_somPrintSelf SOMObject_somPrintSelf
#define OperationDef_contents Container_contents
#define OperationDef_lookup_name Container_lookup_name
#define OperationDef_describe_contents Container_describe_contents
#define OperationDef_somDefaultInit SOMObject_somDefaultInit
#define OperationDef_somDestruct SOMObject_somDestruct
#define OperationDef_somDefaultCopyInit SOMObject_somDefaultCopyInit
#define OperationDef_somDefaultAssign SOMObject_somDefaultAssign
#define OperationDef_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
#define OperationDef_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
#define OperationDef_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
#define OperationDef_somDefaultConstAssign SOMObject_somDefaultConstAssign
#define OperationDef_somDefaultVAssign SOMObject_somDefaultVAssign
#define OperationDef_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
#define OperationDef_somFree SOMObject_somFree
#define OperationDef_somGetClass SOMObject_somGetClass
#define OperationDef_somGetClassName SOMObject_somGetClassName
#define OperationDef_somGetSize SOMObject_somGetSize
#define OperationDef_somIsA SOMObject_somIsA
#define OperationDef_somIsInstanceOf SOMObject_somIsInstanceOf
#define OperationDef_somRespondsTo SOMObject_somRespondsTo
#define OperationDef_somDispatch SOMObject_somDispatch
#define OperationDef_somClassDispatch SOMObject_somClassDispatch
#define OperationDef_somCastObj SOMObject_somCastObj
#define OperationDef_somResetObj SOMObject_somResetObj
#define OperationDef_somDispatchV SOMObject_somDispatchV
#define OperationDef_somDispatchL SOMObject_somDispatchL
#define OperationDef_somDispatchA SOMObject_somDispatchA
#define OperationDef_somDispatchD SOMObject_somDispatchD
#define OperationDef_somPrintSelf SOMObject_somPrintSelf
#endif /* SOM_DONT_USE_INHERITED_MACROS */

#endif       /* SOM_OperationDef_h */
