home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / trialva / ibmcppw / include / containr.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-02-22  |  10.1 KB  |  310 lines

  1.  
  2. /*
  3.  * This file was generated by the SOM Compiler.
  4.  * FileName: h:\somnt\include\containr.h.
  5.  * Generated using:
  6.  *     SOM Precompiler somipc: Development
  7.  *     SOM Emitter emith.dll: Development
  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. #define ContainerClassData d
  143. #define ContainerCClassData x
  144. #endif /* SOM_USE_SHORT_EXTERNAL_NAMES */
  145. /*--------------Migration------------*/
  146. #define Container_classObj ContainerClassData.classObject
  147. #define _Container Container_classObj
  148.  
  149. /*
  150.  * Declare the class creation procedure
  151.  */
  152. SOMEXTERN
  153. #if (defined(SOM_Module_containr_Source) || defined(Container_Class_Source) || defined (SOM_DONT_IMPORT_CLASS_Container))
  154. WIN32_DLLEXPORT
  155. #else
  156. WIN32_DLLIMPORT
  157. #endif
  158. SOMClass * SOMLINK ContainerNewClass(integer4 somntmajorVersion,
  159.         integer4 somntminorVersion);
  160.  
  161. /*
  162.  * Declare the class data structure
  163.  */
  164. SOMEXTERN struct ContainerClassDataStructure {
  165.     SOMClass *classObject;
  166.     somMToken contents;
  167.     somMToken lookup_name;
  168.     somMToken describe_contents;
  169. #if (defined(SOM_Module_containr_Source) || defined(Container_Class_Source) || defined (SOM_DONT_IMPORT_CLASS_Container))
  170. } WIN32_DLLEXPORT SOMDLINK ContainerClassData;
  171. #else
  172. } WIN32_DLLIMPORT SOMDLINK ContainerClassData;
  173. #endif
  174.  
  175. /*
  176.  * Declare the C specific class data structure
  177.  */
  178. SOMEXTERN struct ContainerCClassDataStructure {
  179.     somMethodTabs parentMtab;
  180.     somDToken instanceDataToken;
  181. #if (defined(SOM_Module_containr_Source) || defined(Container_Class_Source) || defined (SOM_DONT_IMPORT_CLASS_Container))
  182. } WIN32_DLLEXPORT SOMDLINK ContainerCClassData;
  183. #else
  184. } WIN32_DLLIMPORT SOMDLINK ContainerCClassData;
  185. #endif
  186.  
  187. /*
  188.  * New and Renew macros for Container
  189.  */
  190. #define ContainerNew() \
  191.    (_somNew(_Container ? _Container : ContainerNewClass(Container_MajorVersion, Container_MinorVersion)))
  192. #define ContainerRenew(buf) \
  193.    (_somRenew(_Container ? _Container : ContainerNewClass(Container_MajorVersion, Container_MinorVersion), buf))
  194.  
  195. /*
  196.  * Override method: somInit
  197.  */
  198. #define Container_somInit(somSelf) \
  199.     SOMObject_somInit(somSelf)
  200.  
  201. /*
  202.  * Override method: somUninit
  203.  */
  204. #define Container_somUninit(somSelf) \
  205.     SOMObject_somUninit(somSelf)
  206.  
  207. /*
  208.  * Override method: somDumpSelf
  209.  */
  210. #define Container_somDumpSelf(somSelf,level) \
  211.     SOMObject_somDumpSelf(somSelf,level)
  212.  
  213. /*
  214.  * Override method: somDumpSelfInt
  215.  */
  216. #define Container_somDumpSelfInt(somSelf,level) \
  217.     SOMObject_somDumpSelfInt(somSelf,level)
  218.  
  219. /*
  220.  * New Method: contents
  221.  */
  222. typedef _IDL_SEQUENCE_Contained   SOMLINK somTP_Container_contents(Container *somSelf, Environment *ev,
  223.         Container_InterfaceName limit_type,
  224.         boolean exclude_inherited);
  225. typedef somTP_Container_contents *somTD_Container_contents;
  226. #define somMD_Container_contents "::Container::contents"
  227. #define Container_contents(somSelf,ev,limit_type,exclude_inherited) \
  228.     (SOM_Resolve(somSelf, Container, contents) \
  229.     (somSelf,ev,limit_type,exclude_inherited))
  230. #ifndef SOMGD_contents
  231.     #if (defined(_contents) || defined(__contents))
  232.         #undef _contents
  233.         #undef __contents
  234.         #define SOMGD_contents 1
  235.     #else
  236.         #define _contents Container_contents
  237.     #endif /* _contents */
  238. #endif /* SOMGD_contents */
  239.  
  240. /*
  241.  * New Method: lookup_name
  242.  */
  243. typedef _IDL_SEQUENCE_Contained   SOMLINK somTP_Container_lookup_name(Container *somSelf, Environment *ev,
  244.         Identifier search_name,
  245.         long levels_to_search,
  246.         Container_InterfaceName limit_type,
  247.         boolean exclude_inherited);
  248. typedef somTP_Container_lookup_name *somTD_Container_lookup_name;
  249. #define somMD_Container_lookup_name "::Container::lookup_name"
  250. #define Container_lookup_name(somSelf,ev,search_name,levels_to_search,limit_type,exclude_inherited) \
  251.     (SOM_Resolve(somSelf, Container, lookup_name) \
  252.     (somSelf,ev,search_name,levels_to_search,limit_type,exclude_inherited))
  253. #ifndef SOMGD_lookup_name
  254.     #if (defined(_lookup_name) || defined(__lookup_name))
  255.         #undef _lookup_name
  256.         #undef __lookup_name
  257.         #define SOMGD_lookup_name 1
  258.     #else
  259.         #define _lookup_name Container_lookup_name
  260.     #endif /* _lookup_name */
  261. #endif /* SOMGD_lookup_name */
  262.  
  263. /*
  264.  * New Method: describe_contents
  265.  */
  266. typedef _IDL_SEQUENCE_Container_ContainerDescription   SOMLINK somTP_Container_describe_contents(Container *somSelf, Environment *ev,
  267.         Container_InterfaceName limit_type,
  268.         boolean exclude_inherited,
  269.         long max_returned_objs);
  270. typedef somTP_Container_describe_contents *somTD_Container_describe_contents;
  271. #define somMD_Container_describe_contents "::Container::describe_contents"
  272. #define Container_describe_contents(somSelf,ev,limit_type,exclude_inherited,max_returned_objs) \
  273.     (SOM_Resolve(somSelf, Container, describe_contents) \
  274.     (somSelf,ev,limit_type,exclude_inherited,max_returned_objs))
  275. #ifndef SOMGD_describe_contents
  276.     #if (defined(_describe_contents) || defined(__describe_contents))
  277.         #undef _describe_contents
  278.         #undef __describe_contents
  279.         #define SOMGD_describe_contents 1
  280.     #else
  281.         #define _describe_contents Container_describe_contents
  282.     #endif /* _describe_contents */
  283. #endif /* SOMGD_describe_contents */
  284. #ifndef SOM_DONT_USE_INHERITED_MACROS
  285. #define Container_somDefaultInit SOMObject_somDefaultInit
  286. #define Container_somDestruct SOMObject_somDestruct
  287. #define Container_somDefaultCopyInit SOMObject_somDefaultCopyInit
  288. #define Container_somDefaultAssign SOMObject_somDefaultAssign
  289. #define Container_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
  290. #define Container_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
  291. #define Container_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
  292. #define Container_somDefaultConstAssign SOMObject_somDefaultConstAssign
  293. #define Container_somDefaultVAssign SOMObject_somDefaultVAssign
  294. #define Container_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
  295. #define Container_somFree SOMObject_somFree
  296. #define Container_somGetClass SOMObject_somGetClass
  297. #define Container_somGetClassName SOMObject_somGetClassName
  298. #define Container_somGetSize SOMObject_somGetSize
  299. #define Container_somIsA SOMObject_somIsA
  300. #define Container_somIsInstanceOf SOMObject_somIsInstanceOf
  301. #define Container_somRespondsTo SOMObject_somRespondsTo
  302. #define Container_somDispatch SOMObject_somDispatch
  303. #define Container_somClassDispatch SOMObject_somClassDispatch
  304. #define Container_somCastObj SOMObject_somCastObj
  305. #define Container_somResetObj SOMObject_somResetObj
  306. #define Container_somPrintSelf SOMObject_somPrintSelf
  307. #endif /* SOM_DONT_USE_INHERITED_MACROS */
  308.  
  309. #endif       /* SOM_Container_h */
  310.