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

#ifndef SOM_Container_h
#define SOM_Container_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>
    #include <containd.h>


#include <som.h>
#ifndef SOM_IMPORTEXPORT_somir_containr
#ifdef SOM_DLL_somir
	/* export semantics */
	#if defined(SOM_DEFFILE_somir)\
	||(defined(SOM_DEFFILE_BY_DEFAULT)&&!defined(SOM_NODEFFILE_somir))\
	|| !defined(SOM_Module_containr_Source)
	#define SOM_IMPORTEXPORT_somir_containr
	#else
	#define SOM_IMPORTEXPORT_somir_containr SOMDLLEXPORT
	#endif
#else
	#define SOM_IMPORTEXPORT_somir_containr 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 Container
#define Container SOMObject
#endif
/*
 *  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,
 */

/*
 * 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 Contained
    #define Contained SOMObject
#endif /* 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.
 */

#define Container_MajorVersion 2
#define Container_MinorVersion 3

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

/*
 * Declare the ABI 2 ClassData structure
 */
SOMEXTERN struct ContainerClassDataStructure {
	SOMClass classObject;
	somMToken contents;
	somMToken lookup_name;
	somMToken describe_contents;
} SOM_IMPORTEXPORT_somir_containr SOMDLINK ContainerClassData;

/*
 * Declare the ABI 2 CClassData structure
 */
SOMEXTERN struct ContainerCClassDataStructure {
	somMethodTabs parentMtab;
	somDToken instanceDataToken;
} SOM_IMPORTEXPORT_somir_containr SOMDLINK ContainerCClassData;

/*
 * Class Object and Method Token Macros
 */
#define _SOMCLASS_Container (ContainerClassData.classObject)
#ifndef SOMGD_Container
    #if (defined(_Container) || defined(__Container))
        #undef _Container
        #undef __Container
        #define SOMGD_Container 1
    #else
        #define _Container _SOMCLASS_Container
    #endif /* _Container */
#endif /* SOMGD_Container */
#define Container_classObj _SOMCLASS_Container
#define _SOMMTOKEN_Container(method) ((somMToken)ContainerClassData.method)

/*
 * New and Renew macros for Container
 */
#define ContainerNew() \
   ( _Container ? \
	_somNew(_Container) \
	: ( ContainerNewClass(\
		Container_MajorVersion, \
		Container_MinorVersion),\
	   _somNew(_Container)))
#define ContainerRenew(buf) \
   ( _Container ? \
	_somRenew(_Container, buf) \
	: ( ContainerNewClass(\
		Container_MajorVersion, \
		Container_MinorVersion),\
	   _somRenew(_Container, buf)))

/*
 * New Method: contents
 */
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;
/*
 *  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);
 */
#define somMD_Container_contents "::Container::contents"
#define Container_contents(somSelf,ev,limit_type,exclude_inherited) \
    (SOM_Resolve(somSelf, Container, contents) \
	(somSelf,ev,limit_type,exclude_inherited))
#ifndef SOMGD_contents
    #if (defined(_contents) || defined(__contents))
        #undef _contents
        #undef __contents
        #define SOMGD_contents 1
    #else
        #define _contents Container_contents
    #endif /* _contents */
#endif /* SOMGD_contents */

/*
 * New Method: lookup_name
 */
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;
/*
 *  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);
 */
#define somMD_Container_lookup_name "::Container::lookup_name"
#define Container_lookup_name(somSelf,ev,search_name,levels_to_search,limit_type,exclude_inherited) \
    (SOM_Resolve(somSelf, Container, lookup_name) \
	(somSelf,ev,search_name,levels_to_search,limit_type,exclude_inherited))
#ifndef SOMGD_lookup_name
    #if (defined(_lookup_name) || defined(__lookup_name))
        #undef _lookup_name
        #undef __lookup_name
        #define SOMGD_lookup_name 1
    #else
        #define _lookup_name Container_lookup_name
    #endif /* _lookup_name */
#endif /* SOMGD_lookup_name */

/*
 * New Method: describe_contents
 */
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;
/*
 *  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 !
 */
#define somMD_Container_describe_contents "::Container::describe_contents"
#define Container_describe_contents(somSelf,ev,limit_type,exclude_inherited,max_returned_objs) \
    (SOM_Resolve(somSelf, Container, describe_contents) \
	(somSelf,ev,limit_type,exclude_inherited,max_returned_objs))
#ifndef SOMGD_describe_contents
    #if (defined(_describe_contents) || defined(__describe_contents))
        #undef _describe_contents
        #undef __describe_contents
        #define SOMGD_describe_contents 1
    #else
        #define _describe_contents Container_describe_contents
    #endif /* _describe_contents */
#endif /* SOMGD_describe_contents */

/*
 * Full Names for Inherited Methods
 */
/* overridden methods */
#define Container_somDefaultInit SOMObject_somDefaultInit
#define Container_somDestruct SOMObject_somDestruct
#define Container_somDumpSelf SOMObject_somDumpSelf
#define Container_somDumpSelfInt SOMObject_somDumpSelfInt

#ifndef SOM_DONT_USE_INHERITED_MACROS
#define Container_somDefaultCopyInit SOMObject_somDefaultCopyInit
#define Container_somDefaultAssign SOMObject_somDefaultAssign
#define Container_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
#define Container_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
#define Container_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
#define Container_somDefaultConstAssign SOMObject_somDefaultConstAssign
#define Container_somDefaultVAssign SOMObject_somDefaultVAssign
#define Container_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
#define Container_somInit SOMObject_somInit
#define Container_somUninit SOMObject_somUninit
#define Container_somFree SOMObject_somFree
#define Container_somGetClass SOMObject_somGetClass
#define Container_somGetClassName SOMObject_somGetClassName
#define Container_somGetSize SOMObject_somGetSize
#define Container_somIsA SOMObject_somIsA
#define Container_somIsInstanceOf SOMObject_somIsInstanceOf
#define Container_somRespondsTo SOMObject_somRespondsTo
#define Container_somDispatch SOMObject_somDispatch
#define Container_somClassDispatch SOMObject_somClassDispatch
#define Container_somCastObj SOMObject_somCastObj
#define Container_somResetObj SOMObject_somResetObj
#define Container_somPrintSelf SOMObject_somPrintSelf
#endif /* SOM_DONT_USE_INHERITED_MACROS */

#endif       /* SOM_Container_h */
