
/*
 * This file was generated by the SOM Compiler.
 * FileName: containd.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.
 * 
 *   Contained: CORBA Interface for objects contained
 *   in the Interface Repository.  See CORBA 7.5.1 pp. 129-130
 */


#ifndef SOM_Contained_h
#define SOM_Contained_h


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

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

    #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;


#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 ContainedClassData (*resolve_ContainedClassData())
#define ContainedCClassData (*resolve_ContainedCClassData())

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

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

#define Contained_MajorVersion 2
#define Contained_MinorVersion 1

/*
 * External name shortening if required
 */
#ifdef SOM_USE_SHORT_EXTERNAL_NAMES
#define ContainedNewClass c
#define ContainedClassData d
#define ContainedCClassData x
#endif /* SOM_USE_SHORT_EXTERNAL_NAMES */
/*--------------Migration------------*/
#define Contained_classObj ContainedClassData.classObject
#define _Contained Contained_classObj

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

/*
 * Declare the class data structure
 */
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;
}  _ContainedClassData;
SOMEXTERN struct ContainedClassDataStructure * SOMLINK resolve_ContainedClassData(void);

/*
 * Declare the C specific class data structure
 */
SOMEXTERN struct ContainedCClassDataStructure {
	somMethodTabs parentMtab;
	somDToken instanceDataToken;
}  _ContainedCClassData;
SOMEXTERN struct ContainedCClassDataStructure * SOMLINK resolve_ContainedCClassData(void);

/*
 * New and Renew macros for Contained
 */
#define ContainedNew() \
   (_somNew(_Contained ? _Contained : ContainedNewClass(Contained_MajorVersion, Contained_MinorVersion)))
#define ContainedRenew(buf) \
   (_somRenew(_Contained ? _Contained : ContainedNewClass(Contained_MajorVersion, Contained_MinorVersion), buf))

/*
 * Override method: somFree
 */
#define Contained_somFree(somSelf) \
	SOMObject_somFree(somSelf)

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

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

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

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

/*
 * New Method: _get_name
 */
typedef Identifier   (SOMLINK * somTD_Contained__get_name)(Contained *somSelf, Environment *ev);
#define somMD_Contained__get_name "::Contained::name"
#define Contained__get_name(somSelf,ev) \
    (SOM_Resolve(somSelf, Contained, _get_name) \
	(somSelf,ev))
#ifndef SOMGD_get_name
    #if (defined(_get_name) || defined(__get_name))
        #undef _get_name
        #undef __get_name
        #define SOMGD_get_name 1
    #else
        #define __get_name Contained__get_name
    #endif /* __get_name */
#endif /* SOMGD_get_name */

/*
 * New Method: _set_name
 */
typedef void   (SOMLINK * somTD_Contained__set_name)(Contained *somSelf, Environment *ev,
		Identifier name);
#define somMD_Contained__set_name "::Contained::name"
#define Contained__set_name(somSelf,ev,name) \
    (SOM_Resolve(somSelf, Contained, _set_name) \
	(somSelf,ev,name))
#ifndef SOMGD_set_name
    #if (defined(_set_name) || defined(__set_name))
        #undef _set_name
        #undef __set_name
        #define SOMGD_set_name 1
    #else
        #define __set_name Contained__set_name
    #endif /* __set_name */
#endif /* SOMGD_set_name */

/*
 * New Method: _get_id
 */
typedef RepositoryId   (SOMLINK * somTD_Contained__get_id)(Contained *somSelf, Environment *ev);
#define somMD_Contained__get_id "::Contained::id"
#define Contained__get_id(somSelf,ev) \
    (SOM_Resolve(somSelf, Contained, _get_id) \
	(somSelf,ev))
#ifndef SOMGD_get_id
    #if (defined(_get_id) || defined(__get_id))
        #undef _get_id
        #undef __get_id
        #define SOMGD_get_id 1
    #else
        #define __get_id Contained__get_id
    #endif /* __get_id */
#endif /* SOMGD_get_id */

/*
 * New Method: _set_id
 */
typedef void   (SOMLINK * somTD_Contained__set_id)(Contained *somSelf, Environment *ev,
		RepositoryId id);
#define somMD_Contained__set_id "::Contained::id"
#define Contained__set_id(somSelf,ev,id) \
    (SOM_Resolve(somSelf, Contained, _set_id) \
	(somSelf,ev,id))
#ifndef SOMGD_set_id
    #if (defined(_set_id) || defined(__set_id))
        #undef _set_id
        #undef __set_id
        #define SOMGD_set_id 1
    #else
        #define __set_id Contained__set_id
    #endif /* __set_id */
#endif /* SOMGD_set_id */

/*
 * New Method: _get_defined_in
 */
typedef RepositoryId   (SOMLINK * somTD_Contained__get_defined_in)(Contained *somSelf, Environment *ev);
#define somMD_Contained__get_defined_in "::Contained::defined_in"
#define Contained__get_defined_in(somSelf,ev) \
    (SOM_Resolve(somSelf, Contained, _get_defined_in) \
	(somSelf,ev))
#ifndef SOMGD_get_defined_in
    #if (defined(_get_defined_in) || defined(__get_defined_in))
        #undef _get_defined_in
        #undef __get_defined_in
        #define SOMGD_get_defined_in 1
    #else
        #define __get_defined_in Contained__get_defined_in
    #endif /* __get_defined_in */
#endif /* SOMGD_get_defined_in */

