
/*
 * This file was generated by the SOM Compiler.
 * FileName: containd.h.
 * Generated using:
 *     SOM Precompiler somipc: 2.29.1.19
 *     SOM Emitter emith.dll: 2.31.1.64
 */

#ifndef SOM_Contained_h
#define SOM_Contained_h


/*
 * The SOM_STRICT_IDL macro means that we can ignore stars
 * in our declarations of objects.
 */
#define SOM_STRICT_IDL 1


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

/*
 * -- 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 the class name as an object type
 */
#ifndef Contained
#define Contained SOMObject
#endif
/*
 *  CORBA 1.1, 7.5.1, p.130
 * 
 *  The Contained interface is the most generic form of interface
 *  for the objects in the SOM CORBA-compliant Interface Repository (IR).
 *  All objects contained in the IR inherit this interface.
 */

/*
 * Include Parent Bindings
 */
#ifndef SOM_SOMObject_h
#ifdef SOMLOCALINCLUDES
#include "somobj.h"
#else
#include <somobj.h>
#endif
#endif

/*
 * Start of bindings for IDL 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 bindings for IDL types.
 */

#define Contained_MajorVersion 2
#define Contained_MinorVersion 3

/*
 * Declare the class creation procedure
 */
SOMEXTERN SOM_IMPORTEXPORT_somir_containd SOMClass  SOMLINK ContainedNewClass(integer4 somtmajorVersion,
		integer4 somtminorVersion);

/*
 * Declare the ABI 2 ClassData 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;
} SOM_IMPORTEXPORT_somir_containd SOMDLINK ContainedClassData;

/*
 * Declare the ABI 2 CClassData structure
 */
SOMEXTERN struct ContainedCClassDataStructure {
	somMethodTabs parentMtab;
	somDToken instanceDataToken;
} SOM_IMPORTEXPORT_somir_containd SOMDLINK ContainedCClassData;

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

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

/*
 * New Method: _get_name
 */
typedef Identifier   SOMLINK somTP_Contained__get_name(Contained somSelf, Environment *ev);
typedef somTP_Contained__get_name *somTD_Contained__get_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.
 */
#define somMD_Contained__get_name "::Contained::_get_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 somTP_Contained__set_name(Contained somSelf, Environment *ev, 
		Identifier name);
typedef somTP_Contained__set_name *somTD_Contained__set_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.
 */
#define somMD_Contained__set_name "::Contained::_set_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 somTP_Contained__get_id(Contained somSelf, Environment *ev);
typedef somTP_Contained__get_id *somTD_Contained__get_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".
 */
#define somMD_Contained__get_id "::Contained::_get_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 somTP_Contained__set_id(Contained somSelf, Environment *ev, 
		RepositoryId id);
typedef somTP_Contained__set_id *somTD_Contained__set_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".
 */
#define somMD_Contained__set_id "::Contained::_set_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 somTP_Contained__get_defined_in(Contained somSelf, Environment *ev);
typedef somTP_Contained__get_defined_in *somTD_Contained__get_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.
 */
#define somMD_Contained__get_defined_in "::Contained::_get_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 somTP_Contained__set_defined_in(Contained somSelf, Environment *ev, 
		RepositoryId defined_in);
typedef somTP_Contained__set_defined_in *somTD_Contained__set_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.
 */
#define somMD_Contained__set_defined_in "::Contained::_set_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 somTP_Contained__get_somModifiers(Contained somSelf, Environment *ev);
typedef somTP_Contained__get_somModifiers *somTD_Contained__get_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.
 */
#define somMD_Contained__get_somModifiers "::Contained::_get_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 somTP_Contained__set_somModifiers(Contained somSelf, Environment *ev, 
		_IDL_SEQUENCE_somModifier* somModifiers);
typedef somTP_Contained__set_somModifiers *somTD_Contained__set_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.
 */
#define somMD_Contained__set_somModifiers "::Contained::_set_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 somTP_Contained_within(Contained somSelf, Environment *ev);
typedef somTP_Contained_within *somTD_Contained_within;
/*
 *  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);
 */
#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 somTP_Contained_describe(Contained somSelf, Environment *ev);
typedef somTP_Contained_describe *somTD_Contained_describe;
/*
 *  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);
 */
#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 */

/*
 * Full Names for Inherited Methods
 */
/* overridden methods */
#define Contained_somDefaultInit SOMObject_somDefaultInit
#define Contained_somDestruct SOMObject_somDestruct
#define Contained_somFree SOMObject_somFree
#define Contained_somDumpSelf SOMObject_somDumpSelf
#define Contained_somDumpSelfInt SOMObject_somDumpSelfInt

#ifndef SOM_DONT_USE_INHERITED_MACROS
#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_somInit SOMObject_somInit
#define Contained_somUninit SOMObject_somUninit
#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_somPrintSelf SOMObject_somPrintSelf
#endif /* SOM_DONT_USE_INHERITED_MACROS */

#endif       /* SOM_Contained_h */
