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

  1.  
  2. /*
  3.  * This file was generated by the SOM Compiler.
  4.  * FileName: request.xh.
  5.  * Generated using:
  6.  *     SOM Precompiler somipc: 2.29.1.17
  7.  *     SOM Emitter emitxh: 2.47
  8.  */
  9.  
  10. /*
  11.  *    IDL interface spec for CORBA Request object.
  12.  */
  13.  
  14.  
  15. #ifndef SOM_Request_xh
  16. #define SOM_Request_xh
  17.  
  18. class Request;
  19.  
  20. #define Request_MajorVersion 2
  21. #define Request_MinorVersion 1
  22.  
  23. /* C++ SOM defs */
  24. #include <somcls.xh>
  25. #include <somcm.xh>
  26.  
  27. /* C++ parent defs */
  28. #ifndef SOM_SOMObject_xh
  29. #include <somobj.xh>
  30. #endif
  31.  
  32. #ifndef Request_API
  33. #define Request_API
  34. /*
  35.  * -- The Class API
  36.  */
  37.  
  38. /*
  39.  * Start of bindings for IDL types
  40.  */
  41.  
  42. class SOMClass;
  43. class SOMObject;
  44. class Container;
  45.  
  46. /*
  47.  * End of bindings for IDL types.
  48.  */
  49.  
  50. /*
  51.  * Passthru lines: File: "C.xh", "after"
  52.  */
  53. /*
  54.  *  Flags defined on requests
  55.  */
  56.  
  57. #define ARG_IN        0x00000001      /* defined in somir.h */
  58. #define ARG_OUT        0x00000002    /* defined in somir.h */
  59. #define ARG_INOUT    0x00000004    /* defined in somir.h */
  60. #define IN_COPY_VALUE    0x00000008    /* add_arg flag */
  61. #define DEPENDENT_LIST    0x00000010    /* add_item flag */
  62. #define OUT_LIST_MEMORY    0x00000020    /* req flag */
  63. #define INV_NO_RESPONSE    0x00000040    /* invoke flag */
  64. #define INV_TERM_ON_ERR    0x00000080    /* invoke flag */
  65. #define RESP_NO_WAIT    0x00000100    /* response flag */
  66. /* Internal Use Flags */
  67. #define AUTH_IN_MSG      0x00010000      /* msg includes auth info */
  68. #define ACKONEWAY        0x00020000      /* ack oneway messages */
  69. #define ENV_IN_MSG       0x00040000      /* msg includes env info */
  70. #define CTX_IN_MSG       0x00080000      /* msg includes ctx info */
  71. #define OBJ_OWNED        0x00100000    /* arg. mem. is obj. owned */
  72. #define CALLER_OWNED     0x00200000    /* arg mem is caller owned */
  73. #define RESULT_OUT       0x00400000    /* method result, not arg  */
  74. #define CLIENT_SIDE      0x00800000    /* client side of request */
  75. #define SERVER_SIDE      0x01000000    /* server side of request */
  76. #define TXCTX_IN_MSG     0x02000000      /* msg includes trans info */
  77. #define ARG_IS_PTRARG    0x10000000      /* ptr to arg, !aggregate */
  78. #define ARG_IS_COMPONENT 0x20000000      /* comp of aggregate type */
  79. #define ROOT_NOT_PTRARG  0x40000000      /* root struct not ptr */
  80. #define RESERVED_FLAGS    0x8c00fe00    /* future/internal use */
  81.  
  82. class Request;
  83. /*
  84.  *  Functions for multiple deferred-synchronous requests.
  85.  */
  86. ORBStatus SOMLINK send_multiple_requests (
  87.     IN    Request*    reqs[],        /* array of Requests */
  88.     IN    Environment    *env,
  89.     IN    long        count,        /* number of Requests */
  90.     IN    Flags        invoke_flags
  91.     );
  92.  
  93. ORBStatus SOMLINK get_next_response (
  94.     INOUT    Environment    *env,
  95.     IN    Flags        response_flags,
  96.     OUT    Request*    *req
  97. );
  98.  
  99.  
  100. /* A procedure to create the Request Class */
  101. SOMEXTERN SOMClass * SOMLINK RequestNewClass(
  102.         integer4 majorVersion,
  103.         integer4 minorVersion);
  104.  
  105. /* The API to the Request class object, and the methods it introduces. */
  106. SOMEXTERN struct RequestClassDataStructure {
  107.     SOMClass *classObject;
  108.     somMToken add_arg;
  109.     somMToken invoke;
  110.     somMToken send;
  111.     somMToken get_response;
  112.     somMToken destroy;
  113.     somMToken _get_objref;
  114.     somMToken _set_objref;
  115.     somMToken _get_ctx;
  116.     somMToken _set_ctx;
  117.     somMToken _get_operation;
  118.     somMToken _set_operation;
  119.     somMToken _get_argument_list;
  120.     somMToken _set_argument_list;
  121.     somMToken _get_return_result;
  122.     somMToken _set_return_result;
  123.     somMToken _get_req_flags;
  124.     somMToken _set_req_flags;
  125.     somMToken _get_env;
  126.     somMToken _set_env;
  127. } SOMDLINK RequestClassData;
  128. #define _Request RequestClassData.classObject
  129.  
  130. /* The API to parentMtabs for Request, and the instance data it introduces. */
  131. SOMEXTERN struct RequestCClassDataStructure {
  132.     somMethodTabs parentMtab;
  133.     somDToken              instanceDataToken;
  134. } SOMDLINK RequestCClassData;
  135.  
  136. /*
  137.  * -- Typedefs for Request Method Procedures
  138.  */
  139. SOMEXTERN {
  140. typedef ORBStatus   SOMLINK somTP_Request_add_arg(Request *somSelf, Environment *ev, 
  141.         Identifier name, 
  142.         TypeCode arg_type, 
  143.         void* value, 
  144.         long len, 
  145.         Flags arg_flags);
  146. typedef somTP_Request_add_arg *somTD_Request_add_arg;
  147. typedef ORBStatus   SOMLINK somTP_Request_invoke(Request *somSelf, Environment *ev, 
  148.         Flags invoke_flags);
  149. typedef somTP_Request_invoke *somTD_Request_invoke;
  150. typedef ORBStatus   SOMLINK somTP_Request_send(Request *somSelf, Environment *ev, 
  151.         Flags invoke_flags);
  152. typedef somTP_Request_send *somTD_Request_send;
  153. typedef ORBStatus   SOMLINK somTP_Request_get_response(Request *somSelf, Environment *ev, 
  154.         Flags response_flags);
  155. typedef somTP_Request_get_response *somTD_Request_get_response;
  156. typedef ORBStatus   SOMLINK somTP_Request_destroy(Request *somSelf, Environment *ev);
  157. typedef somTP_Request_destroy *somTD_Request_destroy;
  158.  
  159. /*
  160.  * -- Typedefs for Reintroduced Wrapper Methods
  161.  */
  162. typedef void   SOMLINK somTP_Request_somDefaultInit(Request *somSelf, 
  163.         som3InitCtrl* ctrl);
  164. typedef somTP_Request_somDefaultInit *somTD_Request_somDefaultInit;
  165. typedef void   SOMLINK somTP_Request_somDestruct(Request *somSelf, 
  166.         octet doFree, 
  167.         som3DestructCtrl* ctrl);
  168. typedef somTP_Request_somDestruct *somTD_Request_somDestruct;
  169. typedef void   SOMLINK somTP_Request_somDefaultCopyInit(Request *somSelf, 
  170.         som3InitCtrl* ctrl, 
  171.         SOMObject* fromObj);
  172. typedef somTP_Request_somDefaultCopyInit *somTD_Request_somDefaultCopyInit;
  173. typedef Request*   SOMLINK somTP_Request_somDefaultAssign(Request *somSelf, 
  174.         som3AssignCtrl* ctrl, 
  175.         SOMObject* fromObj);
  176. typedef somTP_Request_somDefaultAssign *somTD_Request_somDefaultAssign;
  177. typedef void   SOMLINK somTP_Request_somDefaultConstCopyInit(Request *somSelf, 
  178.         som3InitCtrl* ctrl, 
  179.         SOMObject* fromObj);
  180. typedef somTP_Request_somDefaultConstCopyInit *somTD_Request_somDefaultConstCopyInit;
  181. typedef void   SOMLINK somTP_Request_somDefaultVCopyInit(Request *somSelf, 
  182.         som3InitCtrl* ctrl, 
  183.         SOMObject* fromObj);
  184. typedef somTP_Request_somDefaultVCopyInit *somTD_Request_somDefaultVCopyInit;
  185. typedef void   SOMLINK somTP_Request_somDefaultConstVCopyInit(Request *somSelf, 
  186.         som3InitCtrl* ctrl, 
  187.         SOMObject* fromObj);
  188. typedef somTP_Request_somDefaultConstVCopyInit *somTD_Request_somDefaultConstVCopyInit;
  189. typedef Request*   SOMLINK somTP_Request_somDefaultConstAssign(Request *somSelf, 
  190.         som3AssignCtrl* ctrl, 
  191.         SOMObject* fromObj);
  192. typedef somTP_Request_somDefaultConstAssign *somTD_Request_somDefaultConstAssign;
  193. typedef Request*   SOMLINK somTP_Request_somDefaultVAssign(Request *somSelf, 
  194.         som3AssignCtrl* ctrl, 
  195.         SOMObject* fromObj);
  196. typedef somTP_Request_somDefaultVAssign *somTD_Request_somDefaultVAssign;
  197. typedef Request*   SOMLINK somTP_Request_somDefaultConstVAssign(Request *somSelf, 
  198.         som3AssignCtrl* ctrl, 
  199.         SOMObject* fromObj);
  200. typedef somTP_Request_somDefaultConstVAssign *somTD_Request_somDefaultConstVAssign;
  201. typedef void   SOMLINK somTP_Request_somInit(Request *somSelf);
  202. typedef somTP_Request_somInit *somTD_Request_somInit;
  203. typedef void   SOMLINK somTP_Request_somFree(Request *somSelf);
  204. typedef somTP_Request_somFree *somTD_Request_somFree;
  205. typedef void   SOMLINK somTP_Request_somUninit(Request *somSelf);
  206. typedef somTP_Request_somUninit *somTD_Request_somUninit;
  207. typedef SOMClass*   SOMLINK somTP_Request_somGetClass(Request *somSelf);
  208. typedef somTP_Request_somGetClass *somTD_Request_somGetClass;
  209. typedef string   SOMLINK somTP_Request_somGetClassName(Request *somSelf);
  210. typedef somTP_Request_somGetClassName *somTD_Request_somGetClassName;
  211. typedef long   SOMLINK somTP_Request_somGetSize(Request *somSelf);
  212. typedef somTP_Request_somGetSize *somTD_Request_somGetSize;
  213. typedef boolean   SOMLINK somTP_Request_somIsA(Request *somSelf, 
  214.         SOMClass* aClassObj);
  215. typedef somTP_Request_somIsA *somTD_Request_somIsA;
  216. typedef boolean   SOMLINK somTP_Request_somIsInstanceOf(Request *somSelf, 
  217.         SOMClass* aClassObj);
  218. typedef somTP_Request_somIsInstanceOf *somTD_Request_somIsInstanceOf;
  219. typedef boolean   SOMLINK somTP_Request_somRespondsTo(Request *somSelf, 
  220.         somId mId);
  221. typedef somTP_Request_somRespondsTo *somTD_Request_somRespondsTo;
  222. typedef boolean   SOMLINK somTP_Request_somDispatch(Request *somSelf, 
  223.         somToken* retValue, 
  224.         somId methodId, 
  225.         va_list ap);
  226. typedef somTP_Request_somDispatch *somTD_Request_somDispatch;
  227. typedef boolean   SOMLINK somTP_Request_somClassDispatch(Request *somSelf, 
  228.         SOMClass* clsObj, 
  229.         somToken* retValue, 
  230.         somId methodId, 
  231.         va_list ap);
  232. typedef somTP_Request_somClassDispatch *somTD_Request_somClassDispatch;
  233. typedef boolean   SOMLINK somTP_Request_somCastObj(Request *somSelf, 
  234.         SOMClass* cls);
  235. typedef somTP_Request_somCastObj *somTD_Request_somCastObj;
  236. typedef boolean   SOMLINK somTP_Request_somResetObj(Request *somSelf);
  237. typedef somTP_Request_somResetObj *somTD_Request_somResetObj;
  238. typedef void   SOMLINK somTP_Request_somDispatchV(Request *somSelf, 
  239.         somId methodId, 
  240.         somId descriptor, 
  241.         va_list ap);
  242. typedef somTP_Request_somDispatchV *somTD_Request_somDispatchV;
  243. typedef long   SOMLINK somTP_Request_somDispatchL(Request *somSelf, 
  244.         somId methodId, 
  245.         somId descriptor, 
  246.         va_list ap);
  247. typedef somTP_Request_somDispatchL *somTD_Request_somDispatchL;
  248. typedef void*   SOMLINK somTP_Request_somDispatchA(Request *somSelf, 
  249.         somId methodId, 
  250.         somId descriptor, 
  251.         va_list ap);
  252. typedef somTP_Request_somDispatchA *somTD_Request_somDispatchA;
  253. typedef double   SOMLINK somTP_Request_somDispatchD(Request *somSelf, 
  254.         somId methodId, 
  255.         somId descriptor, 
  256.         va_list ap);
  257. typedef somTP_Request_somDispatchD *somTD_Request_somDispatchD;
  258. typedef SOMObject*   SOMLINK somTP_Request_somPrintSelf(Request *somSelf);
  259. typedef somTP_Request_somPrintSelf *somTD_Request_somPrintSelf;
  260. typedef void   SOMLINK somTP_Request_somDumpSelf(Request *somSelf, 
  261.         long level);
  262. typedef somTP_Request_somDumpSelf *somTD_Request_somDumpSelf;
  263. typedef void   SOMLINK somTP_Request_somDumpSelfInt(Request *somSelf, 
  264.         long level);
  265. typedef somTP_Request_somDumpSelfInt *somTD_Request_somDumpSelfInt;
  266. }
  267.  
  268. #endif /* Request_API */
  269.  
  270.  
  271. /*
  272.  * -- This emitter treats Method Tokens as Thunks by default.
  273.  * -- Use the sc modifier "nothunks" to change this default
  274.  */
  275. #undef somresolve_
  276. #define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
  277.  
  278. /*
  279.  * -- The C++ Wrapper Class for Request
  280.  */
  281. class Request : public SOMObject
  282. {
  283. public:
  284.  
  285. // Request::new creates the class object if necessary, and then uses somNewNoInit
  286. // to allocate memory and create the object. Initialization is in ctors.
  287. void *operator new(size_t)
  288. {
  289.    if (!_Request) RequestNewClass(Request_MajorVersion,Request_MinorVersion);
  290.    return (void*)
  291.       SOM_Resolve(_Request,SOMClass,somNewNoInit)
  292.          ((SOMClass *)((void*)_Request));
  293. }
  294.  
  295. // Request::delete uses somDestruct.
  296. void operator delete(void * obj)
  297. {
  298.    if (obj && *(void**)obj) {
  299.       SOM_Resolve(obj,SOMObject,somFree)
  300.          ((SOMObject*)obj);
  301.    }
  302. }
  303.  
  304. Request& operator=(Request& fromObj)
  305. {
  306.    this->somDefaultAssign(0,(SOMObject*)((void*)&fromObj));
  307.    return *this;
  308. }
  309.  
  310. Request()
  311. {
  312.    if (*(void**)this != 
  313.        ((somParentMtabStructPtr)
  314.         (RequestCClassData.parentMtab))->mtab)
  315.       return;
  316.    ((SOMObject*)((void*)this))->somDefaultInit(0);
  317. }
  318.  
  319. Request(Request* fromObj)
  320. {
  321.    if (*(void**)this != 
  322.        ((somParentMtabStructPtr)
  323.         (RequestCClassData.parentMtab))->mtab)
  324.       return;
  325.    ((SOMObject*)((void*)this))->somDefaultCopyInit(0,((SOMObject*)((void*)fromObj)));
  326. }
  327.  
  328. #ifdef __IBMCPP__
  329. #pragma info(nocnv,nopar)
  330. #endif
  331. Request(const Request* fromObj)
  332. {
  333.    if (*(void**)this != 
  334.        ((somParentMtabStructPtr)
  335.         (RequestCClassData.parentMtab))->mtab)
  336.       return;
  337.    ((SOMObject*)((void*)this))->somDefaultConstCopyInit(0,((SOMObject*)((void*)fromObj)));
  338. }
  339. #ifdef __IBMCPP__
  340. #pragma info(restore)
  341. #endif
  342.  
  343.  
  344. /* method: add_arg */
  345. ORBStatus   add_arg(Environment *ev, 
  346.         Identifier name, 
  347.         TypeCode arg_type, 
  348.         void* value, 
  349.         long len, 
  350.         Flags arg_flags)
  351. {
  352. /*
  353.  *  Incrementally adds an arg to the Request.
  354.  *  The Request must have been created using the "create_request"
  355.  *  method, with an empty argument list.  (We can't add args to a
  356.  *  list that was passed in to the create_request call. [pg. 109])
  357.  */
  358.    return SOM_ResolveD(this,Request,Request,add_arg)
  359.     (this, ev,name,arg_type,value,len,arg_flags);
  360. }
  361.  
  362.  
  363. /* method: invoke */
  364. ORBStatus   invoke(Environment *ev, 
  365.         Flags invoke_flags)
  366. {
  367. /*
  368.  *  Invokes the Request synchronously, waiting for the response.
  369.  */
  370.    return SOM_ResolveD(this,Request,Request,invoke)
  371.     (this, ev,invoke_flags);
  372. }
  373.  
  374.  
  375. /* method: send */
  376. ORBStatus   send(Environment *ev, 
  377.         Flags invoke_flags)
  378. {
  379. /*
  380.  *  Invokes the Request asynchronously.  The response must eventually
  381.  *  be checked by invoking get_response or get_next_response.
  382.  */
  383.    return SOM_ResolveD(this,Request,Request,send)
  384.     (this, ev,invoke_flags);
  385. }
  386.  
  387.  
  388. /* method: get_response */
  389. ORBStatus   get_response(Environment *ev, 
  390.         Flags response_flags)
  391. {
  392. /*
  393.  *  Determines whether an asynchronous Request has completed.
  394.  */
  395.    return SOM_ResolveD(this,Request,Request,get_response)
  396.     (this, ev,response_flags);
  397. }
  398.  
  399.  
  400. /* method: destroy */
  401. ORBStatus   destroy(Environment *ev)
  402. {
  403. /*
  404.  *  Deletes the memory allocated by the ORB for the Request.
  405.  */
  406.    return SOM_ResolveD(this,Request,Request,destroy)
  407.     (this, ev);
  408. }
  409.  
  410.  
  411. /*
  412.  * Reintroduce inherited methods
  413.  */
  414.  
  415. /* initializer method: somDefaultInit */
  416. void   somDefaultInit(som3InitCtrl* ctrl)
  417. {
  418. /*
  419.  *  A default initializer for a SOM object. Passing a null ctrl
  420.  *  indicates to the receiver that its class is the class of the
  421.  *  object being initialized, whereby the initializer will determine
  422.  *  an appropriate control structure.
  423.  */
  424.    SOM_ResolveD(this,Request,SOMObject,somDefaultInit)
  425.     (this,ctrl);
  426. }
  427.  
  428.  
  429. /* method: somDestruct */
  430. void   somDestruct(octet doFree, 
  431.         som3DestructCtrl* ctrl)
  432. {
  433. /*
  434.  *  The default destructor for a SOM object. A nonzero <doFree>
  435.  *  indicates that the object storage should be freed by the
  436.  *  object's class (via somDeallocate) after uninitialization.
  437.  *  As with somDefaultInit, a null ctrl can be passed.
  438.  */
  439.    SOM_ResolveD(this,Request,SOMObject,somDestruct)
  440.     (this,doFree,ctrl);
  441. }
  442.  
  443.  
  444. /* initializer method: somDefaultCopyInit */
  445. void   somDefaultCopyInit(som3InitCtrl* ctrl, 
  446.         SOMObject* fromObj)
  447. {
  448. /*
  449.  *  A default copy constructor. Use this to make copies of objects for
  450.  *  calling methods with "by-value" argument semantics.
  451.  */
  452.    SOM_ResolveD(this,Request,SOMObject,somDefaultCopyInit)
  453.     (this,ctrl,fromObj);
  454. }
  455.  
  456.  
  457. /* method: somDefaultAssign */
  458. Request*  somDefaultAssign(som3AssignCtrl* ctrl, 
  459.         SOMObject* fromObj)
  460. {
  461. /*
  462.  *  A default assignment operator. Use this to "assign" the state of one
  463.  *  object to another.
  464.  */
  465.    return SOM_ResolveD(this,Request,SOMObject,somDefaultAssign)
  466.     (this,ctrl,fromObj);
  467. }
  468.  
  469.  
  470. /* initializer method: somDefaultConstCopyInit */
  471. void   somDefaultConstCopyInit(som3InitCtrl* ctrl, 
  472.         SOMObject* fromObj)
  473. {
  474. /*
  475.  *  A default copy constructor that uses a const fromObj.
  476.  */
  477.    SOM_ResolveD(this,Request,SOMObject,somDefaultConstCopyInit)
  478.     (this,ctrl,fromObj);
  479. }
  480.  
  481.  
  482. /* initializer method: somDefaultVCopyInit */
  483. void   somDefaultVCopyInit(som3InitCtrl* ctrl, 
  484.         SOMObject* fromObj)
  485. {
  486. /*
  487.  *  A default copy constructor that uses a volatile fromObj.
  488.  */
  489.    SOM_ResolveD(this,Request,SOMObject,somDefaultVCopyInit)
  490.     (this,ctrl,fromObj);
  491. }
  492.  
  493.  
  494. /* initializer method: somDefaultConstVCopyInit */
  495. void   somDefaultConstVCopyInit(som3InitCtrl* ctrl, 
  496.         SOMObject* fromObj)
  497. {
  498. /*
  499.  *  A default copy constructor that uses a const volatile fromObj.
  500.  */
  501.    SOM_ResolveD(this,Request,SOMObject,somDefaultConstVCopyInit)
  502.     (this,ctrl,fromObj);
  503. }
  504.  
  505.  
  506. /* method: somDefaultConstAssign */
  507. Request*  somDefaultConstAssign(som3AssignCtrl* ctrl, 
  508.         SOMObject* fromObj)
  509. {
  510. /*
  511.  *  A default assignment operator that uses a const fromObj.
  512.  */
  513.    return SOM_ResolveD(this,Request,SOMObject,somDefaultConstAssign)
  514.     (this,ctrl,fromObj);
  515. }
  516.  
  517.  
  518. /* method: somDefaultVAssign */
  519. Request*  somDefaultVAssign(som3AssignCtrl* ctrl, 
  520.         SOMObject* fromObj)
  521. {
  522. /*
  523.  *  A default assignment operator that uses a volatile fromObj.
  524.  */
  525.    return SOM_ResolveD(this,Request,SOMObject,somDefaultVAssign)
  526.     (this,ctrl,fromObj);
  527. }
  528.  
  529.  
  530. /* method: somDefaultConstVAssign */
  531. Request*  somDefaultConstVAssign(som3AssignCtrl* ctrl, 
  532.         SOMObject* fromObj)
  533. {
  534. /*
  535.  *  A default assignment operator that uses a const volatile fromObj.
  536.  */
  537.    return SOM_ResolveD(this,Request,SOMObject,somDefaultConstVAssign)
  538.     (this,ctrl,fromObj);
  539. }
  540.  
  541.  
  542. /* method: somInit */
  543. void   somInit()
  544. {
  545. /*
  546.  *  Obsolete but still supported. Override somDefaultInit instead of somInit.
  547.  */
  548.    SOM_ResolveD(this,Request,SOMObject,somInit)
  549.     (this);
  550. }
  551.  
  552.  
  553. /* method: somFree */
  554. void   somFree()
  555. {
  556. /*
  557.  *  Use as directed by framework implementations.
  558.  */
  559.    SOM_ResolveD(this,Request,SOMObject,somFree)
  560.     (this);
  561. }
  562.  
  563.  
  564. /* method: somUninit */
  565. void   somUninit()
  566. {
  567. /*
  568.  *  Obsolete but still supported. Override somDestruct instead of somUninit.
  569.  */
  570.    SOM_ResolveD(this,Request,SOMObject,somUninit)
  571.     (this);
  572. }
  573.  
  574.  
  575. /* method: somGetClass */
  576. SOMClass*   somGetClass()
  577. {
  578. /*
  579.  *  Return the receiver's class.
  580.  */
  581.    return SOM_ResolveD(this,Request,SOMObject,somGetClass)
  582.     (this);
  583. }
  584.  
  585.  
  586. /* method: somGetClassName */
  587. string   somGetClassName()
  588. {
  589. /*
  590.  *  Return the name of the receiver's class.
  591.  */
  592.    return SOM_ResolveD(this,Request,SOMObject,somGetClassName)
  593.     (this);
  594. }
  595.  
  596.  
  597. /* method: somGetSize */
  598. long   somGetSize()
  599. {
  600. /*
  601.  *  Return the size of the receiver.
  602.  */
  603.    return SOM_ResolveD(this,Request,SOMObject,somGetSize)
  604.     (this);
  605. }
  606.  
  607.  
  608. /* method: somIsA */
  609. boolean   somIsA(SOMClass* aClassObj)
  610. {
  611. /*
  612.  *  Returns 1 (true) if the receiver responds to methods
  613.  *  introduced by <aClassObj>, and 0 (false) otherwise.
  614.  */
  615.    return SOM_ResolveD(this,Request,SOMObject,somIsA)
  616.     (this,aClassObj);
  617. }
  618.  
  619.  
  620. /* method: somIsInstanceOf */
  621. boolean   somIsInstanceOf(SOMClass* aClassObj)
  622. {
  623. /*
  624.  *  Returns 1 (true) if the receiver is an instance of
  625.  *  <aClassObj> and 0 (false) otherwise.
  626.  */
  627.    return SOM_ResolveD(this,Request,SOMObject,somIsInstanceOf)
  628.     (this,aClassObj);
  629. }
  630.  
  631.  
  632. /* method: somRespondsTo */
  633. boolean   somRespondsTo(somId mId)
  634. {
  635. /*
  636.  *  Returns 1 (true) if the indicated method can be invoked
  637.  *  on the receiver and 0 (false) otherwise.
  638.  */
  639.    return SOM_ResolveD(this,Request,SOMObject,somRespondsTo)
  640.     (this,mId);
  641. }
  642.  
  643.  
  644. /* va_list method: somDispatch */
  645.  
  646. /*
  647.  *  This method provides a generic, class-specific dispatch mechanism.
  648.  *  It accepts as input <retValue> a pointer to the memory area to be
  649.  *  loaded with the result of dispatching the method indicated by
  650.  *  <methodId> using the arguments in <ap>. <ap> contains the object
  651.  *  on which the method is to be invoked as the first argument.
  652.  */
  653. /* the va_list invocation form */
  654. boolean   Request_somDispatch(somToken* retValue, 
  655.         somId methodId, 
  656.         va_list ap)
  657. {return SOM_ResolveD(this,Request,SOMObject,somDispatch)
  658.     (this,retValue,methodId,ap);
  659. }
  660.  
  661. /* the varargs invocation form */
  662. boolean   somDispatch(somToken* retValue, 
  663.         somId methodId, 
  664.         ...)
  665. {
  666. /*
  667.  *  This method provides a generic, class-specific dispatch mechanism.
  668.  *  It accepts as input <retValue> a pointer to the memory area to be
  669.  *  loaded with the result of dispatching the method indicated by
  670.  *  <methodId> using the arguments in <ap>. <ap> contains the object
  671.  *  on which the method is to be invoked as the first argument.
  672.  */
  673.    va_list ap;
  674.    va_start(ap, methodId);
  675.    boolean __somResult = 
  676.       SOM_ResolveD(this,Request,SOMObject,somDispatch)
  677.     (this,retValue,methodId,ap);
  678.    va_end(ap);
  679.    return __somResult;
  680. }
  681.  
  682.  
  683. /* va_list method: somClassDispatch */
  684.  
  685. /*
  686.  *  Like somDispatch, but method resolution for static methods is done
  687.  *  according to the clsObj instance method table.
  688.  */
  689. /* the va_list invocation form */
  690. boolean   Request_somClassDispatch(SOMClass* clsObj, 
  691.         somToken* retValue, 
  692.         somId methodId, 
  693.         va_list ap)
  694. {return SOM_ResolveD(this,Request,SOMObject,somClassDispatch)
  695.     (this,clsObj,retValue,methodId,ap);
  696. }
  697.  
  698. /* the varargs invocation form */
  699. boolean   somClassDispatch(SOMClass* clsObj, 
  700.         somToken* retValue, 
  701.         somId methodId, 
  702.         ...)
  703. {
  704. /*
  705.  *  Like somDispatch, but method resolution for static methods is done
  706.  *  according to the clsObj instance method table.
  707.  */
  708.    va_list ap;
  709.    va_start(ap, methodId);
  710.    boolean __somResult = 
  711.       SOM_ResolveD(this,Request,SOMObject,somClassDispatch)
  712.     (this,clsObj,retValue,methodId,ap);
  713.    va_end(ap);
  714.    return __somResult;
  715. }
  716.  
  717.  
  718. /* method: somCastObj */
  719. boolean   somCastObj(SOMClass* cls)
  720. {
  721. /*
  722.  *  cast the receiving object to cls (which must be an ancestor of the
  723.  *  objects true class. Returns true on success.
  724.  */
  725.    return SOM_ResolveD(this,Request,SOMObject,somCastObj)
  726.     (this,cls);
  727. }
  728.  
  729.  
  730. /* method: somResetObj */
  731. boolean   somResetObj()
  732. {
  733. /*
  734.  *  reset an object to its true class. Returns true always.
  735.  */
  736.    return SOM_ResolveD(this,Request,SOMObject,somResetObj)
  737.     (this);
  738. }
  739.  
  740.  
  741. /* va_list method: somDispatchV */
  742.  
  743. /*
  744.  *  Obsolete. Use somDispatch instead.
  745.  */
  746. /* the va_list invocation form */
  747. void   Request_somDispatchV(somId methodId, 
  748.         somId descriptor, 
  749.         va_list ap)
  750. {   SOM_ResolveD(this,Request,SOMObject,somDispatchV)
  751.     (this,methodId,descriptor,ap);
  752. }
  753.  
  754. /* the varargs invocation form */
  755. void   somDispatchV(somId methodId, 
  756.         somId descriptor, 
  757.         ...)
  758. {
  759. /*
  760.  *  Obsolete. Use somDispatch instead.
  761.  */
  762.    va_list ap;
  763.    va_start(ap, descriptor);
  764.    SOM_ResolveD(this,Request,SOMObject,somDispatchV)
  765.     (this,methodId,descriptor,ap);
  766.    va_end(ap);
  767. }
  768.  
  769.  
  770. /* va_list method: somDispatchL */
  771.  
  772. /*
  773.  *  Obsolete. Use somDispatch instead.
  774.  */
  775. /* the va_list invocation form */
  776. long   Request_somDispatchL(somId methodId, 
  777.         somId descriptor, 
  778.         va_list ap)
  779. {return SOM_ResolveD(this,Request,SOMObject,somDispatchL)
  780.     (this,methodId,descriptor,ap);
  781. }
  782.  
  783. /* the varargs invocation form */
  784. long   somDispatchL(somId methodId, 
  785.         somId descriptor, 
  786.         ...)
  787. {
  788. /*
  789.  *  Obsolete. Use somDispatch instead.
  790.  */
  791.    va_list ap;
  792.    va_start(ap, descriptor);
  793.    long __somResult = 
  794.       SOM_ResolveD(this,Request,SOMObject,somDispatchL)
  795.     (this,methodId,descriptor,ap);
  796.    va_end(ap);
  797.    return __somResult;
  798. }
  799.  
  800.  
  801. /* va_list method: somDispatchA */
  802.  
  803. /*
  804.  *  Obsolete. Use somDispatch instead.
  805.  */
  806. /* the va_list invocation form */
  807. void*   Request_somDispatchA(somId methodId, 
  808.         somId descriptor, 
  809.         va_list ap)
  810. {return SOM_ResolveD(this,Request,SOMObject,somDispatchA)
  811.     (this,methodId,descriptor,ap);
  812. }
  813.  
  814. /* the varargs invocation form */
  815. void*   somDispatchA(somId methodId, 
  816.         somId descriptor, 
  817.         ...)
  818. {
  819. /*
  820.  *  Obsolete. Use somDispatch instead.
  821.  */
  822.    va_list ap;
  823.    va_start(ap, descriptor);
  824.    void* __somResult = 
  825.       SOM_ResolveD(this,Request,SOMObject,somDispatchA)
  826.     (this,methodId,descriptor,ap);
  827.    va_end(ap);
  828.    return __somResult;
  829. }
  830.  
  831.  
  832. /* va_list method: somDispatchD */
  833.  
  834. /*
  835.  *  Obsolete. Use somDispatch instead.
  836.  */
  837. /* the va_list invocation form */
  838. double   Request_somDispatchD(somId methodId, 
  839.         somId descriptor, 
  840.         va_list ap)
  841. {return SOM_ResolveD(this,Request,SOMObject,somDispatchD)
  842.     (this,methodId,descriptor,ap);
  843. }
  844.  
  845. /* the varargs invocation form */
  846. double   somDispatchD(somId methodId, 
  847.         somId descriptor, 
  848.         ...)
  849. {
  850. /*
  851.  *  Obsolete. Use somDispatch instead.
  852.  */
  853.    va_list ap;
  854.    va_start(ap, descriptor);
  855.    double __somResult = 
  856.       SOM_ResolveD(this,Request,SOMObject,somDispatchD)
  857.     (this,methodId,descriptor,ap);
  858.    va_end(ap);
  859.    return __somResult;
  860. }
  861.  
  862.  
  863. /* method: somPrintSelf */
  864. SOMObject*   somPrintSelf()
  865. {
  866. /*
  867.  *  Uses <SOMOutCharRoutine> to write a brief string with identifying
  868.  *  information about this object.  The default implementation just gives
  869.  *  the object's class name and its address in memory.
  870.  *  <self> is returned.
  871.  */
  872.    return SOM_ResolveD(this,Request,SOMObject,somPrintSelf)
  873.     (this);
  874. }
  875.  
  876.  
  877. /* method: somDumpSelf */
  878. void   somDumpSelf(long level)
  879. {
  880. /*
  881.  *  Uses <SOMOutCharRoutine> to write a detailed description of this object
  882.  *  and its current state.
  883.  * 
  884.  *  <level> indicates the nesting level for describing compound objects
  885.  *  it must be greater than or equal to zero.  All lines in the
  886.  *  description will be preceeded by <2*level> spaces.
  887.  * 
  888.  *  This routine only actually writes the data that concerns the object
  889.  *  as a whole, such as class, and uses <somDumpSelfInt> to describe
  890.  *  the object's current state.  This approach allows readable
  891.  *  descriptions of compound objects to be constructed.
  892.  * 
  893.  *  Generally it is not necessary to override this method, if it is
  894.  *  overriden it generally must be completely replaced.
  895.  */
  896.    SOM_ResolveD(this,Request,SOMObject,somDumpSelf)
  897.     (this,level);
  898. }
  899.  
  900.  
  901. /* method: somDumpSelfInt */
  902. void   somDumpSelfInt(long level)
  903. {
  904. /*
  905.  *  Uses <SOMOutCharRoutine> to write in the current state of this object.
  906.  *  Generally this method will need to be overridden.  When overriding
  907.  *  it, begin by calling the parent class form of this method and then
  908.  *  write in a description of your class's instance data. This will
  909.  *  result in a description of all the object's instance data going
  910.  *  from its root ancestor class to its specific class.
  911.  */
  912.    SOM_ResolveD(this,Request,SOMObject,somDumpSelfInt)
  913.     (this,level);
  914. }
  915.  
  916.  
  917.  
  918. };   /* Request */
  919.  
  920.  
  921.  
  922. #endif       /* SOM_Request_xh */
  923.