home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / VSCPPv8.zip / VACPP / IBMCPP / samples / VISBUILD / RAPSHEET / CPPOV23 / IARSRMGR.HPP < prev    next >
Text File  |  1995-05-17  |  7KB  |  168 lines

  1. #ifndef _IARSRMGR_
  2. #define _IARSRMGR_
  3. //****************************************************************************
  4. // IArrestClientMgr Class - C++ Header File (iarsrmgr.hpp)                   *
  5. //                                                                           *
  6. // COPYRIGHT: Copyright (C) International Business Machines Corp., 1994,1995 *
  7. //                                                                           *
  8. // DISCLAIMER OF WARRANTIES:                                                 *
  9. //   The following [enclosed] code is sample code created by IBM             *
  10. //   Corporation.  This sample code is not part of any standard IBM product  *
  11. //   and is provided to you solely for the purpose of assisting you in the   *
  12. //   development of your applications.  The code is provided "AS IS",        *
  13. //   without warranty of any kind.  IBM shall not be liable for any damages  *
  14. //   arising out of your use of the sample code, even if they have been      *
  15. //   advised of the possibility of such damages.                             *
  16. //****************************************************************************
  17. //NOTE: WE RECOMMEND USING A FIXED-SPACE FONT TO LOOK AT THE SOURCE.
  18. //
  19.  
  20. #include <istdntfy.hpp>               //Parent of IArrestClientMgr
  21. #include <istring.hpp>                //IString header
  22. #include <ivseq.h>                    //IVSequence header
  23. #include "iarrest.hpp"                //IArrest header
  24.  
  25. //Forward declarations of other classes
  26.  
  27. //**************************************************************************
  28. // Class:   IArrestClientMgr
  29. //
  30. // Purpose: Describes IArrestClientMgr
  31. //
  32. //**************************************************************************
  33. class _Export IArrestClientMgr : public IStandardNotifier
  34. {
  35.  
  36. public:
  37. /*---------------------  CONSTRUCTORS/DESTRUCTORS  ----------------
  38.  *-----------------------------------------------------------------*/
  39. IArrestClientMgr ();
  40. virtual  ~IArrestClientMgr ();
  41.  
  42.  
  43. /*---------------------  NOTIFICATION EVENTS  ----------------------
  44.  | These INotificationId strings are used for all notifications that IWindow
  45.  | provides to its observers:
  46.  |     -parseResultId      Notification identifier provided to
  47.  |                         observers when the parsing of dResultBuffer
  48.  |                         has completed.
  49.  |     -resultBufferId     Notification identifier provided to
  50.  |                         observers when the resultBuffer attribute
  51.  |                         changes.
  52.  |     -resultListId       Notification identifier provided to
  53.  |                         observers when the resultList attribute
  54.  |                         changes.
  55.  |     -resultObjectId     Notification identifier provided to
  56.  |                         observers when the resultObject attribute
  57.  |                         changes.
  58.  |     -resultWrapperId    Notification identifier provided to
  59.  |                         observers when the resultWrapper attribute
  60.  |                         changes.
  61.  *-----------------------------------------------------------------*/
  62. static INotificationId parsedResultId;
  63. static INotificationId requestBufferId;
  64. static INotificationId resultBufferId;
  65. static INotificationId resultListId;
  66. //temporarily added resultListWrapperId
  67. static INotificationId resultListWrapperId;
  68. static INotificationId resultObjectId;
  69. static INotificationId resultWrapperId;
  70. static INotificationId sameRequestId;
  71. static INotificationId manyObjectsFoundId;
  72. static INotificationId noObjectsFoundId;
  73. static INotificationId oneObjectFoundId;
  74.  
  75.  
  76. /*---------------------  ATTRIBUTES  -------------------------------
  77.  | The following members are for accessing the attributes of this class:
  78.  |     -resultBuffer       Returns the resultBuffer attribute.
  79.  |     -resultList         Returns resultList attribute, which
  80.  |                         represents the list of arrest objects
  81.  |                         that were created via parsing the
  82.  |                         resultBuffer attribute.
  83.  |     -resultObject       Returns the resultObject attribute, which
  84.  |                         represents the first arrest object parsed
  85.  |                         from the resultBuffer attribute.
  86.  |     -resultWrapper      Returns a pointer to the resultObject
  87.  |                         attribute.
  88.  |     -setResultBuffer    Sets the resultBuffer attribute.
  89.  |                         NOTE: the IString passed in should map to
  90.  |                               an IResultRecord, where the resultData
  91.  |                               of the IResultRecord represents zero
  92.  |                               or more arrest records (IArrestRecord).
  93.  |                               numResults of the IResultRecord must
  94.  |                               indicate how many arrest records
  95.  |                               resultData contains.
  96.  *-----------------------------------------------------------------*/
  97. virtual IString
  98.   requestBuffer () const;
  99. virtual IString
  100.   resultBuffer () const;
  101. virtual IVSequence <IArrest *>
  102.   resultList () const;
  103. virtual IVSequence <IArrest *> * 
  104.   resultListWrapper () const;
  105. virtual IArrest
  106.   resultObject () const;
  107. virtual IArrest *
  108.   resultWrapper () const;
  109. virtual IArrestClientMgr&
  110.   setRequestBuffer (const IString & iRequestBuffer);
  111. virtual IArrestClientMgr&
  112.   setResultBuffer (const IString & iResultBuffer);
  113.  
  114.  
  115. /*---------------------  ACTIONS   --------------------------------- 
  116.  | allByBookNumber()  Retrieves from the database a list of arrest
  117.  |                    records for a given suspect.
  118.  | processResult()    Creates a list of adddress objects by parsing
  119.  |                    information contained in the resultBuffer
  120.  |                    attribute.
  121.  *-----------------------------------------------------------------*/
  122. virtual IString 
  123.    allByBookNumber (unsigned long aBookNumber);
  124. virtual IArrestClientMgr &
  125.    processResult();
  126.  
  127.  
  128. /*---------------------  OPERATORS   -------------------------------
  129.  *-----------------------------------------------------------------*/
  130.  
  131.  
  132. protected:
  133. /*---------------------  ENUMERATED TYPES  ------------------------
  134.  *-----------------------------------------------------------------*/
  135.  
  136. /*---------------------  PROTECTED SERVICES  ----------------------
  137. | These operations or services provided by this class:
  138. -------------------------------------------------------------------*/
  139.  
  140.  
  141. private:
  142. /*---------------------  PRIVATE MEMBER DATA  ---------------------
  143.  *-----------------------------------------------------------------*/
  144.   IString dRequestBuffer;
  145.   IString dResultBuffer;
  146.   IArrest *dResultWrapper;
  147.   IVSequence <IArrest *> *dResultListWrapper;
  148.  
  149. /*---------------------  PRIVATE SERVICES  -------------------------
  150. | These operations or services provided by this class:
  151. |    addResult()              adds an Arrest object's pointer to
  152. |                             the result list.
  153. |    setResultWrapper()       sets the dResultList member data.
  154. -------------------------------------------------------------------*/
  155. IArrestClientMgr & IArrestClientMgr ::
  156.   addResult(IArrest * iArrest);
  157. IArrestClientMgr & IArrestClientMgr ::
  158.   addResult(IArrest & iArrest);
  159.  
  160. IArrestClientMgr&
  161.   setResultWrapper (IArrest * iResultWrapper);
  162. IArrestClientMgr&
  163.   setResultWrapper (const IArrest & iResult);
  164.  
  165. };
  166.  
  167. #endif
  168.