home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / warptlk3.zip / TOOLKIT / SOM / INCLUDE / CONTAINR.H < prev    next >
C/C++ Source or Header  |  1995-08-30  |  10KB  |  305 lines

  1.  
  2. /*
  3.  * This file was generated by the SOM Compiler.
  4.  * FileName: containr.h.
  5.  * Generated using:
  6.  *     SOM Precompiler somipc: 2.29.1.2
  7.  *     SOM Emitter emith: 2.41
  8.  */
  9.  
  10. /*
  11.  * 
  12.  *    COMPONENT_NAME: somi
  13.  * 
  14.  *    ORIGINS: 27
  15.  * 
  16.  * 
  17.  *    10H9767, 10H9769  (C) COPYRIGHT International Business Machines Corp. 1992,1994
  18.  *    All Rights Reserved
  19.  *    Licensed Materials - Property of IBM
  20.  *    US Government Users Restricted Rights - Use, duplication or
  21.  *    disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  22.  * 
  23.  *   Container: CORBA Interface for container objects
  24.  */
  25.  
  26.  
  27. #ifndef SOM_Container_h
  28. #define SOM_Container_h
  29.  
  30.  
  31. /*
  32.  * Passthru lines: File: "C.h", "before"
  33.  */
  34.  
  35.     #include <somtcnst.h>
  36.     #include <stdio.h>
  37.     #include <somir.h>
  38.     #include <containd.h>
  39.  
  40.  
  41. #include <som.h>
  42.  
  43. /*
  44.  * -- This emitter treats Method Tokens as Thunks by default.
  45.  * -- Use the sc modifier "nothunks" to change this default
  46.  */
  47. #undef somresolve_
  48. #define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
  49.  
  50. /*
  51.  * Define the class name as an object type
  52.  */
  53. #ifndef Container
  54. #define Container SOMObject
  55. #endif
  56. #include <somobj.h>
  57.  
  58. /*
  59.  * Start of user-defined types:
  60.  */
  61. #ifndef SOMClass
  62.     #define SOMClass SOMObject
  63. #endif /* SOMClass */
  64. #ifndef Contained
  65.     #define Contained SOMObject
  66. #endif /* Contained */
  67. typedef
  68. string  Container_InterfaceName;
  69.  
  70. /*
  71.  * 
  72.  *  Valid values for InterfaceName are limited to the following set:
  73.  *      {"AttributeDef", "ConstantDef", "ExceptionDef", "InterfaceDef",
  74.  *       "ModuleDef", "ParameterDef", "OperationDef", "TypeDef", "all"}
  75.  */
  76. typedef
  77. struct Container_ContainerDescription {
  78. Contained* contained_object;
  79. Identifier name;
  80. any  value;
  81. } Container_ContainerDescription;
  82. #ifndef _IDL_SEQUENCE_Contained_defined
  83. #define _IDL_SEQUENCE_Contained_defined
  84. typedef struct {
  85.     unsigned long _maximum;
  86.     unsigned long _length;
  87.     Contained **_buffer;
  88. } _IDL_SEQUENCE_Contained;
  89. #endif /* _IDL_SEQUENCE_Contained_defined */ 
  90. struct Container_ContainerDescription;
  91. #ifndef _IDL_SEQUENCE_Container_ContainerDescription_defined
  92. #define _IDL_SEQUENCE_Container_ContainerDescription_defined
  93. typedef struct {
  94.     unsigned long _maximum;
  95.     unsigned long _length;
  96.     struct Container_ContainerDescription *_buffer;
  97. } _IDL_SEQUENCE_Container_ContainerDescription;
  98. #endif /* _IDL_SEQUENCE_Container_ContainerDescription_defined */ 
  99.  
  100. #ifndef SOM_DONT_USE_SHORT_NAMES
  101. #ifndef SOMTGD_InterfaceName
  102.     #ifdef InterfaceName
  103.         #undef InterfaceName
  104.         #define SOMTGD_InterfaceName 1
  105.     #else
  106.         #define InterfaceName Container_InterfaceName
  107.     #endif /* InterfaceName */
  108. #endif /* SOMTGD_InterfaceName */
  109. #endif /* SOM_DONT_USE_SHORT_NAMES */
  110.  
  111. #ifndef SOM_DONT_USE_SHORT_NAMES
  112. #ifndef SOMTGD_ContainerDescription
  113.     #ifdef ContainerDescription
  114.         #undef ContainerDescription
  115.         #define SOMTGD_ContainerDescription 1
  116.     #else
  117.         #define ContainerDescription Container_ContainerDescription
  118.     #endif /* ContainerDescription */
  119. #endif /* SOMTGD_ContainerDescription */
  120. #ifndef SOMTGD__IDL_SEQUENCE_ContainerDescription
  121.     #ifdef _IDL_SEQUENCE_ContainerDescription
  122.         #undef _IDL_SEQUENCE_ContainerDescription
  123.         #define SOMTGD__IDL_SEQUENCE_ContainerDescription 1
  124.     #else
  125.         #define _IDL_SEQUENCE_ContainerDescription _IDL_SEQUENCE_Container_ContainerDescription
  126.     #endif /* _IDL_SEQUENCE_ContainerDescription */
  127. #endif /* SOMTGD__IDL_SEQUENCE_ContainerDescription */
  128. #endif /* SOM_DONT_USE_SHORT_NAMES */
  129.  
  130. /*
  131.  * End of user-defined types.
  132.  */
  133.  
  134. #define Container_MajorVersion 2
  135. #define Container_MinorVersion 1
  136.  
  137. /*
  138.  * External name shortening if required
  139.  */
  140. #ifdef SOM_USE_SHORT_EXTERNAL_NAMES
  141. #define ContainerNewClass c
  142. #pragma linkage(c, system)
  143. #define ContainerClassData d
  144. #define ContainerCClassData x
  145. #endif /* SOM_USE_SHORT_EXTERNAL_NAMES */
  146. /*--------------Migration------------*/
  147. #define Container_classObj ContainerClassData.classObject
  148. #define _Container Container_classObj
  149.  
  150. /*
  151.  * Declare the class creation procedure
  152.  */
  153. SOMEXTERN SOMClass * SOMLINK ContainerNewClass(integer4 somtmajorVersion,
  154.         integer4 somtminorVersion);
  155. #pragma linkage(ContainerNewClass, system)
  156.  
  157. /*
  158.  * Declare the class data structure
  159.  */
  160. SOMEXTERN struct ContainerClassDataStructure {
  161.     SOMClass *classObject;
  162.     somMToken contents;
  163.     somMToken lookup_name;
  164.     somMToken describe_contents;
  165. } SOMDLINK ContainerClassData;
  166.  
  167. /*
  168.  * Declare the C specific class data structure
  169.  */
  170. SOMEXTERN struct ContainerCClassDataStructure {
  171.     somMethodTabs parentMtab;
  172.     somDToken instanceDataToken;
  173. } SOMDLINK ContainerCClassData;
  174.  
  175. /*
  176.  * New and Renew macros for Container
  177.  */
  178. #define ContainerNew() \
  179.    (_somNew(_Container ? _Container : ContainerNewClass(Container_MajorVersion, Container_MinorVersion)))
  180. #define ContainerRenew(buf) \
  181.    (_somRenew(_Container ? _Container : ContainerNewClass(Container_MajorVersion, Container_MinorVersion), buf))
  182.  
  183. /*
  184.  * Override method: somInit
  185.  */
  186. #define Container_somInit(somSelf) \
  187.     SOMObject_somInit(somSelf)
  188.  
  189. /*
  190.  * Override method: somUninit
  191.  */
  192. #define Container_somUninit(somSelf) \
  193.     SOMObject_somUninit(somSelf)
  194.  
  195. /*
  196.  * Override method: somDumpSelf
  197.  */
  198. #define Container_somDumpSelf(somSelf,level) \
  199.     SOMObject_somDumpSelf(somSelf,level)
  200.  
  201. /*
  202.  * Override method: somDumpSelfInt
  203.  */
  204. #define Container_somDumpSelfInt(somSelf,level) \
  205.     SOMObject_somDumpSelfInt(somSelf,level)
  206.  
  207. /*
  208.  * New Method: contents
  209.  */
  210. typedef _IDL_SEQUENCE_Contained   SOMLINK somTP_Container_contents(Container *somSelf, Environment *ev,
  211.         Container_InterfaceName limit_type,
  212.         boolean exclude_inherited);
  213. #pragma linkage(somTP_Container_contents, system)
  214. typedef somTP_Container_contents *somTD_Container_contents;
  215. #define somMD_Container_contents "::Container::contents"
  216. #define Container_contents(somSelf,ev,limit_type,exclude_inherited) \
  217.     (SOM_Resolve(somSelf, Container, contents) \
  218.     (somSelf,ev,limit_type,exclude_inherited))
  219. #ifndef SOMGD_contents
  220.     #if (defined(_contents) || defined(__contents))
  221.         #undef _contents
  222.         #undef __contents
  223.         #define SOMGD_contents 1
  224.     #else
  225.         #define _contents Container_contents
  226.     #endif /* _contents */
  227. #endif /* SOMGD_contents */
  228.  
  229. /*
  230.  * New Method: lookup_name
  231.  */
  232. typedef _IDL_SEQUENCE_Contained   SOMLINK somTP_Container_lookup_name(Container *somSelf, Environment *ev,
  233.         Identifier search_name,
  234.         long levels_to_search,
  235.         Container_InterfaceName limit_type,
  236.         boolean exclude_inherited);
  237. #pragma linkage(somTP_Container_lookup_name, system)
  238. typedef somTP_Container_lookup_name *somTD_Container_lookup_name;
  239. #define somMD_Container_lookup_name "::Container::lookup_name"
  240. #define Container_lookup_name(somSelf,ev,search_name,levels_to_search,limit_type,exclude_inherited) \
  241.     (SOM_Resolve(somSelf, Container, lookup_name) \
  242.     (somSelf,ev,search_name,levels_to_search,limit_type,exclude_inherited))
  243. #ifndef SOMGD_lookup_name
  244.     #if (defined(_lookup_name) || defined(__lookup_name))
  245.         #undef _lookup_name
  246.         #undef __lookup_name
  247.         #define SOMGD_lookup_name 1
  248.     #else
  249.         #define _lookup_name Container_lookup_name
  250.     #endif /* _lookup_name */
  251. #endif /* SOMGD_lookup_name */
  252.  
  253. /*
  254.  * New Method: describe_contents
  255.  */
  256. typedef _IDL_SEQUENCE_Container_ContainerDescription   SOMLINK somTP_Container_describe_contents(Container *somSelf, Environment *ev,
  257.         Container_InterfaceName limit_type,
  258.         boolean exclude_inherited,
  259.         long max_returned_objs);
  260. #pragma linkage(somTP_Container_describe_contents, system)
  261. typedef somTP_Container_describe_contents *somTD_Container_describe_contents;
  262. #define somMD_Container_describe_contents "::Container::describe_contents"
  263. #define Container_describe_contents(somSelf,ev,limit_type,exclude_inherited,max_returned_objs) \
  264.     (SOM_Resolve(somSelf, Container, describe_contents) \
  265.     (somSelf,ev,limit_type,exclude_inherited,max_returned_objs))
  266. #ifndef SOMGD_describe_contents
  267.     #if (defined(_describe_contents) || defined(__describe_contents))
  268.         #undef _describe_contents
  269.         #undef __describe_contents
  270.         #define SOMGD_describe_contents 1
  271.     #else
  272.         #define _describe_contents Container_describe_contents
  273.     #endif /* _describe_contents */
  274. #endif /* SOMGD_describe_contents */
  275. #ifndef SOM_DONT_USE_INHERITED_MACROS
  276. #define Container_somDefaultInit SOMObject_somDefaultInit
  277. #define Container_somDestruct SOMObject_somDestruct
  278. #define Container_somDefaultCopyInit SOMObject_somDefaultCopyInit
  279. #define Container_somDefaultAssign SOMObject_somDefaultAssign
  280. #define Container_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
  281. #define Container_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
  282. #define Container_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
  283. #define Container_somDefaultConstAssign SOMObject_somDefaultConstAssign
  284. #define Container_somDefaultVAssign SOMObject_somDefaultVAssign
  285. #define Container_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
  286. #define Container_somFree SOMObject_somFree
  287. #define Container_somGetClass SOMObject_somGetClass
  288. #define Container_somGetClassName SOMObject_somGetClassName
  289. #define Container_somGetSize SOMObject_somGetSize
  290. #define Container_somIsA SOMObject_somIsA
  291. #define Container_somIsInstanceOf SOMObject_somIsInstanceOf
  292. #define Container_somRespondsTo SOMObject_somRespondsTo
  293. #define Container_somDispatch SOMObject_somDispatch
  294. #define Container_somClassDispatch SOMObject_somClassDispatch
  295. #define Container_somCastObj SOMObject_somCastObj
  296. #define Container_somResetObj SOMObject_somResetObj
  297. #define Container_somDispatchV SOMObject_somDispatchV
  298. #define Container_somDispatchL SOMObject_somDispatchL
  299. #define Container_somDispatchA SOMObject_somDispatchA
  300. #define Container_somDispatchD SOMObject_somDispatchD
  301. #define Container_somPrintSelf SOMObject_somPrintSelf
  302. #endif /* SOM_DONT_USE_INHERITED_MACROS */
  303.  
  304. #endif       /* SOM_Container_h */
  305.