home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
tolkit45.zip
/
os2tk45
/
som
/
include
/
containr.h
< prev
next >
Wrap
C/C++ Source or Header
|
1999-02-22
|
13KB
|
367 lines
/*
* This file was generated by the SOM Compiler.
* FileName: containr.h.
* Generated using:
* SOM Precompiler somipc: 2.29.1.17
* SOM Emitter emith: 2.47
*/
#ifndef SOM_Container_h
#define SOM_Container_h
/*
* Passthru lines: File: "C.h", "before"
*/
#include <somtcnst.h>
#include <stdio.h>
#include <somir.h>
#include <containd.h>
#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 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 <somobj.h>
/*
* 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
/*
* External name shortening if required
*/
#ifdef SOM_USE_SHORT_EXTERNAL_NAMES
#define ContainerNewClass c
#pragma linkage(c, system)
#define ContainerClassData d
#define ContainerCClassData x
#endif /* SOM_USE_SHORT_EXTERNAL_NAMES */
/*--------------Migration------------*/
#define Container_classObj ContainerClassData.classObject
#define _Container Container_classObj
/*
* Declare the class creation procedure
*/
SOMEXTERN SOMClass * SOMLINK ContainerNewClass(integer4 somtmajorVersion,
integer4 somtminorVersion);
#pragma linkage(ContainerNewClass, system)
/*
* Declare the class data structure
*/
SOMEXTERN struct ContainerClassDataStructure {
SOMClass *classObject;
somMToken contents;
somMToken lookup_name;
somMToken describe_contents;
} SOMDLINK ContainerClassData;
/*
* Declare the C specific class data structure
*/
SOMEXTERN struct ContainerCClassDataStructure {
somMethodTabs parentMtab;
somDToken instanceDataToken;
} SOMDLINK ContainerCClassData;
/*
* 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)))
/*
* Override method: somDefaultInit
*/
#define Container_somDefaultInit(somSelf,ctrl) \
SOMObject_somDefaultInit(somSelf,ctrl)
/*
* Override method: somDestruct
*/
#define Container_somDestruct(somSelf,doFree,ctrl) \
SOMObject_somDestruct(somSelf,doFree,ctrl)
/*
* Override method: somDumpSelf
*/
#define Container_somDumpSelf(somSelf,level) \
SOMObject_somDumpSelf(somSelf,level)
/*
* Override method: somDumpSelfInt
*/
#define Container_somDumpSelfInt(somSelf,level) \
SOMObject_somDumpSelfInt(somSelf,level)
/*
* New Method: contents
*/
typedef _IDL_SEQUENCE_Contained SOMLINK somTP_Container_contents(Container *somSelf, Environment *ev,
Container_InterfaceName limit_type,
boolean exclude_inherited);
#pragma linkage(somTP_Container_contents, system)
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);
#pragma linkage(somTP_Container_lookup_name, system)
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);
#pragma linkage(somTP_Container_describe_contents, system)
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 */
#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_somFree SOMObject_somFree
#define Container_somUninit SOMObject_somUninit
#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_somDispatchV SOMObject_somDispatchV
#define Container_somDispatchL SOMObject_somDispatchL
#define Container_somDispatchA SOMObject_somDispatchA
#define Container_somDispatchD SOMObject_somDispatchD
#define Container_somPrintSelf SOMObject_somPrintSelf
#endif /* SOM_DONT_USE_INHERITED_MACROS */
#endif /* SOM_Container_h */