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

  1. #ifndef _ISUSRMGR_
  2. #define _ISUSRMGR_
  3. //****************************************************************************
  4. // ISuspectClientMgr Class - C++ Header File (isusrmgr.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. #ifndef _ISTDNTFY_
  21. #include <istdntfy.hpp>
  22. #endif
  23. #ifndef _ISTRING_
  24. #include <istring.hpp>        
  25. #endif
  26. #ifndef _IVSEQ_
  27. #include <ivseq.h>            
  28. #endif
  29.  
  30. #ifndef _ISUSPECT_
  31. #include "isuspect.hpp"       
  32. #endif
  33.  
  34.  
  35. /*----------------------------------------------------------------------------*/
  36. /* Align classes on four byte boundary.                                       */
  37. /*----------------------------------------------------------------------------*/
  38. #pragma pack(4)
  39.  
  40. //**************************************************************************
  41. // Class:   ISuspectClientMgr
  42. //
  43. // Purpose: 
  44. //
  45. //**************************************************************************
  46. class _Export ISuspectClientMgr : public IStandardNotifier
  47. {
  48.  
  49. public:
  50.  
  51. /*---------------------  CONSTRUCTORS/DESTRUCTORS  ----------------
  52.  *-----------------------------------------------------------------*/
  53. ISuspectClientMgr ();
  54. virtual  ~ISuspectClientMgr ();
  55.  
  56.  
  57. /*---------------------  NOTIFICATION EVENTS  ----------------------
  58.  | These INotificationId strings are used for all notifications that 
  59.  | this class provides to its observers:
  60.  *-----------------------------------------------------------------*/
  61. static INotificationId requestBufferId;
  62. static INotificationId resultBufferId;
  63. static INotificationId resultListId;
  64. //temporarily added resultListWrapperId
  65. static INotificationId resultListWrapperId;
  66. static INotificationId resultObjectId;
  67. static INotificationId resultWrapperId;
  68.  
  69. static INotificationId manyObjectsFoundId;
  70. static INotificationId noObjectsFoundId;
  71. static INotificationId oneObjectFoundId;
  72. static INotificationId parsedResultId;
  73. static INotificationId sameRequestId;
  74.  
  75.  
  76. /*---------------------  ATTRIBUTES  -------------------------------
  77.  *-----------------------------------------------------------------*/
  78. /*------------------------------------------------------------------
  79.  * requestBuffer
  80.  *-----------------------------------------------------------------*/
  81. virtual IString
  82.   requestBuffer () const;
  83. virtual ISuspectClientMgr&
  84.   setRequestBuffer (const IString & iRequestBuffer);
  85.  
  86. /*------------------------------------------------------------------
  87.  * resultBuffer
  88.  *-----------------------------------------------------------------*/
  89. virtual IString
  90.   resultBuffer () const;
  91. virtual ISuspectClientMgr&
  92.   setResultBuffer (const IString & iResultBuffer);
  93.  
  94. /*------------------------------------------------------------------
  95.  * resultList (read-only) and resultListWrapper
  96.  *-----------------------------------------------------------------*/
  97. virtual IVSequence<ISuspect *> 
  98.   resultList () const;
  99. virtual IVSequence <ISuspect *> *
  100.   resultListWrapper () const;
  101.  
  102. /*------------------------------------------------------------------
  103.  * resultObject and resultWrapper (read-only)
  104.  *-----------------------------------------------------------------*/
  105. virtual ISuspect 
  106.   resultObject () const;
  107. virtual ISuspect *
  108.   resultWrapper () const;
  109.  
  110.  
  111. /*---------------------  ACTIONS   --------------------------------- 
  112.  | getAll                Get all suspects from the database.
  113.  |                       (This application is limited in scope;
  114.  |                       the primary purpose was to show the use
  115.  |                       of a container and notebook.  So, the
  116.  |                       use of a database is limited.  Information
  117.  |                       about suspects are retrieved from the database.)
  118.  | processResult         Creates a list of suspect objects by parsing
  119.  |                       information contained in the resultBuffer
  120.  |                       attribute.
  121.  *-----------------------------------------------------------------*/
  122. virtual IString getAll ();
  123. virtual ISuspectClientMgr & processResult ();
  124.  
  125.  
  126. /*---------------------  OPERATORS   -------------------------------
  127.  *-----------------------------------------------------------------*/
  128.  
  129.  
  130. protected:
  131. /*---------------------  ENUMERATED TYPES  ------------------------
  132.  *-----------------------------------------------------------------*/
  133.  
  134. /*---------------------  PROTECTED SERVICES  ----------------------
  135. | These operations or services provided by this class:               
  136. -------------------------------------------------------------------*/
  137.  
  138. private:
  139. /*---------------------  PRIVATE MEMBER DATA  ---------------------
  140.  *-----------------------------------------------------------------*/
  141.   IString dRequestBuffer;
  142.   IString dResultBuffer;
  143.   IVSequence<ISuspect *> * dResultListWrapper;
  144.   ISuspect * dResultWrapper;
  145.  
  146. // List of Data Members that are not Attributes
  147.  
  148. /*---------------------  PRIVATE SERVICES  -------------------------
  149. | These operations or services provided by this class:               
  150. |    addResult()              adds a suspect object's pointer to the
  151. |                             result list.
  152. |    setResultWrapper()       sets the dResultList member data.
  153. -------------------------------------------------------------------*/
  154. virtual ISuspectClientMgr &
  155.   addResult (ISuspect * iSuspectWrapper);
  156. virtual ISuspectClientMgr &
  157.   addResult (ISuspect & iSuspect);
  158.  
  159. virtual ISuspectClientMgr &
  160.   setResultWrapper (ISuspect * iResultWrapper);
  161. virtual ISuspectClientMgr &
  162.   setResultWrapper (const ISuspect & iResult);
  163. };
  164.  
  165. /*----------------------------------------------------------------------------*/
  166. /* Resume compiler default packing.                                           */
  167. /*----------------------------------------------------------------------------*/
  168. #pragma pack()
  169.  
  170. #endif
  171.