/*
 * New Method: _set_defined_in
 */
typedef void   (SOMLINK * somTD_Contained__set_defined_in)(Contained *somSelf, Environment *ev,
		RepositoryId defined_in);
#define somMD_Contained__set_defined_in "::Contained::defined_in"
#define Contained__set_defined_in(somSelf,ev,defined_in) \
    (SOM_Resolve(somSelf, Contained, _set_defined_in) \
	(somSelf,ev,defined_in))
#ifndef SOMGD_set_defined_in
    #if (defined(_set_defined_in) || defined(__set_defined_in))
        #undef _set_defined_in
        #undef __set_defined_in
        #define SOMGD_set_defined_in 1
    #else
        #define __set_defined_in Contained__set_defined_in
    #endif /* __set_defined_in */
#endif /* SOMGD_set_defined_in */

/*
 * New Method: _get_somModifiers
 */
typedef _IDL_SEQUENCE_somModifier   (SOMLINK * somTD_Contained__get_somModifiers)(Contained *somSelf, Environment *ev);
#define somMD_Contained__get_somModifiers "::Contained::somModifiers"
#define Contained__get_somModifiers(somSelf,ev) \
    (SOM_Resolve(somSelf, Contained, _get_somModifiers) \
	(somSelf,ev))
#ifndef SOMGD_get_somModifiers
    #if (defined(_get_somModifiers) || defined(__get_somModifiers))
        #undef _get_somModifiers
        #undef __get_somModifiers
        #define SOMGD_get_somModifiers 1
    #else
        #define __get_somModifiers Contained__get_somModifiers
    #endif /* __get_somModifiers */
#endif /* SOMGD_get_somModifiers */

/*
 * New Method: _set_somModifiers
 */
typedef void   (SOMLINK * somTD_Contained__set_somModifiers)(Contained *somSelf, Environment *ev,
		_IDL_SEQUENCE_somModifier* somModifiers);
#define somMD_Contained__set_somModifiers "::Contained::somModifiers"
#define Contained__set_somModifiers(somSelf,ev,somModifiers) \
    (SOM_Resolve(somSelf, Contained, _set_somModifiers) \
	(somSelf,ev,somModifiers))
#ifndef SOMGD_set_somModifiers
    #if (defined(_set_somModifiers) || defined(__set_somModifiers))
        #undef _set_somModifiers
        #undef __set_somModifiers
        #define SOMGD_set_somModifiers 1
    #else
        #define __set_somModifiers Contained__set_somModifiers
    #endif /* __set_somModifiers */
#endif /* SOMGD_set_somModifiers */

/*
 * New Method: within
 */
typedef _IDL_SEQUENCE_Container   (SOMLINK * somTD_Contained_within)(Contained *somSelf, Environment *ev);
#define somMD_Contained_within "::Contained::within"
#define Contained_within(somSelf,ev) \
    (SOM_Resolve(somSelf, Contained, within) \
	(somSelf,ev))
#ifndef SOMGD_within
    #if (defined(_within) || defined(__within))
        #undef _within
        #undef __within
        #define SOMGD_within 1
    #else
        #define _within Contained_within
    #endif /* _within */
#endif /* SOMGD_within */

/*
 * New Method: describe
 */
typedef Contained_Description   (SOMLINK * somTD_Contained_describe)(Contained *somSelf, Environment *ev);
#define somMD_Contained_describe "::Contained::describe"
#define Contained_describe(somSelf,ev) \
    (SOM_Resolve(somSelf, Contained, describe) \
	(somSelf,ev))
#ifndef SOMGD_describe
    #if (defined(_describe) || defined(__describe))
        #undef _describe
        #undef __describe
        #define SOMGD_describe 1
    #else
        #define _describe Contained_describe
    #endif /* _describe */
#endif /* SOMGD_describe */
#ifndef SOM_DONT_USE_INHERITED_MACROS
#define Contained_somDefaultInit SOMObject_somDefaultInit
#define Contained_somDestruct SOMObject_somDestruct
#define Contained_somDefaultCopyInit SOMObject_somDefaultCopyInit
#define Contained_somDefaultAssign SOMObject_somDefaultAssign
#define Contained_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
#define Contained_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
#define Contained_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
#define Contained_somDefaultConstAssign SOMObject_somDefaultConstAssign
#define Contained_somDefaultVAssign SOMObject_somDefaultVAssign
#define Contained_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
#define Contained_somGetClass SOMObject_somGetClass
#define Contained_somGetClassName SOMObject_somGetClassName
#define Contained_somGetSize SOMObject_somGetSize
#define Contained_somIsA SOMObject_somIsA
#define Contained_somIsInstanceOf SOMObject_somIsInstanceOf
#define Contained_somRespondsTo SOMObject_somRespondsTo
#define Contained_somDispatch SOMObject_somDispatch
#define Contained_somClassDispatch SOMObject_somClassDispatch
#define Contained_somCastObj SOMObject_somCastObj
#define Contained_somResetObj SOMObject_somResetObj
#define Contained_somDispatchV SOMObject_somDispatchV
#define Contained_somDispatchL SOMObject_somDispatchL
#define Contained_somDispatchA SOMObject_somDispatchA
#define Contained_somDispatchD SOMObject_somDispatchD
#define Contained_somPrintSelf SOMObject_somPrintSelf
#endif /* SOM_DONT_USE_INHERITED_MACROS */

#endif       /* SOM_Contained_h */
