home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / tolkit45.zip / os2tk45 / som / include / moduledf.xh < prev    next >
Text File  |  1999-02-22  |  33KB  |  1,089 lines

  1.  
  2. /*
  3.  * This file was generated by the SOM Compiler.
  4.  * FileName: moduledf.xh.
  5.  * Generated using:
  6.  *     SOM Precompiler somipc: 2.29.1.17
  7.  *     SOM Emitter emitxh: 2.47
  8.  */
  9.  
  10. #ifndef SOM_ModuleDef_xh
  11. #define SOM_ModuleDef_xh
  12.  
  13. class ModuleDef;
  14.  
  15. /*
  16.  *  This interface is used to access information associated with
  17.  *  modules defined in an IDL file.
  18.  * 
  19.  *  See CORBA 1.1, 7.5.3, p.133
  20.  */
  21.  
  22. #define ModuleDef_MajorVersion 2
  23. #define ModuleDef_MinorVersion 3
  24.  
  25. /*
  26.  * Passthru lines: File: "C.xh", "before"
  27.  */
  28.  
  29.     #include <somtcnst.xh>
  30.     #include <somir.xh>
  31.     #include <containd.xh>
  32.  
  33.  
  34. /* C++ SOM defs */
  35. #include <somcls.xh>
  36. #include <somcm.xh>
  37.  
  38. /* C++ parent defs */
  39. #ifndef SOM_Contained_xh
  40. #include <containd.xh>
  41. #endif
  42. #ifndef SOM_Container_xh
  43. #include <containr.xh>
  44. #endif
  45.  
  46. #ifndef ModuleDef_API
  47. #define ModuleDef_API
  48. /*
  49.  * -- The Class API
  50.  */
  51.  
  52. /*
  53.  * Start of bindings for IDL types
  54.  */
  55.  
  56. class SOMClass;
  57. class SOMObject;
  58. class Container;
  59. typedef
  60. struct ModuleDef_ModuleDescription {
  61. Identifier name;
  62. RepositoryId id;
  63. RepositoryId defined_in;
  64. } ModuleDef_ModuleDescription;
  65. /*
  66.  *  The inherited describe method returns an instance of this
  67.  *  (ModuleDescription) structure in the "value" member of the
  68.  *  Description structure defined in the Contained interface.
  69.  *  The inherited describe_contents method in the Container
  70.  *  interface returns a sequence of these Description structures
  71.  *  each carrying a reference to a ModuleDescription structure
  72.  *  in its "value" member.
  73.  */
  74.  
  75.  
  76. #ifndef SOM_DONT_USE_SHORT_NAMES
  77. #ifndef SOMTGD_ModuleDescription
  78.     #ifdef ModuleDescription
  79.         #undef ModuleDescription
  80.         #define SOMTGD_ModuleDescription 1
  81.     #else
  82.         #define ModuleDescription ModuleDef_ModuleDescription
  83.     #endif /* ModuleDescription */
  84. #endif /* SOMTGD_ModuleDescription */
  85. #endif /* SOM_DONT_USE_SHORT_NAMES */
  86.  
  87. /*
  88.  * End of bindings for IDL types.
  89.  */
  90.  
  91. /* A procedure to create the ModuleDef Class */
  92. SOMEXTERN SOMClass * SOMLINK ModuleDefNewClass(
  93.         integer4 majorVersion,
  94.         integer4 minorVersion);
  95.  
  96. /* The API to the ModuleDef class object, and the methods it introduces. */
  97. SOMEXTERN struct ModuleDefClassDataStructure {
  98.     SOMClass *classObject;
  99. } SOMDLINK ModuleDefClassData;
  100. #define _ModuleDef ModuleDefClassData.classObject
  101.  
  102. /* The API to parentMtabs for ModuleDef, and the instance data it introduces. */
  103. SOMEXTERN struct ModuleDefCClassDataStructure {
  104.     somMethodTabs parentMtab;
  105.     somDToken              instanceDataToken;
  106. } SOMDLINK ModuleDefCClassData;
  107.  
  108. /*
  109.  * -- Typedefs for ModuleDef Method Procedures
  110.  */
  111. SOMEXTERN {
  112.  
  113. /*
  114.  * -- Typedefs for Reintroduced Wrapper Methods
  115.  */
  116. typedef Identifier   SOMLINK somTP_ModuleDef__get_name(ModuleDef *somSelf, Environment *ev);
  117. typedef somTP_ModuleDef__get_name *somTD_ModuleDef__get_name;
  118. typedef void   SOMLINK somTP_ModuleDef__set_name(ModuleDef *somSelf, Environment *ev, 
  119.         Identifier name);
  120. typedef somTP_ModuleDef__set_name *somTD_ModuleDef__set_name;
  121. typedef RepositoryId   SOMLINK somTP_ModuleDef__get_id(ModuleDef *somSelf, Environment *ev);
  122. typedef somTP_ModuleDef__get_id *somTD_ModuleDef__get_id;
  123. typedef void   SOMLINK somTP_ModuleDef__set_id(ModuleDef *somSelf, Environment *ev, 
  124.         RepositoryId id);
  125. typedef somTP_ModuleDef__set_id *somTD_ModuleDef__set_id;
  126. typedef RepositoryId   SOMLINK somTP_ModuleDef__get_defined_in(ModuleDef *somSelf, Environment *ev);
  127. typedef somTP_ModuleDef__get_defined_in *somTD_ModuleDef__get_defined_in;
  128. typedef void   SOMLINK somTP_ModuleDef__set_defined_in(ModuleDef *somSelf, Environment *ev, 
  129.         RepositoryId defined_in);
  130. typedef somTP_ModuleDef__set_defined_in *somTD_ModuleDef__set_defined_in;
  131. typedef _IDL_SEQUENCE_somModifier   SOMLINK somTP_ModuleDef__get_somModifiers(ModuleDef *somSelf, Environment *ev);
  132. typedef somTP_ModuleDef__get_somModifiers *somTD_ModuleDef__get_somModifiers;
  133. typedef void   SOMLINK somTP_ModuleDef__set_somModifiers(ModuleDef *somSelf, Environment *ev, 
  134.         _IDL_SEQUENCE_somModifier* somModifiers);
  135. typedef somTP_ModuleDef__set_somModifiers *somTD_ModuleDef__set_somModifiers;
  136. typedef _IDL_SEQUENCE_Container   SOMLINK somTP_ModuleDef_within(ModuleDef *somSelf, Environment *ev);
  137. typedef somTP_ModuleDef_within *somTD_ModuleDef_within;
  138. typedef Contained_Description   SOMLINK somTP_ModuleDef_describe(ModuleDef *somSelf, Environment *ev);
  139. typedef somTP_ModuleDef_describe *somTD_ModuleDef_describe;
  140. typedef void   SOMLINK somTP_ModuleDef_somFree(ModuleDef *somSelf);
  141. typedef somTP_ModuleDef_somFree *somTD_ModuleDef_somFree;
  142. typedef void   SOMLINK somTP_ModuleDef_somDefaultInit(ModuleDef *somSelf, 
  143.         som3InitCtrl* ctrl);
  144. typedef somTP_ModuleDef_somDefaultInit *somTD_ModuleDef_somDefaultInit;
  145. typedef void   SOMLINK somTP_ModuleDef_somDestruct(ModuleDef *somSelf, 
  146.         octet doFree, 
  147.         som3DestructCtrl* ctrl);
  148. typedef somTP_ModuleDef_somDestruct *somTD_ModuleDef_somDestruct;
  149. typedef void   SOMLINK somTP_ModuleDef_somDumpSelf(ModuleDef *somSelf, 
  150.         long level);
  151. typedef somTP_ModuleDef_somDumpSelf *somTD_ModuleDef_somDumpSelf;
  152. typedef void   SOMLINK somTP_ModuleDef_somDumpSelfInt(ModuleDef *somSelf, 
  153.         long level);
  154. typedef somTP_ModuleDef_somDumpSelfInt *somTD_ModuleDef_somDumpSelfInt;
  155. typedef void   SOMLINK somTP_ModuleDef_somDefaultCopyInit(ModuleDef *somSelf, 
  156.         som3InitCtrl* ctrl, 
  157.         SOMObject* fromObj);
  158. typedef somTP_ModuleDef_somDefaultCopyInit *somTD_ModuleDef_somDefaultCopyInit;
  159. typedef ModuleDef*   SOMLINK somTP_ModuleDef_somDefaultAssign(ModuleDef *somSelf, 
  160.         som3AssignCtrl* ctrl, 
  161.         SOMObject* fromObj);
  162. typedef somTP_ModuleDef_somDefaultAssign *somTD_ModuleDef_somDefaultAssign;
  163. typedef void   SOMLINK somTP_ModuleDef_somDefaultConstCopyInit(ModuleDef *somSelf, 
  164.         som3InitCtrl* ctrl, 
  165.         SOMObject* fromObj);
  166. typedef somTP_ModuleDef_somDefaultConstCopyInit *somTD_ModuleDef_somDefaultConstCopyInit;
  167. typedef void   SOMLINK somTP_ModuleDef_somDefaultVCopyInit(ModuleDef *somSelf, 
  168.         som3InitCtrl* ctrl, 
  169.         SOMObject* fromObj);
  170. typedef somTP_ModuleDef_somDefaultVCopyInit *somTD_ModuleDef_somDefaultVCopyInit;
  171. typedef void   SOMLINK somTP_ModuleDef_somDefaultConstVCopyInit(ModuleDef *somSelf, 
  172.         som3InitCtrl* ctrl, 
  173.         SOMObject* fromObj);
  174. typedef somTP_ModuleDef_somDefaultConstVCopyInit *somTD_ModuleDef_somDefaultConstVCopyInit;
  175. typedef ModuleDef*   SOMLINK somTP_ModuleDef_somDefaultConstAssign(ModuleDef *somSelf, 
  176.         som3AssignCtrl* ctrl, 
  177.         SOMObject* fromObj);
  178. typedef somTP_ModuleDef_somDefaultConstAssign *somTD_ModuleDef_somDefaultConstAssign;
  179. typedef ModuleDef*   SOMLINK somTP_ModuleDef_somDefaultVAssign(ModuleDef *somSelf, 
  180.         som3AssignCtrl* ctrl, 
  181.         SOMObject* fromObj);
  182. typedef somTP_ModuleDef_somDefaultVAssign *somTD_ModuleDef_somDefaultVAssign;
  183. typedef ModuleDef*   SOMLINK somTP_ModuleDef_somDefaultConstVAssign(ModuleDef *somSelf, 
  184.         som3AssignCtrl* ctrl, 
  185.         SOMObject* fromObj);
  186. typedef somTP_ModuleDef_somDefaultConstVAssign *somTD_ModuleDef_somDefaultConstVAssign;
  187. typedef void   SOMLINK somTP_ModuleDef_somInit(ModuleDef *somSelf);
  188. typedef somTP_ModuleDef_somInit *somTD_ModuleDef_somInit;
  189. typedef void   SOMLINK somTP_ModuleDef_somUninit(ModuleDef *somSelf);
  190. typedef somTP_ModuleDef_somUninit *somTD_ModuleDef_somUninit;
  191. typedef SOMClass*   SOMLINK somTP_ModuleDef_somGetClass(ModuleDef *somSelf);
  192. typedef somTP_ModuleDef_somGetClass *somTD_ModuleDef_somGetClass;
  193. typedef string   SOMLINK somTP_ModuleDef_somGetClassName(ModuleDef *somSelf);
  194. typedef somTP_ModuleDef_somGetClassName *somTD_ModuleDef_somGetClassName;
  195. typedef long   SOMLINK somTP_ModuleDef_somGetSize(ModuleDef *somSelf);
  196. typedef somTP_ModuleDef_somGetSize *somTD_ModuleDef_somGetSize;
  197. typedef boolean   SOMLINK somTP_ModuleDef_somIsA(ModuleDef *somSelf, 
  198.         SOMClass* aClassObj);
  199. typedef somTP_ModuleDef_somIsA *somTD_ModuleDef_somIsA;
  200. typedef boolean   SOMLINK somTP_ModuleDef_somIsInstanceOf(ModuleDef *somSelf, 
  201.         SOMClass* aClassObj);
  202. typedef somTP_ModuleDef_somIsInstanceOf *somTD_ModuleDef_somIsInstanceOf;
  203. typedef boolean   SOMLINK somTP_ModuleDef_somRespondsTo(ModuleDef *somSelf, 
  204.         somId mId);
  205. typedef somTP_ModuleDef_somRespondsTo *somTD_ModuleDef_somRespondsTo;
  206. typedef boolean   SOMLINK somTP_ModuleDef_somDispatch(ModuleDef *somSelf, 
  207.         somToken* retValue, 
  208.         somId methodId, 
  209.         va_list ap);
  210. typedef somTP_ModuleDef_somDispatch *somTD_ModuleDef_somDispatch;
  211. typedef boolean   SOMLINK somTP_ModuleDef_somClassDispatch(ModuleDef *somSelf, 
  212.         SOMClass* clsObj, 
  213.         somToken* retValue, 
  214.         somId methodId, 
  215.         va_list ap);
  216. typedef somTP_ModuleDef_somClassDispatch *somTD_ModuleDef_somClassDispatch;
  217. typedef boolean   SOMLINK somTP_ModuleDef_somCastObj(ModuleDef *somSelf, 
  218.         SOMClass* cls);
  219. typedef somTP_ModuleDef_somCastObj *somTD_ModuleDef_somCastObj;
  220. typedef boolean   SOMLINK somTP_ModuleDef_somResetObj(ModuleDef *somSelf);
  221. typedef somTP_ModuleDef_somResetObj *somTD_ModuleDef_somResetObj;
  222. typedef void   SOMLINK somTP_ModuleDef_somDispatchV(ModuleDef *somSelf, 
  223.         somId methodId, 
  224.         somId descriptor, 
  225.         va_list ap);
  226. typedef somTP_ModuleDef_somDispatchV *somTD_ModuleDef_somDispatchV;
  227. typedef long   SOMLINK somTP_ModuleDef_somDispatchL(ModuleDef *somSelf, 
  228.         somId methodId, 
  229.         somId descriptor, 
  230.         va_list ap);
  231. typedef somTP_ModuleDef_somDispatchL *somTD_ModuleDef_somDispatchL;
  232. typedef void*   SOMLINK somTP_ModuleDef_somDispatchA(ModuleDef *somSelf, 
  233.         somId methodId, 
  234.         somId descriptor, 
  235.         va_list ap);
  236. typedef somTP_ModuleDef_somDispatchA *somTD_ModuleDef_somDispatchA;
  237. typedef double   SOMLINK somTP_ModuleDef_somDispatchD(ModuleDef *somSelf, 
  238.         somId methodId, 
  239.         somId descriptor, 
  240.         va_list ap);
  241. typedef somTP_ModuleDef_somDispatchD *somTD_ModuleDef_somDispatchD;
  242. typedef SOMObject*   SOMLINK somTP_ModuleDef_somPrintSelf(ModuleDef *somSelf);
  243. typedef somTP_ModuleDef_somPrintSelf *somTD_ModuleDef_somPrintSelf;
  244. typedef _IDL_SEQUENCE_Contained   SOMLINK somTP_ModuleDef_contents(ModuleDef *somSelf, Environment *ev, 
  245.         Container_InterfaceName limit_type, 
  246.         boolean exclude_inherited);
  247. typedef somTP_ModuleDef_contents *somTD_ModuleDef_contents;
  248. typedef _IDL_SEQUENCE_Contained   SOMLINK somTP_ModuleDef_lookup_name(ModuleDef *somSelf, Environment *ev, 
  249.         Identifier search_name, 
  250.         long levels_to_search, 
  251.         Container_InterfaceName limit_type, 
  252.         boolean exclude_inherited);
  253. typedef somTP_ModuleDef_lookup_name *somTD_ModuleDef_lookup_name;
  254. typedef _IDL_SEQUENCE_Container_ContainerDescription   SOMLINK somTP_ModuleDef_describe_contents(ModuleDef *somSelf, Environment *ev, 
  255.         Container_InterfaceName limit_type, 
  256.         boolean exclude_inherited, 
  257.         long max_returned_objs);
  258. typedef somTP_ModuleDef_describe_contents *somTD_ModuleDef_describe_contents;
  259. }
  260.  
  261. #endif /* ModuleDef_API */
  262.  
  263.  
  264. /*
  265.  * -- This emitter treats Method Tokens as Thunks by default.
  266.  * -- Use the sc modifier "nothunks" to change this default
  267.  */
  268. #undef somresolve_
  269. #define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
  270.  
  271. /*
  272.  * -- The C++ Wrapper Class for ModuleDef
  273.  */
  274. class ModuleDef : public Contained, public Container
  275. {
  276. /*
  277.  *  This interface is used to access information associated with
  278.  *  modules defined in an IDL file.
  279.  * 
  280.  *  See CORBA 1.1, 7.5.3, p.133
  281.  */
  282. public:
  283.  
  284. // ModuleDef::new creates the class object if necessary, and then uses somNewNoInit
  285. // to allocate memory and create the object. Initialization is in ctors.
  286. void *operator new(size_t)
  287. {
  288.    if (!_ModuleDef) ModuleDefNewClass(ModuleDef_MajorVersion,ModuleDef_MinorVersion);
  289.    return (void*)
  290.       SOM_Resolve(_ModuleDef,SOMClass,somNewNoInit)
  291.          ((SOMClass *)((void*)_ModuleDef));
  292. }
  293.  
  294. // ModuleDef::delete uses somDestruct.
  295. void operator delete(void * obj)
  296. {
  297.    if (obj && *(void**)obj) {
  298.       SOM_Resolve(obj,SOMObject,somFree)
  299.          ((SOMObject*)obj);
  300.    }
  301. }
  302.  
  303. ModuleDef& operator=(ModuleDef& fromObj)
  304. {
  305.    this->somDefaultAssign(0,(SOMObject*)((void*)&fromObj));
  306.    return *this;
  307. }
  308.  
  309. ModuleDef()
  310. {
  311.    if (*(void**)this != 
  312.        ((somParentMtabStructPtr)
  313.         (ModuleDefCClassData.parentMtab))->mtab)
  314.       return;
  315.    ((SOMObject*)((void*)this))->somDefaultInit(0);
  316. }
  317.  
  318. ModuleDef(ModuleDef* fromObj)
  319. {
  320.    if (*(void**)this != 
  321.        ((somParentMtabStructPtr)
  322.         (ModuleDefCClassData.parentMtab))->mtab)
  323.       return;
  324.    ((SOMObject*)((void*)this))->somDefaultCopyInit(0,((SOMObject*)((void*)fromObj)));
  325. }
  326.  
  327. #ifdef __IBMCPP__
  328. #pragma info(nocnv,nopar)
  329. #endif
  330. ModuleDef(const ModuleDef* fromObj)
  331. {
  332.    if (*(void**)this != 
  333.        ((somParentMtabStructPtr)
  334.         (ModuleDefCClassData.parentMtab))->mtab)
  335.       return;
  336.    ((SOMObject*)((void*)this))->somDefaultConstCopyInit(0,((SOMObject*)((void*)fromObj)));
  337. }
  338. #ifdef __IBMCPP__
  339. #pragma info(restore)
  340. #endif
  341.  
  342.  
  343. /*
  344.  * Reintroduce inherited methods
  345.  */
  346.  
  347. /* method: _get_name */
  348. Identifier   _get_name(Environment *ev)
  349. {
  350. /*
  351.  *  The value of the "name" field of the receiving object
  352.  * 
  353.  *  This is a simple name that indentifies the receiving object
  354.  *  within its containment hierarchy.  Outside of the containment
  355.  *  hierarchy this name is not necessarily unique, and may require
  356.  *  qualification by ModuleDef name, InterfaceDef name, etc.
  357.  */
  358.    return SOM_ResolveD(this,ModuleDef,Contained,_get_name)
  359.     (this, ev);
  360. }
  361.  
  362.  
  363. /* method: _set_name */
  364. void   _set_name(Environment *ev, 
  365.         Identifier name)
  366. {
  367. /*
  368.  *  The value of the "name" field of the receiving object
  369.  * 
  370.  *  This is a simple name that indentifies the receiving object
  371.  *  within its containment hierarchy.  Outside of the containment
  372.  *  hierarchy this name is not necessarily unique, and may require
  373.  *  qualification by ModuleDef name, InterfaceDef name, etc.
  374.  */
  375.    SOM_ResolveD(this,ModuleDef,Contained,_set_name)
  376.     (this, ev,name);
  377. }
  378.  
  379.  
  380. /* method: _get_id */
  381. RepositoryId   _get_id(Environment *ev)
  382. {
  383. /*
  384.  *  The value of the "id" field of the receiving object
  385.  * 
  386.  *  The "id" is a string that uniquely identifies any object in
  387.  *  the interface repository.  No qualification is needed for
  388.  *  an "id".  Notice that "RepositoryId"s have no relationship
  389.  *  to the SOM type "somId".
  390.  */
  391.    return SOM_ResolveD(this,ModuleDef,Contained,_get_id)
  392.     (this, ev);
  393. }
  394.  
  395.  
  396. /* method: _set_id */
  397. void   _set_id(Environment *ev, 
  398.         RepositoryId id)
  399. {
  400. /*
  401.  *  The value of the "id" field of the receiving object
  402.  * 
  403.  *  The "id" is a string that uniquely identifies any object in
  404.  *  the interface repository.  No qualification is needed for
  405.  *  an "id".  Notice that "RepositoryId"s have no relationship
  406.  *  to the SOM type "somId".
  407.  */
  408.    SOM_ResolveD(this,ModuleDef,Contained,_set_id)
  409.     (this, ev,id);
  410. }
  411.  
  412.  
  413. /* method: _get_defined_in */
  414. RepositoryId   _get_defined_in(Environment *ev)
  415. {
  416. /*
  417.  *  The value of the "defined_in" field of the receiving object
  418.  * 
  419.  *  This "id" uniquely identifies the container where the
  420.  *  receiving object is defined.  Objects that have global scope
  421.  *  and do not appear within any other objects are by default
  422.  *  placed in the "Repository" object.
  423.  */
  424.    return SOM_ResolveD(this,ModuleDef,Contained,_get_defined_in)
  425.     (this, ev);
  426. }
  427.  
  428.  
  429. /* method: _set_defined_in */
  430. void   _set_defined_in(Environment *ev, 
  431.         RepositoryId defined_in)
  432. {
  433. /*
  434.  *  The value of the "defined_in" field of the receiving object
  435.  * 
  436.  *  This "id" uniquely identifies the container where the
  437.  *  receiving object is defined.  Objects that have global scope
  438.  *  and do not appear within any other objects are by default
  439.  *  placed in the "Repository" object.
  440.  */
  441.    SOM_ResolveD(this,ModuleDef,Contained,_set_defined_in)
  442.     (this, ev,defined_in);
  443. }
  444.  
  445.  
  446. /* method: _get_somModifiers */
  447. _IDL_SEQUENCE_somModifier   _get_somModifiers(Environment *ev)
  448. {
  449. /*
  450.  *  [SOM-unique extension]
  451.  * 
  452.  *  The somModifiers attribute is a sequence containing all of
  453.  *  the "modifiers" attached to the corresponding IDL object in
  454.  *  the SOM-unique implementation section of the IDL file where
  455.  *  the receiving object was originally defined.
  456.  */
  457.    return SOM_ResolveD(this,ModuleDef,Contained,_get_somModifiers)
  458.     (this, ev);
  459. }
  460.  
  461.  
  462. /* method: _set_somModifiers */
  463. void   _set_somModifiers(Environment *ev, 
  464.         _IDL_SEQUENCE_somModifier* somModifiers)
  465. {
  466. /*
  467.  *  [SOM-unique extension]
  468.  * 
  469.  *  The somModifiers attribute is a sequence containing all of
  470.  *  the "modifiers" attached to the corresponding IDL object in
  471.  *  the SOM-unique implementation section of the IDL file where
  472.  *  the receiving object was originally defined.
  473.  */
  474.    SOM_ResolveD(this,ModuleDef,Contained,_set_somModifiers)
  475.     (this, ev,somModifiers);
  476. }
  477.  
  478.  
  479. /* method: within */
  480. _IDL_SEQUENCE_Container   within(Environment *ev)
  481. {
  482. /*
  483.  *  Returns a list of objects that contain the receiving object.
  484.  *  If the object is an interface or module, it can only be contained
  485.  *  by the object that defines it.  Other objects can be contained by
  486.  *  objects that define or inherit them.
  487.  * 
  488.  *  When you have finished using the sequence returned by this method
  489.  *  it is your responsibility to release the storage allocated for it.
  490.  *  To free the sequence, use a call similar to the following:
  491.  * 
  492.  *       if (seqname._length)
  493.  *           long i;
  494.  *           for(i=0; i<seqname._length; i++)
  495.  *         _somFree(seqname._buffer[i]);
  496.  *           SOMFree (seqname._buffer);
  497.  */
  498.    return SOM_ResolveD(this,ModuleDef,Contained,within)
  499.     (this, ev);
  500. }
  501.  
  502.  
  503. /* method: describe */
  504. Contained_Description   describe(Environment *ev)
  505. {
  506. /*
  507.  *  Returns a structure containing all of the attributes defined in
  508.  *  the interface of the receiving object.
  509.  * 
  510.  *  Warning: this method returns pointers to things withing objects
  511.  *  (for example, name).  Don't use the somFree method to release
  512.  *  any of these objects while this information is still needed..
  513.  * 
  514.  *  When you have finished using the information in the returned
  515.  *  Description structure, it is your responsibility to release
  516.  *  the associated storage using a call similar to the following:
  517.  * 
  518.  *       if (desc.value._value)
  519.  *           SOMFree (desc.value._value);
  520.  */
  521.    return SOM_ResolveD(this,ModuleDef,Contained,describe)
  522.     (this, ev);
  523. }
  524.  
  525.  
  526. /* method: somFree */
  527. void   somFree()
  528. {
  529.    SOM_ResolveD(this,ModuleDef,SOMObject,somFree)
  530.     (this);
  531. }
  532.  
  533.  
  534. /* initializer method: somDefaultInit */
  535. void   somDefaultInit(som3InitCtrl* ctrl)
  536. {
  537.    SOM_ResolveD(this,ModuleDef,SOMObject,somDefaultInit)
  538.     (this,ctrl);
  539. }
  540.  
  541.  
  542. /* method: somDestruct */
  543. void   somDestruct(octet doFree, 
  544.         som3DestructCtrl* ctrl)
  545. {
  546.    SOM_ResolveD(this,ModuleDef,SOMObject,somDestruct)
  547.     (this,doFree,ctrl);
  548. }
  549.  
  550.  
  551. /* method: somDumpSelf */
  552. void   somDumpSelf(long level)
  553. {
  554.    SOM_ResolveD(this,ModuleDef,SOMObject,somDumpSelf)
  555.     (this,level);
  556. }
  557.  
  558.  
  559. /* method: somDumpSelfInt */
  560. void   somDumpSelfInt(long level)
  561. {
  562.    SOM_ResolveD(this,ModuleDef,SOMObject,somDumpSelfInt)
  563.     (this,level);
  564. }
  565.  
  566.  
  567. /* initializer method: somDefaultCopyInit */
  568. void   somDefaultCopyInit(som3InitCtrl* ctrl, 
  569.         SOMObject* fromObj)
  570. {
  571. /*
  572.  *  A default copy constructor. Use this to make copies of objects for
  573.  *  calling methods with "by-value" argument semantics.
  574.  */
  575.    SOM_ResolveD(this,ModuleDef,SOMObject,somDefaultCopyInit)
  576.     (this,ctrl,fromObj);
  577. }
  578.  
  579.  
  580. /* method: somDefaultAssign */
  581. ModuleDef*  somDefaultAssign(som3AssignCtrl* ctrl, 
  582.         SOMObject* fromObj)
  583. {
  584. /*
  585.  *  A default assignment operator. Use this to "assign" the state of one
  586.  *  object to another.
  587.  */
  588.    return SOM_ResolveD(this,ModuleDef,SOMObject,somDefaultAssign)
  589.     (this,ctrl,fromObj);
  590. }
  591.  
  592.  
  593. /* initializer method: somDefaultConstCopyInit */
  594. void   somDefaultConstCopyInit(som3InitCtrl* ctrl, 
  595.         SOMObject* fromObj)
  596. {
  597. /*
  598.  *  A default copy constructor that uses a const fromObj.
  599.  */
  600.    SOM_ResolveD(this,ModuleDef,SOMObject,somDefaultConstCopyInit)
  601.     (this,ctrl,fromObj);
  602. }
  603.  
  604.  
  605. /* initializer method: somDefaultVCopyInit */
  606. void   somDefaultVCopyInit(som3InitCtrl* ctrl, 
  607.         SOMObject* fromObj)
  608. {
  609. /*
  610.  *  A default copy constructor that uses a volatile fromObj.
  611.  */
  612.    SOM_ResolveD(this,ModuleDef,SOMObject,somDefaultVCopyInit)
  613.     (this,ctrl,fromObj);
  614. }
  615.  
  616.  
  617. /* initializer method: somDefaultConstVCopyInit */
  618. void   somDefaultConstVCopyInit(som3InitCtrl* ctrl, 
  619.         SOMObject* fromObj)
  620. {
  621. /*
  622.  *  A default copy constructor that uses a const volatile fromObj.
  623.  */
  624.    SOM_ResolveD(this,ModuleDef,SOMObject,somDefaultConstVCopyInit)
  625.     (this,ctrl,fromObj);
  626. }
  627.  
  628.  
  629. /* method: somDefaultConstAssign */
  630. ModuleDef*  somDefaultConstAssign(som3AssignCtrl* ctrl, 
  631.         SOMObject* fromObj)
  632. {
  633. /*
  634.  *  A default assignment operator that uses a const fromObj.
  635.  */
  636.    return SOM_ResolveD(this,ModuleDef,SOMObject,somDefaultConstAssign)
  637.     (this,ctrl,fromObj);
  638. }
  639.  
  640.  
  641. /* method: somDefaultVAssign */
  642. ModuleDef*  somDefaultVAssign(som3AssignCtrl* ctrl, 
  643.         SOMObject* fromObj)
  644. {
  645. /*
  646.  *  A default assignment operator that uses a volatile fromObj.
  647.  */
  648.    return SOM_ResolveD(this,ModuleDef,SOMObject,somDefaultVAssign)
  649.     (this,ctrl,fromObj);
  650. }
  651.  
  652.  
  653. /* method: somDefaultConstVAssign */
  654. ModuleDef*  somDefaultConstVAssign(som3AssignCtrl* ctrl, 
  655.         SOMObject* fromObj)
  656. {
  657. /*
  658.  *  A default assignment operator that uses a const volatile fromObj.
  659.  */
  660.    return SOM_ResolveD(this,ModuleDef,SOMObject,somDefaultConstVAssign)
  661.     (this,ctrl,fromObj);
  662. }
  663.  
  664.  
  665. /* method: somInit */
  666. void   somInit()
  667. {
  668. /*
  669.  *  Obsolete but still supported. Override somDefaultInit instead of somInit.
  670.  */
  671.    SOM_ResolveD(this,ModuleDef,SOMObject,somInit)
  672.     (this);
  673. }
  674.  
  675.  
  676. /* method: somUninit */
  677. void   somUninit()
  678. {
  679. /*
  680.  *  Obsolete but still supported. Override somDestruct instead of somUninit.
  681.  */
  682.    SOM_ResolveD(this,ModuleDef,SOMObject,somUninit)
  683.     (this);
  684. }
  685.  
  686.  
  687. /* method: somGetClass */
  688. SOMClass*   somGetClass()
  689. {
  690. /*
  691.  *  Return the receiver's class.
  692.  */
  693.    return SOM_ResolveD(this,ModuleDef,SOMObject,somGetClass)
  694.     (this);
  695. }
  696.  
  697.  
  698. /* method: somGetClassName */
  699. string   somGetClassName()
  700. {
  701. /*
  702.  *  Return the name of the receiver's class.
  703.  */
  704.    return SOM_ResolveD(this,ModuleDef,SOMObject,somGetClassName)
  705.     (this);
  706. }
  707.  
  708.  
  709. /* method: somGetSize */
  710. long   somGetSize()
  711. {
  712. /*
  713.  *  Return the size of the receiver.
  714.  */
  715.    return SOM_ResolveD(this,ModuleDef,SOMObject,somGetSize)
  716.     (this);
  717. }
  718.  
  719.  
  720. /* method: somIsA */
  721. boolean   somIsA(SOMClass* aClassObj)
  722. {
  723. /*
  724.  *  Returns 1 (true) if the receiver responds to methods
  725.  *  introduced by <aClassObj>, and 0 (false) otherwise.
  726.  */
  727.    return SOM_ResolveD(this,ModuleDef,SOMObject,somIsA)
  728.     (this,aClassObj);
  729. }
  730.  
  731.  
  732. /* method: somIsInstanceOf */
  733. boolean   somIsInstanceOf(SOMClass* aClassObj)
  734. {
  735. /*
  736.  *  Returns 1 (true) if the receiver is an instance of
  737.  *  <aClassObj> and 0 (false) otherwise.
  738.  */
  739.    return SOM_ResolveD(this,ModuleDef,SOMObject,somIsInstanceOf)
  740.     (this,aClassObj);
  741. }
  742.  
  743.  
  744. /* method: somRespondsTo */
  745. boolean   somRespondsTo(somId mId)
  746. {
  747. /*
  748.  *  Returns 1 (true) if the indicated method can be invoked
  749.  *  on the receiver and 0 (false) otherwise.
  750.  */
  751.    return SOM_ResolveD(this,ModuleDef,SOMObject,somRespondsTo)
  752.     (this,mId);
  753. }
  754.  
  755.  
  756. /* va_list method: somDispatch */
  757.  
  758. /*
  759.  *  This method provides a generic, class-specific dispatch mechanism.
  760.  *  It accepts as input <retValue> a pointer to the memory area to be
  761.  *  loaded with the result of dispatching the method indicated by
  762.  *  <methodId> using the arguments in <ap>. <ap> contains the object
  763.  *  on which the method is to be invoked as the first argument.
  764.  */
  765. /* the va_list invocation form */
  766. boolean   ModuleDef_somDispatch(somToken* retValue, 
  767.         somId methodId, 
  768.         va_list ap)
  769. {return SOM_ResolveD(this,ModuleDef,SOMObject,somDispatch)
  770.     (this,retValue,methodId,ap);
  771. }
  772.  
  773. /* the varargs invocation form */
  774. boolean   somDispatch(somToken* retValue, 
  775.         somId methodId, 
  776.         ...)
  777. {
  778. /*
  779.  *  This method provides a generic, class-specific dispatch mechanism.
  780.  *  It accepts as input <retValue> a pointer to the memory area to be
  781.  *  loaded with the result of dispatching the method indicated by
  782.  *  <methodId> using the arguments in <ap>. <ap> contains the object
  783.  *  on which the method is to be invoked as the first argument.
  784.  */
  785.    va_list ap;
  786.    va_start(ap, methodId);
  787.    boolean __somResult = 
  788.       SOM_ResolveD(this,ModuleDef,SOMObject,somDispatch)
  789.     (this,retValue,methodId,ap);
  790.    va_end(ap);
  791.    return __somResult;
  792. }
  793.  
  794.  
  795. /* va_list method: somClassDispatch */
  796.  
  797. /*
  798.  *  Like somDispatch, but method resolution for static methods is done
  799.  *  according to the clsObj instance method table.
  800.  */
  801. /* the va_list invocation form */
  802. boolean   ModuleDef_somClassDispatch(SOMClass* clsObj, 
  803.         somToken* retValue, 
  804.         somId methodId, 
  805.         va_list ap)
  806. {return SOM_ResolveD(this,ModuleDef,SOMObject,somClassDispatch)
  807.     (this,clsObj,retValue,methodId,ap);
  808. }
  809.  
  810. /* the varargs invocation form */
  811. boolean   somClassDispatch(SOMClass* clsObj, 
  812.         somToken* retValue, 
  813.         somId methodId, 
  814.         ...)
  815. {
  816. /*
  817.  *  Like somDispatch, but method resolution for static methods is done
  818.  *  according to the clsObj instance method table.
  819.  */
  820.    va_list ap;
  821.    va_start(ap, methodId);
  822.    boolean __somResult = 
  823.       SOM_ResolveD(this,ModuleDef,SOMObject,somClassDispatch)
  824.     (this,clsObj,retValue,methodId,ap);
  825.    va_end(ap);
  826.    return __somResult;
  827. }
  828.  
  829.  
  830. /* method: somCastObj */
  831. boolean   somCastObj(SOMClass* cls)
  832. {
  833. /*
  834.  *  cast the receiving object to cls (which must be an ancestor of the
  835.  *  objects true class. Returns true on success.
  836.  */
  837.    return SOM_ResolveD(this,ModuleDef,SOMObject,somCastObj)
  838.     (this,cls);
  839. }
  840.  
  841.  
  842. /* method: somResetObj */
  843. boolean   somResetObj()
  844. {
  845. /*
  846.  *  reset an object to its true class. Returns true always.
  847.  */
  848.    return SOM_ResolveD(this,ModuleDef,SOMObject,somResetObj)
  849.     (this);
  850. }
  851.  
  852.  
  853. /* va_list method: somDispatchV */
  854.  
  855. /*
  856.  *  Obsolete. Use somDispatch instead.
  857.  */
  858. /* the va_list invocation form */
  859. void   ModuleDef_somDispatchV(somId methodId, 
  860.         somId descriptor, 
  861.         va_list ap)
  862. {   SOM_ResolveD(this,ModuleDef,SOMObject,somDispatchV)
  863.     (this,methodId,descriptor,ap);
  864. }
  865.  
  866. /* the varargs invocation form */
  867. void   somDispatchV(somId methodId, 
  868.         somId descriptor, 
  869.         ...)
  870. {
  871. /*
  872.  *  Obsolete. Use somDispatch instead.
  873.  */
  874.    va_list ap;
  875.    va_start(ap, descriptor);
  876.    SOM_ResolveD(this,ModuleDef,SOMObject,somDispatchV)
  877.     (this,methodId,descriptor,ap);
  878.    va_end(ap);
  879. }
  880.  
  881.  
  882. /* va_list method: somDispatchL */
  883.  
  884. /*
  885.  *  Obsolete. Use somDispatch instead.
  886.  */
  887. /* the va_list invocation form */
  888. long   ModuleDef_somDispatchL(somId methodId, 
  889.         somId descriptor, 
  890.         va_list ap)
  891. {return SOM_ResolveD(this,ModuleDef,SOMObject,somDispatchL)
  892.     (this,methodId,descriptor,ap);
  893. }
  894.  
  895. /* the varargs invocation form */
  896. long   somDispatchL(somId methodId, 
  897.         somId descriptor, 
  898.         ...)
  899. {
  900. /*
  901.  *  Obsolete. Use somDispatch instead.
  902.  */
  903.    va_list ap;
  904.    va_start(ap, descriptor);
  905.    long __somResult = 
  906.       SOM_ResolveD(this,ModuleDef,SOMObject,somDispatchL)
  907.     (this,methodId,descriptor,ap);
  908.    va_end(ap);
  909.    return __somResult;
  910. }
  911.  
  912.  
  913. /* va_list method: somDispatchA */
  914.  
  915. /*
  916.  *  Obsolete. Use somDispatch instead.
  917.  */
  918. /* the va_list invocation form */
  919. void*   ModuleDef_somDispatchA(somId methodId, 
  920.         somId descriptor, 
  921.         va_list ap)
  922. {return SOM_ResolveD(this,ModuleDef,SOMObject,somDispatchA)
  923.     (this,methodId,descriptor,ap);
  924. }
  925.  
  926. /* the varargs invocation form */
  927. void*   somDispatchA(somId methodId, 
  928.         somId descriptor, 
  929.         ...)
  930. {
  931. /*
  932.  *  Obsolete. Use somDispatch instead.
  933.  */
  934.    va_list ap;
  935.    va_start(ap, descriptor);
  936.    void* __somResult = 
  937.       SOM_ResolveD(this,ModuleDef,SOMObject,somDispatchA)
  938.     (this,methodId,descriptor,ap);
  939.    va_end(ap);
  940.    return __somResult;
  941. }
  942.  
  943.  
  944. /* va_list method: somDispatchD */
  945.  
  946. /*
  947.  *  Obsolete. Use somDispatch instead.
  948.  */
  949. /* the va_list invocation form */
  950. double   ModuleDef_somDispatchD(somId methodId, 
  951.         somId descriptor, 
  952.         va_list ap)
  953. {return SOM_ResolveD(this,ModuleDef,SOMObject,somDispatchD)
  954.     (this,methodId,descriptor,ap);
  955. }
  956.  
  957. /* the varargs invocation form */
  958. double   somDispatchD(somId methodId, 
  959.         somId descriptor, 
  960.         ...)
  961. {
  962. /*
  963.  *  Obsolete. Use somDispatch instead.
  964.  */
  965.    va_list ap;
  966.    va_start(ap, descriptor);
  967.    double __somResult = 
  968.       SOM_ResolveD(this,ModuleDef,SOMObject,somDispatchD)
  969.     (this,methodId,descriptor,ap);
  970.    va_end(ap);
  971.    return __somResult;
  972. }
  973.  
  974.  
  975. /* method: somPrintSelf */
  976. SOMObject*   somPrintSelf()
  977. {
  978. /*
  979.  *  Uses <SOMOutCharRoutine> to write a brief string with identifying
  980.  *  information about this object.  The default implementation just gives
  981.  *  the object's class name and its address in memory.
  982.  *  <self> is returned.
  983.  */
  984.    return SOM_ResolveD(this,ModuleDef,SOMObject,somPrintSelf)
  985.     (this);
  986. }
  987.  
  988.  
  989. /* method: contents */
  990. _IDL_SEQUENCE_Contained   contents(Environment *ev, 
  991.         Container_InterfaceName limit_type, 
  992.         boolean exclude_inherited)
  993. {
  994. /*
  995.  *  Returns a list of objects contained by the receiving object.
  996.  *  This operation is used to navigate thru the hierarchy of objects.
  997.  *  Starting with the Repository object, use this operation to list
  998.  *  all of the objects in the Repository, then all of the objects
  999.  *  within the ModuleDef objects, then all of the objects in the
  1000.  *  InterfaceDefs, etc.
  1001.  * 
  1002.  *  If restrict_type is set to "all", objects of all interface types
  1003.  *  are returned, otherwise only objects of the requested interface type
  1004.  *  will be returned.  If exclude_inherited is set to TRUE, inherited
  1005.  *  objects, if any, will not be returned.
  1006.  * 
  1007.  *  You are responsible for freeing the contents of the returned
  1008.  *  sequence when you are finished with it.    Use a code fragment
  1009.  *  similar to the following to free it:
  1010.  * 
  1011.  *       if (containedSeq._length)
  1012.  *           long i;
  1013.  *           for(i=0; i<containedSeq._length; i++)
  1014.  *         SOMObject_somFree(containedSeq._buffer[i]);
  1015.  *           SOMFree (containedSeq._buffer);
  1016.  */
  1017.    return SOM_ResolveD(this,ModuleDef,Container,contents)
  1018.     (this, ev,limit_type,exclude_inherited);
  1019. }
  1020.  
  1021.  
  1022. /* method: lookup_name */
  1023. _IDL_SEQUENCE_Contained   lookup_name(Environment *ev, 
  1024.         Identifier search_name, 
  1025.         long levels_to_search, 
  1026.         Container_InterfaceName limit_type, 
  1027.         boolean exclude_inherited)
  1028. {
  1029. /*
  1030.  *  Locates an object by name within the receiving object, or within
  1031.  *  objects contained in the receiving object.  Search_name specifies
  1032.  *  the name of the object to be found.  Levels_to_search controls
  1033.  *  whether the lookup is constrained to the receiving object or
  1034.  *  whether it includes objects contained withing the receiving object.
  1035.  *  (Set levels_to_search to -1 to search the receiver and all contained
  1036.  *  objects, -- set it to 1 to search the receiver only.)  If
  1037.  *  limit_type is set to "all", objects of all interface types
  1038.  *  are returned, otherwise only objects of the requested interface type
  1039.  *  will be returned.  Only the values "AttributeDef", "ConstantDef",
  1040.  *  "ExceptionDef", "InterfaceDef", "ModuleDef", "ParameterDef",
  1041.  *  "OperationDef", "TypeDef", or "all" may be specified for limit_type.
  1042.  *  If exclude_inherited is set to TRUE, inherited objects will not be
  1043.  *  included in the returned sequence.
  1044.  * 
  1045.  *  You are responsible for freeing the contents of the returned
  1046.  *  sequence when you are finished with it.    Use a code fragment
  1047.  *  similar to the following to free it:
  1048.  * 
  1049.  *       if (containedSeq._length)
  1050.  *           long i;
  1051.  *           for(i=0; i<containedSeq._length; i++)
  1052.  *         SOMObject_somFree(containedSeq._buffer[i]);
  1053.  *           SOMFree (containedSeq._buffer);
  1054.  */
  1055.    return SOM_ResolveD(this,ModuleDef,Container,lookup_name)
  1056.     (this, ev,search_name,levels_to_search,limit_type,exclude_inherited);
  1057. }
  1058.  
  1059.  
  1060. /* method: describe_contents */
  1061. _IDL_SEQUENCE_Container_ContainerDescription   describe_contents(Environment *ev, 
  1062.         Container_InterfaceName limit_type, 
  1063.         boolean exclude_inherited, 
  1064.         long max_returned_objs)
  1065. {
  1066. /*
  1067.  *  Combines the "contents" operation and the "describe" operation.  For
  1068.  *  each object returned by the contents operation, the description of
  1069.  *  the object is returned by invoking its "describe" operation.
  1070.  * 
  1071.  *  Max_returned_objs can be used to limit the number of objects that can
  1072.  *  be returned.  If max_returned_objs is set to -1, results for all
  1073.  *  contained objects will be returned.
  1074.  * 
  1075.  *  Note: You should SOMFree result._buffer when you are done with it
  1076.  *  as well as result._buffer[x].value._value !
  1077.  */
  1078.    return SOM_ResolveD(this,ModuleDef,Container,describe_contents)
  1079.     (this, ev,limit_type,exclude_inherited,max_returned_objs);
  1080. }
  1081.  
  1082.  
  1083.  
  1084. };   /* ModuleDef */
  1085.  
  1086.  
  1087.  
  1088. #endif       /* SOM_ModuleDef_xh */
  1089.