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

  1.  
  2. /*
  3.  * This file was generated by the SOM Compiler.
  4.  * FileName: containr.xh.
  5.  * Generated using:
  6.  *     SOM Precompiler somipc: 2.29.1.17
  7.  *     SOM Emitter emitxh: 2.47
  8.  */
  9.  
  10. #ifndef SOM_Container_xh
  11. #define SOM_Container_xh
  12.  
  13. class Container;
  14.  
  15. /*
  16.  *  CORBA 1.1, 7.5.1, p.131
  17.  * 
  18.  *  Container is a generic interface that is common to all of the
  19.  *  SOM CORBA-compliant Interface Repository (IR) objects that can
  20.  *  be used to hold or contain other objects.  The different types
  21.  *  of Container objects are: ModuleDefs, InterfaceDefs, and OperationDefs,
  22.  */
  23.  
  24. #define Container_MajorVersion 2
  25. #define Container_MinorVersion 3
  26.  
  27. /*
  28.  * Passthru lines: File: "C.xh", "before"
  29.  */
  30.  
  31.     #include <somtcnst.xh>
  32.     #include <stdio.h>
  33.     #include <somir.xh>
  34.     #include <containd.xh>
  35.  
  36.  
  37. /* C++ SOM defs */
  38. #include <somcls.xh>
  39. #include <somcm.xh>
  40.  
  41. /* C++ parent defs */
  42. #ifndef SOM_SOMObject_xh
  43. #include <somobj.xh>
  44. #endif
  45.  
  46. #ifndef Container_API
  47. #define Container_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 Contained;
  59. typedef
  60. string  Container_InterfaceName;
  61. /*
  62.  *  Valid values for InterfaceName are limited to the following set:
  63.  *      {"AttributeDef", "ConstantDef", "ExceptionDef", "InterfaceDef",
  64.  *       "ModuleDef", "ParameterDef", "OperationDef", "TypeDef", "all"}
  65.  */
  66.  
  67. typedef
  68. struct Container_ContainerDescription {
  69. Contained* contained_object;
  70. Identifier name;
  71. any  value;
  72. } Container_ContainerDescription;
  73. #ifndef _IDL_SEQUENCE_Contained_defined
  74. #define _IDL_SEQUENCE_Contained_defined
  75. typedef struct {
  76.     unsigned long _maximum;
  77.     unsigned long _length;
  78.     Contained **_buffer;
  79. } _IDL_SEQUENCE_Contained;
  80. #endif /* _IDL_SEQUENCE_Contained_defined */ 
  81. struct Container_ContainerDescription;
  82. #ifndef _IDL_SEQUENCE_Container_ContainerDescription_defined
  83. #define _IDL_SEQUENCE_Container_ContainerDescription_defined
  84. typedef struct {
  85.     unsigned long _maximum;
  86.     unsigned long _length;
  87.     struct Container_ContainerDescription *_buffer;
  88. } _IDL_SEQUENCE_Container_ContainerDescription;
  89. #endif /* _IDL_SEQUENCE_Container_ContainerDescription_defined */ 
  90.  
  91. #ifndef SOM_DONT_USE_SHORT_NAMES
  92. #ifndef SOMTGD_InterfaceName
  93.     #ifdef InterfaceName
  94.         #undef InterfaceName
  95.         #define SOMTGD_InterfaceName 1
  96.     #else
  97.         #define InterfaceName Container_InterfaceName
  98.     #endif /* InterfaceName */
  99. #endif /* SOMTGD_InterfaceName */
  100. #endif /* SOM_DONT_USE_SHORT_NAMES */
  101.  
  102. #ifndef SOM_DONT_USE_SHORT_NAMES
  103. #ifndef SOMTGD_ContainerDescription
  104.     #ifdef ContainerDescription
  105.         #undef ContainerDescription
  106.         #define SOMTGD_ContainerDescription 1
  107.     #else
  108.         #define ContainerDescription Container_ContainerDescription
  109.     #endif /* ContainerDescription */
  110. #endif /* SOMTGD_ContainerDescription */
  111. #ifndef SOMTGD__IDL_SEQUENCE_ContainerDescription
  112.     #ifdef _IDL_SEQUENCE_ContainerDescription
  113.         #undef _IDL_SEQUENCE_ContainerDescription
  114.         #define SOMTGD__IDL_SEQUENCE_ContainerDescription 1
  115.     #else
  116.         #define _IDL_SEQUENCE_ContainerDescription _IDL_SEQUENCE_Container_ContainerDescription
  117.     #endif /* _IDL_SEQUENCE_ContainerDescription */
  118. #endif /* SOMTGD__IDL_SEQUENCE_ContainerDescription */
  119. #endif /* SOM_DONT_USE_SHORT_NAMES */
  120.  
  121. /*
  122.  * End of bindings for IDL types.
  123.  */
  124.  
  125. /* A procedure to create the Container Class */
  126. SOMEXTERN SOMClass * SOMLINK ContainerNewClass(
  127.         integer4 majorVersion,
  128.         integer4 minorVersion);
  129.  
  130. /* The API to the Container class object, and the methods it introduces. */
  131. SOMEXTERN struct ContainerClassDataStructure {
  132.     SOMClass *classObject;
  133.     somMToken contents;
  134.     somMToken lookup_name;
  135.     somMToken describe_contents;
  136. } SOMDLINK ContainerClassData;
  137. #define _Container ContainerClassData.classObject
  138.  
  139. /* The API to parentMtabs for Container, and the instance data it introduces. */
  140. SOMEXTERN struct ContainerCClassDataStructure {
  141.     somMethodTabs parentMtab;
  142.     somDToken              instanceDataToken;
  143. } SOMDLINK ContainerCClassData;
  144.  
  145. /*
  146.  * -- Typedefs for Container Method Procedures
  147.  */
  148. SOMEXTERN {
  149. typedef _IDL_SEQUENCE_Contained   SOMLINK somTP_Container_contents(Container *somSelf, Environment *ev, 
  150.         Container_InterfaceName limit_type, 
  151.         boolean exclude_inherited);
  152. typedef somTP_Container_contents *somTD_Container_contents;
  153. typedef _IDL_SEQUENCE_Contained   SOMLINK somTP_Container_lookup_name(Container *somSelf, Environment *ev, 
  154.         Identifier search_name, 
  155.         long levels_to_search, 
  156.         Container_InterfaceName limit_type, 
  157.         boolean exclude_inherited);
  158. typedef somTP_Container_lookup_name *somTD_Container_lookup_name;
  159. typedef _IDL_SEQUENCE_Container_ContainerDescription   SOMLINK somTP_Container_describe_contents(Container *somSelf, Environment *ev, 
  160.         Container_InterfaceName limit_type, 
  161.         boolean exclude_inherited, 
  162.         long max_returned_objs);
  163. typedef somTP_Container_describe_contents *somTD_Container_describe_contents;
  164.  
  165. /*
  166.  * -- Typedefs for Reintroduced Wrapper Methods
  167.  */
  168. typedef void   SOMLINK somTP_Container_somDefaultInit(Container *somSelf, 
  169.         som3InitCtrl* ctrl);
  170. typedef somTP_Container_somDefaultInit *somTD_Container_somDefaultInit;
  171. typedef void   SOMLINK somTP_Container_somDestruct(Container *somSelf, 
  172.         octet doFree, 
  173.         som3DestructCtrl* ctrl);
  174. typedef somTP_Container_somDestruct *somTD_Container_somDestruct;
  175. typedef void   SOMLINK somTP_Container_somDefaultCopyInit(Container *somSelf, 
  176.         som3InitCtrl* ctrl, 
  177.         SOMObject* fromObj);
  178. typedef somTP_Container_somDefaultCopyInit *somTD_Container_somDefaultCopyInit;
  179. typedef Container*   SOMLINK somTP_Container_somDefaultAssign(Container *somSelf, 
  180.         som3AssignCtrl* ctrl, 
  181.         SOMObject* fromObj);
  182. typedef somTP_Container_somDefaultAssign *somTD_Container_somDefaultAssign;
  183. typedef void   SOMLINK somTP_Container_somDefaultConstCopyInit(Container *somSelf, 
  184.         som3InitCtrl* ctrl, 
  185.         SOMObject* fromObj);
  186. typedef somTP_Container_somDefaultConstCopyInit *somTD_Container_somDefaultConstCopyInit;
  187. typedef void   SOMLINK somTP_Container_somDefaultVCopyInit(Container *somSelf, 
  188.         som3InitCtrl* ctrl, 
  189.         SOMObject* fromObj);
  190. typedef somTP_Container_somDefaultVCopyInit *somTD_Container_somDefaultVCopyInit;
  191. typedef void   SOMLINK somTP_Container_somDefaultConstVCopyInit(Container *somSelf, 
  192.         som3InitCtrl* ctrl, 
  193.         SOMObject* fromObj);
  194. typedef somTP_Container_somDefaultConstVCopyInit *somTD_Container_somDefaultConstVCopyInit;
  195. typedef Container*   SOMLINK somTP_Container_somDefaultConstAssign(Container *somSelf, 
  196.         som3AssignCtrl* ctrl, 
  197.         SOMObject* fromObj);
  198. typedef somTP_Container_somDefaultConstAssign *somTD_Container_somDefaultConstAssign;
  199. typedef Container*   SOMLINK somTP_Container_somDefaultVAssign(Container *somSelf, 
  200.         som3AssignCtrl* ctrl, 
  201.         SOMObject* fromObj);
  202. typedef somTP_Container_somDefaultVAssign *somTD_Container_somDefaultVAssign;
  203. typedef Container*   SOMLINK somTP_Container_somDefaultConstVAssign(Container *somSelf, 
  204.         som3AssignCtrl* ctrl, 
  205.         SOMObject* fromObj);
  206. typedef somTP_Container_somDefaultConstVAssign *somTD_Container_somDefaultConstVAssign;
  207. typedef void   SOMLINK somTP_Container_somInit(Container *somSelf);
  208. typedef somTP_Container_somInit *somTD_Container_somInit;
  209. typedef void   SOMLINK somTP_Container_somFree(Container *somSelf);
  210. typedef somTP_Container_somFree *somTD_Container_somFree;
  211. typedef void   SOMLINK somTP_Container_somUninit(Container *somSelf);
  212. typedef somTP_Container_somUninit *somTD_Container_somUninit;
  213. typedef SOMClass*   SOMLINK somTP_Container_somGetClass(Container *somSelf);
  214. typedef somTP_Container_somGetClass *somTD_Container_somGetClass;
  215. typedef string   SOMLINK somTP_Container_somGetClassName(Container *somSelf);
  216. typedef somTP_Container_somGetClassName *somTD_Container_somGetClassName;
  217. typedef long   SOMLINK somTP_Container_somGetSize(Container *somSelf);
  218. typedef somTP_Container_somGetSize *somTD_Container_somGetSize;
  219. typedef boolean   SOMLINK somTP_Container_somIsA(Container *somSelf, 
  220.         SOMClass* aClassObj);
  221. typedef somTP_Container_somIsA *somTD_Container_somIsA;
  222. typedef boolean   SOMLINK somTP_Container_somIsInstanceOf(Container *somSelf, 
  223.         SOMClass* aClassObj);
  224. typedef somTP_Container_somIsInstanceOf *somTD_Container_somIsInstanceOf;
  225. typedef boolean   SOMLINK somTP_Container_somRespondsTo(Container *somSelf, 
  226.         somId mId);
  227. typedef somTP_Container_somRespondsTo *somTD_Container_somRespondsTo;
  228. typedef boolean   SOMLINK somTP_Container_somDispatch(Container *somSelf, 
  229.         somToken* retValue, 
  230.         somId methodId, 
  231.         va_list ap);
  232. typedef somTP_Container_somDispatch *somTD_Container_somDispatch;
  233. typedef boolean   SOMLINK somTP_Container_somClassDispatch(Container *somSelf, 
  234.         SOMClass* clsObj, 
  235.         somToken* retValue, 
  236.         somId methodId, 
  237.         va_list ap);
  238. typedef somTP_Container_somClassDispatch *somTD_Container_somClassDispatch;
  239. typedef boolean   SOMLINK somTP_Container_somCastObj(Container *somSelf, 
  240.         SOMClass* cls);
  241. typedef somTP_Container_somCastObj *somTD_Container_somCastObj;
  242. typedef boolean   SOMLINK somTP_Container_somResetObj(Container *somSelf);
  243. typedef somTP_Container_somResetObj *somTD_Container_somResetObj;
  244. typedef void   SOMLINK somTP_Container_somDispatchV(Container *somSelf, 
  245.         somId methodId, 
  246.         somId descriptor, 
  247.         va_list ap);
  248. typedef somTP_Container_somDispatchV *somTD_Container_somDispatchV;
  249. typedef long   SOMLINK somTP_Container_somDispatchL(Container *somSelf, 
  250.         somId methodId, 
  251.         somId descriptor, 
  252.         va_list ap);
  253. typedef somTP_Container_somDispatchL *somTD_Container_somDispatchL;
  254. typedef void*   SOMLINK somTP_Container_somDispatchA(Container *somSelf, 
  255.         somId methodId, 
  256.         somId descriptor, 
  257.         va_list ap);
  258. typedef somTP_Container_somDispatchA *somTD_Container_somDispatchA;
  259. typedef double   SOMLINK somTP_Container_somDispatchD(Container *somSelf, 
  260.         somId methodId, 
  261.         somId descriptor, 
  262.         va_list ap);
  263. typedef somTP_Container_somDispatchD *somTD_Container_somDispatchD;
  264. typedef SOMObject*   SOMLINK somTP_Container_somPrintSelf(Container *somSelf);
  265. typedef somTP_Container_somPrintSelf *somTD_Container_somPrintSelf;
  266. typedef void   SOMLINK somTP_Container_somDumpSelf(Container *somSelf, 
  267.         long level);
  268. typedef somTP_Container_somDumpSelf *somTD_Container_somDumpSelf;
  269. typedef void   SOMLINK somTP_Container_somDumpSelfInt(Container *somSelf, 
  270.         long level);
  271. typedef somTP_Container_somDumpSelfInt *somTD_Container_somDumpSelfInt;
  272. }
  273.  
  274. #endif /* Container_API */
  275.  
  276.  
  277. /*
  278.  * -- This emitter treats Method Tokens as Thunks by default.
  279.  * -- Use the sc modifier "nothunks" to change this default
  280.  */
  281. #undef somresolve_
  282. #define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
  283.  
  284. /*
  285.  * -- The C++ Wrapper Class for Container
  286.  */
  287. class Container : public SOMObject
  288. {
  289. /*
  290.  *  CORBA 1.1, 7.5.1, p.131
  291.  * 
  292.  *  Container is a generic interface that is common to all of the
  293.  *  SOM CORBA-compliant Interface Repository (IR) objects that can
  294.  *  be used to hold or contain other objects.  The different types
  295.  *  of Container objects are: ModuleDefs, InterfaceDefs, and OperationDefs,
  296.  */
  297. public:
  298.  
  299. // Container::new creates the class object if necessary, and then uses somNewNoInit
  300. // to allocate memory and create the object. Initialization is in ctors.
  301. void *operator new(size_t)
  302. {
  303.    if (!_Container) ContainerNewClass(Container_MajorVersion,Container_MinorVersion);
  304.    return (void*)
  305.       SOM_Resolve(_Container,SOMClass,somNewNoInit)
  306.          ((SOMClass *)((void*)_Container));
  307. }
  308.  
  309. // Container::delete uses somDestruct.
  310. void operator delete(void * obj)
  311. {
  312.    if (obj && *(void**)obj) {
  313.       SOM_Resolve(obj,SOMObject,somFree)
  314.          ((SOMObject*)obj);
  315.    }
  316. }
  317.  
  318. Container& operator=(Container& fromObj)
  319. {
  320.    this->somDefaultAssign(0,(SOMObject*)((void*)&fromObj));
  321.    return *this;
  322. }
  323.  
  324. Container()
  325. {
  326.    if (*(void**)this != 
  327.        ((somParentMtabStructPtr)
  328.         (ContainerCClassData.parentMtab))->mtab)
  329.       return;
  330.    ((SOMObject*)((void*)this))->somDefaultInit(0);
  331. }
  332.  
  333. Container(Container* fromObj)
  334. {
  335.    if (*(void**)this != 
  336.        ((somParentMtabStructPtr)
  337.         (ContainerCClassData.parentMtab))->mtab)
  338.       return;
  339.    ((SOMObject*)((void*)this))->somDefaultCopyInit(0,((SOMObject*)((void*)fromObj)));
  340. }
  341.  
  342. #ifdef __IBMCPP__
  343. #pragma info(nocnv,nopar)
  344. #endif
  345. Container(const Container* fromObj)
  346. {
  347.    if (*(void**)this != 
  348.        ((somParentMtabStructPtr)
  349.         (ContainerCClassData.parentMtab))->mtab)
  350.       return;
  351.    ((SOMObject*)((void*)this))->somDefaultConstCopyInit(0,((SOMObject*)((void*)fromObj)));
  352. }
  353. #ifdef __IBMCPP__
  354. #pragma info(restore)
  355. #endif
  356.  
  357.  
  358. /* method: contents */
  359. _IDL_SEQUENCE_Contained   contents(Environment *ev, 
  360.         Container_InterfaceName limit_type, 
  361.         boolean exclude_inherited)
  362. {
  363. /*
  364.  *  Returns a list of objects contained by the receiving object.
  365.  *  This operation is used to navigate thru the hierarchy of objects.
  366.  *  Starting with the Repository object, use this operation to list
  367.  *  all of the objects in the Repository, then all of the objects
  368.  *  within the ModuleDef objects, then all of the objects in the
  369.  *  InterfaceDefs, etc.
  370.  * 
  371.  *  If restrict_type is set to "all", objects of all interface types
  372.  *  are returned, otherwise only objects of the requested interface type
  373.  *  will be returned.  If exclude_inherited is set to TRUE, inherited
  374.  *  objects, if any, will not be returned.
  375.  * 
  376.  *  You are responsible for freeing the contents of the returned
  377.  *  sequence when you are finished with it.    Use a code fragment
  378.  *  similar to the following to free it:
  379.  * 
  380.  *       if (containedSeq._length)
  381.  *           long i;
  382.  *           for(i=0; i<containedSeq._length; i++)
  383.  *         SOMObject_somFree(containedSeq._buffer[i]);
  384.  *           SOMFree (containedSeq._buffer);
  385.  */
  386.    return SOM_ResolveD(this,Container,Container,contents)
  387.     (this, ev,limit_type,exclude_inherited);
  388. }
  389.  
  390.  
  391. /* method: lookup_name */
  392. _IDL_SEQUENCE_Contained   lookup_name(Environment *ev, 
  393.         Identifier search_name, 
  394.         long levels_to_search, 
  395.         Container_InterfaceName limit_type, 
  396.         boolean exclude_inherited)
  397. {
  398. /*
  399.  *  Locates an object by name within the receiving object, or within
  400.  *  objects contained in the receiving object.  Search_name specifies
  401.  *  the name of the object to be found.  Levels_to_search controls
  402.  *  whether the lookup is constrained to the receiving object or
  403.  *  whether it includes objects contained withing the receiving object.
  404.  *  (Set levels_to_search to -1 to search the receiver and all contained
  405.  *  objects, -- set it to 1 to search the receiver only.)  If
  406.  *  limit_type is set to "all", objects of all interface types
  407.  *  are returned, otherwise only objects of the requested interface type
  408.  *  will be returned.  Only the values "AttributeDef", "ConstantDef",
  409.  *  "ExceptionDef", "InterfaceDef", "ModuleDef", "ParameterDef",
  410.  *  "OperationDef", "TypeDef", or "all" may be specified for limit_type.
  411.  *  If exclude_inherited is set to TRUE, inherited objects will not be
  412.  *  included in the returned sequence.
  413.  * 
  414.  *  You are responsible for freeing the contents of the returned
  415.  *  sequence when you are finished with it.    Use a code fragment
  416.  *  similar to the following to free it:
  417.  * 
  418.  *       if (containedSeq._length)
  419.  *           long i;
  420.  *           for(i=0; i<containedSeq._length; i++)
  421.  *         SOMObject_somFree(containedSeq._buffer[i]);
  422.  *           SOMFree (containedSeq._buffer);
  423.  */
  424.    return SOM_ResolveD(this,Container,Container,lookup_name)
  425.     (this, ev,search_name,levels_to_search,limit_type,exclude_inherited);
  426. }
  427.  
  428.  
  429. /* method: describe_contents */
  430. _IDL_SEQUENCE_Container_ContainerDescription   describe_contents(Environment *ev, 
  431.         Container_InterfaceName limit_type, 
  432.         boolean exclude_inherited, 
  433.         long max_returned_objs)
  434. {
  435. /*
  436.  *  Combines the "contents" operation and the "describe" operation.  For
  437.  *  each object returned by the contents operation, the description of
  438.  *  the object is returned by invoking its "describe" operation.
  439.  * 
  440.  *  Max_returned_objs can be used to limit the number of objects that can
  441.  *  be returned.  If max_returned_objs is set to -1, results for all
  442.  *  contained objects will be returned.
  443.  * 
  444.  *  Note: You should SOMFree result._buffer when you are done with it
  445.  *  as well as result._buffer[x].value._value !
  446.  */
  447.    return SOM_ResolveD(this,Container,Container,describe_contents)
  448.     (this, ev,limit_type,exclude_inherited,max_returned_objs);
  449. }
  450.  
  451.  
  452. /*
  453.  * Reintroduce inherited methods
  454.  */
  455.  
  456. /* initializer method: somDefaultInit */
  457. void   somDefaultInit(som3InitCtrl* ctrl)
  458. {
  459. /*
  460.  *  A default initializer for a SOM object. Passing a null ctrl
  461.  *  indicates to the receiver that its class is the class of the
  462.  *  object being initialized, whereby the initializer will determine
  463.  *  an appropriate control structure.
  464.  */
  465.    SOM_ResolveD(this,Container,SOMObject,somDefaultInit)
  466.     (this,ctrl);
  467. }
  468.  
  469.  
  470. /* method: somDestruct */
  471. void   somDestruct(octet doFree, 
  472.         som3DestructCtrl* ctrl)
  473. {
  474. /*
  475.  *  The default destructor for a SOM object. A nonzero <doFree>
  476.  *  indicates that the object storage should be freed by the
  477.  *  object's class (via somDeallocate) after uninitialization.
  478.  *  As with somDefaultInit, a null ctrl can be passed.
  479.  */
  480.    SOM_ResolveD(this,Container,SOMObject,somDestruct)
  481.     (this,doFree,ctrl);
  482. }
  483.  
  484.  
  485. /* initializer method: somDefaultCopyInit */
  486. void   somDefaultCopyInit(som3InitCtrl* ctrl, 
  487.         SOMObject* fromObj)
  488. {
  489. /*
  490.  *  A default copy constructor. Use this to make copies of objects for
  491.  *  calling methods with "by-value" argument semantics.
  492.  */
  493.    SOM_ResolveD(this,Container,SOMObject,somDefaultCopyInit)
  494.     (this,ctrl,fromObj);
  495. }
  496.  
  497.  
  498. /* method: somDefaultAssign */
  499. Container*  somDefaultAssign(som3AssignCtrl* ctrl, 
  500.         SOMObject* fromObj)
  501. {
  502. /*
  503.  *  A default assignment operator. Use this to "assign" the state of one
  504.  *  object to another.
  505.  */
  506.    return SOM_ResolveD(this,Container,SOMObject,somDefaultAssign)
  507.     (this,ctrl,fromObj);
  508. }
  509.  
  510.  
  511. /* initializer method: somDefaultConstCopyInit */
  512. void   somDefaultConstCopyInit(som3InitCtrl* ctrl, 
  513.         SOMObject* fromObj)
  514. {
  515. /*
  516.  *  A default copy constructor that uses a const fromObj.
  517.  */
  518.    SOM_ResolveD(this,Container,SOMObject,somDefaultConstCopyInit)
  519.     (this,ctrl,fromObj);
  520. }
  521.  
  522.  
  523. /* initializer method: somDefaultVCopyInit */
  524. void   somDefaultVCopyInit(som3InitCtrl* ctrl, 
  525.         SOMObject* fromObj)
  526. {
  527. /*
  528.  *  A default copy constructor that uses a volatile fromObj.
  529.  */
  530.    SOM_ResolveD(this,Container,SOMObject,somDefaultVCopyInit)
  531.     (this,ctrl,fromObj);
  532. }
  533.  
  534.  
  535. /* initializer method: somDefaultConstVCopyInit */
  536. void   somDefaultConstVCopyInit(som3InitCtrl* ctrl, 
  537.         SOMObject* fromObj)
  538. {
  539. /*
  540.  *  A default copy constructor that uses a const volatile fromObj.
  541.  */
  542.    SOM_ResolveD(this,Container,SOMObject,somDefaultConstVCopyInit)
  543.     (this,ctrl,fromObj);
  544. }
  545.  
  546.  
  547. /* method: somDefaultConstAssign */
  548. Container*  somDefaultConstAssign(som3AssignCtrl* ctrl, 
  549.         SOMObject* fromObj)
  550. {
  551. /*
  552.  *  A default assignment operator that uses a const fromObj.
  553.  */
  554.    return SOM_ResolveD(this,Container,SOMObject,somDefaultConstAssign)
  555.     (this,ctrl,fromObj);
  556. }
  557.  
  558.  
  559. /* method: somDefaultVAssign */
  560. Container*  somDefaultVAssign(som3AssignCtrl* ctrl, 
  561.         SOMObject* fromObj)
  562. {
  563. /*
  564.  *  A default assignment operator that uses a volatile fromObj.
  565.  */
  566.    return SOM_ResolveD(this,Container,SOMObject,somDefaultVAssign)
  567.     (this,ctrl,fromObj);
  568. }
  569.  
  570.  
  571. /* method: somDefaultConstVAssign */
  572. Container*  somDefaultConstVAssign(som3AssignCtrl* ctrl, 
  573.         SOMObject* fromObj)
  574. {
  575. /*
  576.  *  A default assignment operator that uses a const volatile fromObj.
  577.  */
  578.    return SOM_ResolveD(this,Container,SOMObject,somDefaultConstVAssign)
  579.     (this,ctrl,fromObj);
  580. }
  581.  
  582.  
  583. /* method: somInit */
  584. void   somInit()
  585. {
  586. /*
  587.  *  Obsolete but still supported. Override somDefaultInit instead of somInit.
  588.  */
  589.    SOM_ResolveD(this,Container,SOMObject,somInit)
  590.     (this);
  591. }
  592.  
  593.  
  594. /* method: somFree */
  595. void   somFree()
  596. {
  597. /*
  598.  *  Use as directed by framework implementations.
  599.  */
  600.    SOM_ResolveD(this,Container,SOMObject,somFree)
  601.     (this);
  602. }
  603.  
  604.  
  605. /* method: somUninit */
  606. void   somUninit()
  607. {
  608. /*
  609.  *  Obsolete but still supported. Override somDestruct instead of somUninit.
  610.  */
  611.    SOM_ResolveD(this,Container,SOMObject,somUninit)
  612.     (this);
  613. }
  614.  
  615.  
  616. /* method: somGetClass */
  617. SOMClass*   somGetClass()
  618. {
  619. /*
  620.  *  Return the receiver's class.
  621.  */
  622.    return SOM_ResolveD(this,Container,SOMObject,somGetClass)
  623.     (this);
  624. }
  625.  
  626.  
  627. /* method: somGetClassName */
  628. string   somGetClassName()
  629. {
  630. /*
  631.  *  Return the name of the receiver's class.
  632.  */
  633.    return SOM_ResolveD(this,Container,SOMObject,somGetClassName)
  634.     (this);
  635. }
  636.  
  637.  
  638. /* method: somGetSize */
  639. long   somGetSize()
  640. {
  641. /*
  642.  *  Return the size of the receiver.
  643.  */
  644.    return SOM_ResolveD(this,Container,SOMObject,somGetSize)
  645.     (this);
  646. }
  647.  
  648.  
  649. /* method: somIsA */
  650. boolean   somIsA(SOMClass* aClassObj)
  651. {
  652. /*
  653.  *  Returns 1 (true) if the receiver responds to methods
  654.  *  introduced by <aClassObj>, and 0 (false) otherwise.
  655.  */
  656.    return SOM_ResolveD(this,Container,SOMObject,somIsA)
  657.     (this,aClassObj);
  658. }
  659.  
  660.  
  661. /* method: somIsInstanceOf */
  662. boolean   somIsInstanceOf(SOMClass* aClassObj)
  663. {
  664. /*
  665.  *  Returns 1 (true) if the receiver is an instance of
  666.  *  <aClassObj> and 0 (false) otherwise.
  667.  */
  668.    return SOM_ResolveD(this,Container,SOMObject,somIsInstanceOf)
  669.     (this,aClassObj);
  670. }
  671.  
  672.  
  673. /* method: somRespondsTo */
  674. boolean   somRespondsTo(somId mId)
  675. {
  676. /*
  677.  *  Returns 1 (true) if the indicated method can be invoked
  678.  *  on the receiver and 0 (false) otherwise.
  679.  */
  680.    return SOM_ResolveD(this,Container,SOMObject,somRespondsTo)
  681.     (this,mId);
  682. }
  683.  
  684.  
  685. /* va_list method: somDispatch */
  686.  
  687. /*
  688.  *  This method provides a generic, class-specific dispatch mechanism.
  689.  *  It accepts as input <retValue> a pointer to the memory area to be
  690.  *  loaded with the result of dispatching the method indicated by
  691.  *  <methodId> using the arguments in <ap>. <ap> contains the object
  692.  *  on which the method is to be invoked as the first argument.
  693.  */
  694. /* the va_list invocation form */
  695. boolean   Container_somDispatch(somToken* retValue, 
  696.         somId methodId, 
  697.         va_list ap)
  698. {return SOM_ResolveD(this,Container,SOMObject,somDispatch)
  699.     (this,retValue,methodId,ap);
  700. }
  701.  
  702. /* the varargs invocation form */
  703. boolean   somDispatch(somToken* retValue, 
  704.         somId methodId, 
  705.         ...)
  706. {
  707. /*
  708.  *  This method provides a generic, class-specific dispatch mechanism.
  709.  *  It accepts as input <retValue> a pointer to the memory area to be
  710.  *  loaded with the result of dispatching the method indicated by
  711.  *  <methodId> using the arguments in <ap>. <ap> contains the object
  712.  *  on which the method is to be invoked as the first argument.
  713.  */
  714.    va_list ap;
  715.    va_start(ap, methodId);
  716.    boolean __somResult = 
  717.       SOM_ResolveD(this,Container,SOMObject,somDispatch)
  718.     (this,retValue,methodId,ap);
  719.    va_end(ap);
  720.    return __somResult;
  721. }
  722.  
  723.  
  724. /* va_list method: somClassDispatch */
  725.  
  726. /*
  727.  *  Like somDispatch, but method resolution for static methods is done
  728.  *  according to the clsObj instance method table.
  729.  */
  730. /* the va_list invocation form */
  731. boolean   Container_somClassDispatch(SOMClass* clsObj, 
  732.         somToken* retValue, 
  733.         somId methodId, 
  734.         va_list ap)
  735. {return SOM_ResolveD(this,Container,SOMObject,somClassDispatch)
  736.     (this,clsObj,retValue,methodId,ap);
  737. }
  738.  
  739. /* the varargs invocation form */
  740. boolean   somClassDispatch(SOMClass* clsObj, 
  741.         somToken* retValue, 
  742.         somId methodId, 
  743.         ...)
  744. {
  745. /*
  746.  *  Like somDispatch, but method resolution for static methods is done
  747.  *  according to the clsObj instance method table.
  748.  */
  749.    va_list ap;
  750.    va_start(ap, methodId);
  751.    boolean __somResult = 
  752.       SOM_ResolveD(this,Container,SOMObject,somClassDispatch)
  753.     (this,clsObj,retValue,methodId,ap);
  754.    va_end(ap);
  755.    return __somResult;
  756. }
  757.  
  758.  
  759. /* method: somCastObj */
  760. boolean   somCastObj(SOMClass* cls)
  761. {
  762. /*
  763.  *  cast the receiving object to cls (which must be an ancestor of the
  764.  *  objects true class. Returns true on success.
  765.  */
  766.    return SOM_ResolveD(this,Container,SOMObject,somCastObj)
  767.     (this,cls);
  768. }
  769.  
  770.  
  771. /* method: somResetObj */
  772. boolean   somResetObj()
  773. {
  774. /*
  775.  *  reset an object to its true class. Returns true always.
  776.  */
  777.    return SOM_ResolveD(this,Container,SOMObject,somResetObj)
  778.     (this);
  779. }
  780.  
  781.  
  782. /* va_list method: somDispatchV */
  783.  
  784. /*
  785.  *  Obsolete. Use somDispatch instead.
  786.  */
  787. /* the va_list invocation form */
  788. void   Container_somDispatchV(somId methodId, 
  789.         somId descriptor, 
  790.         va_list ap)
  791. {   SOM_ResolveD(this,Container,SOMObject,somDispatchV)
  792.     (this,methodId,descriptor,ap);
  793. }
  794.  
  795. /* the varargs invocation form */
  796. void   somDispatchV(somId methodId, 
  797.         somId descriptor, 
  798.         ...)
  799. {
  800. /*
  801.  *  Obsolete. Use somDispatch instead.
  802.  */
  803.    va_list ap;
  804.    va_start(ap, descriptor);
  805.    SOM_ResolveD(this,Container,SOMObject,somDispatchV)
  806.     (this,methodId,descriptor,ap);
  807.    va_end(ap);
  808. }
  809.  
  810.  
  811. /* va_list method: somDispatchL */
  812.  
  813. /*
  814.  *  Obsolete. Use somDispatch instead.
  815.  */
  816. /* the va_list invocation form */
  817. long   Container_somDispatchL(somId methodId, 
  818.         somId descriptor, 
  819.         va_list ap)
  820. {return SOM_ResolveD(this,Container,SOMObject,somDispatchL)
  821.     (this,methodId,descriptor,ap);
  822. }
  823.  
  824. /* the varargs invocation form */
  825. long   somDispatchL(somId methodId, 
  826.         somId descriptor, 
  827.         ...)
  828. {
  829. /*
  830.  *  Obsolete. Use somDispatch instead.
  831.  */
  832.    va_list ap;
  833.    va_start(ap, descriptor);
  834.    long __somResult = 
  835.       SOM_ResolveD(this,Container,SOMObject,somDispatchL)
  836.     (this,methodId,descriptor,ap);
  837.    va_end(ap);
  838.    return __somResult;
  839. }
  840.  
  841.  
  842. /* va_list method: somDispatchA */
  843.  
  844. /*
  845.  *  Obsolete. Use somDispatch instead.
  846.  */
  847. /* the va_list invocation form */
  848. void*   Container_somDispatchA(somId methodId, 
  849.         somId descriptor, 
  850.         va_list ap)
  851. {return SOM_ResolveD(this,Container,SOMObject,somDispatchA)
  852.     (this,methodId,descriptor,ap);
  853. }
  854.  
  855. /* the varargs invocation form */
  856. void*   somDispatchA(somId methodId, 
  857.         somId descriptor, 
  858.         ...)
  859. {
  860. /*
  861.  *  Obsolete. Use somDispatch instead.
  862.  */
  863.    va_list ap;
  864.    va_start(ap, descriptor);
  865.    void* __somResult = 
  866.       SOM_ResolveD(this,Container,SOMObject,somDispatchA)
  867.     (this,methodId,descriptor,ap);
  868.    va_end(ap);
  869.    return __somResult;
  870. }
  871.  
  872.  
  873. /* va_list method: somDispatchD */
  874.  
  875. /*
  876.  *  Obsolete. Use somDispatch instead.
  877.  */
  878. /* the va_list invocation form */
  879. double   Container_somDispatchD(somId methodId, 
  880.         somId descriptor, 
  881.         va_list ap)
  882. {return SOM_ResolveD(this,Container,SOMObject,somDispatchD)
  883.     (this,methodId,descriptor,ap);
  884. }
  885.  
  886. /* the varargs invocation form */
  887. double   somDispatchD(somId methodId, 
  888.         somId descriptor, 
  889.         ...)
  890. {
  891. /*
  892.  *  Obsolete. Use somDispatch instead.
  893.  */
  894.    va_list ap;
  895.    va_start(ap, descriptor);
  896.    double __somResult = 
  897.       SOM_ResolveD(this,Container,SOMObject,somDispatchD)
  898.     (this,methodId,descriptor,ap);
  899.    va_end(ap);
  900.    return __somResult;
  901. }
  902.  
  903.  
  904. /* method: somPrintSelf */
  905. SOMObject*   somPrintSelf()
  906. {
  907. /*
  908.  *  Uses <SOMOutCharRoutine> to write a brief string with identifying
  909.  *  information about this object.  The default implementation just gives
  910.  *  the object's class name and its address in memory.
  911.  *  <self> is returned.
  912.  */
  913.    return SOM_ResolveD(this,Container,SOMObject,somPrintSelf)
  914.     (this);
  915. }
  916.  
  917.  
  918. /* method: somDumpSelf */
  919. void   somDumpSelf(long level)
  920. {
  921. /*
  922.  *  Uses <SOMOutCharRoutine> to write a detailed description of this object
  923.  *  and its current state.
  924.  * 
  925.  *  <level> indicates the nesting level for describing compound objects
  926.  *  it must be greater than or equal to zero.  All lines in the
  927.  *  description will be preceeded by <2*level> spaces.
  928.  * 
  929.  *  This routine only actually writes the data that concerns the object
  930.  *  as a whole, such as class, and uses <somDumpSelfInt> to describe
  931.  *  the object's current state.  This approach allows readable
  932.  *  descriptions of compound objects to be constructed.
  933.  * 
  934.  *  Generally it is not necessary to override this method, if it is
  935.  *  overriden it generally must be completely replaced.
  936.  */
  937.    SOM_ResolveD(this,Container,SOMObject,somDumpSelf)
  938.     (this,level);
  939. }
  940.  
  941.  
  942. /* method: somDumpSelfInt */
  943. void   somDumpSelfInt(long level)
  944. {
  945. /*
  946.  *  Uses <SOMOutCharRoutine> to write in the current state of this object.
  947.  *  Generally this method will need to be overridden.  When overriding
  948.  *  it, begin by calling the parent class form of this method and then
  949.  *  write in a description of your class's instance data. This will
  950.  *  result in a description of all the object's instance data going
  951.  *  from its root ancestor class to its specific class.
  952.  */
  953.    SOM_ResolveD(this,Container,SOMObject,somDumpSelfInt)
  954.     (this,level);
  955. }
  956.  
  957.  
  958.  
  959. };   /* Container */
  960.  
  961.  
  962.  
  963. #endif       /* SOM_Container_xh */
  964.