home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / trialva / ibmcppw / samples / visbuild / rapsheet / cppwv23 / isusrmgr.hpp < prev    next >
Encoding:
C/C++ Source or Header  |  1996-02-09  |  7.4 KB  |  172 lines

  1. #ifndef _ISUSRMGR_
  2. #define _ISUSRMGR_
  3. /******************************************************************************
  4. * .FILE:        isusrmgr.hpp                                                  *
  5. *                                                                             *
  6. * .DESCRIPTION: Header file for the class ISuspectClientMgr                   *
  7. *                                                                             *
  8. * .CLASSES:     ISuspectClientMgr                                             *
  9. *                                                                             *
  10. * .COPYRIGHT:                                                                 *
  11. *    Licensed Material - Program-Property of IBM                              *
  12. *    (C) Copyright IBM Corp. 1992, 1996 - All Rights Reserved                 *
  13. *                                                                             *
  14. * .DISCLAIMER:                                                                *
  15. *   The following [enclosed] code is sample code created by IBM               *
  16. *   Corporation.  This sample code is not part of any standard IBM product    *
  17. *   and is provided to you solely for the purpose of assisting you in the     *
  18. *   development of your applications.  The code is provided 'AS IS',          *
  19. *   without warranty of any kind.  IBM shall not be liable for any damages    *
  20. *   arising out of your use of the sample code, even if they have been        *
  21. *   advised of the possibility of such damages.                               *
  22. *                                                                             *
  23. * .NOTE: WE RECOMMEND USING A FIXED SPACE FONT TO LOOK AT THE SOURCE          *
  24. *                                                                             *
  25. ******************************************************************************/
  26. #include "ivbsamps.h"
  27. #include <istdntfy.hpp>
  28. #include <istring.hpp>
  29. #include <ivseq.h>
  30. #include "isuspect.hpp"
  31.  
  32.  
  33. /*----------------------------------------------------------------------------*/
  34. /* Align classes on four byte boundary.                                       */
  35. /*----------------------------------------------------------------------------*/
  36. #pragma pack(4)
  37.  
  38. //**************************************************************************
  39. // Class:   ISuspectClientMgr
  40. //
  41. // Purpose:
  42. //
  43. //**************************************************************************
  44. class IVBSAMP_IMPORT ISuspectClientMgr : public IStandardNotifier
  45. {
  46.  
  47. public:
  48.  
  49. /*---------------------  CONSTRUCTORS/DESTRUCTORS  ----------------
  50.  *-----------------------------------------------------------------*/
  51. ISuspectClientMgr ();
  52. virtual  ~ISuspectClientMgr ();
  53.  
  54.  
  55. /*---------------------  NOTIFICATION EVENTS  ----------------------
  56.  | These INotificationId strings are used for all notifications that
  57.  | this class provides to its observers:
  58.  *-----------------------------------------------------------------*/
  59. static INotificationId requestBufferId;
  60. static INotificationId resultBufferId;
  61. static INotificationId resultListId;
  62. //temporarily added resultListWrapperId
  63. static INotificationId resultListWrapperId;
  64. static INotificationId resultObjectId;
  65. static INotificationId resultWrapperId;
  66.  
  67. static INotificationId manyObjectsFoundId;
  68. static INotificationId noObjectsFoundId;
  69. static INotificationId oneObjectFoundId;
  70. static INotificationId parsedResultId;
  71. static INotificationId sameRequestId;
  72.  
  73.  
  74. /*---------------------  ATTRIBUTES  -------------------------------
  75.  *-----------------------------------------------------------------*/
  76. /*------------------------------------------------------------------
  77.  * requestBuffer
  78.  *-----------------------------------------------------------------*/
  79. virtual IString
  80.   requestBuffer () const;
  81. virtual ISuspectClientMgr&
  82.   setRequestBuffer (const IString & iRequestBuffer);
  83.  
  84. /*------------------------------------------------------------------
  85.  * resultBuffer
  86.  *-----------------------------------------------------------------*/
  87. virtual IString
  88.   resultBuffer () const;
  89. virtual ISuspectClientMgr&
  90.   setResultBuffer (const IString & iResultBuffer);
  91.  
  92. /*------------------------------------------------------------------
  93.  * resultList (read-only) and resultListWrapper
  94.  *-----------------------------------------------------------------*/
  95. virtual IVSequence<ISuspect *>
  96.   resultList () const;
  97. virtual IVSequence <ISuspect *> *
  98.   resultListWrapper () const;
  99.  
  100. /*------------------------------------------------------------------
  101.  * resultObject and resultWrapper (read-only)
  102.  *-----------------------------------------------------------------*/
  103. virtual ISuspect
  104.   resultObject () const;
  105. virtual ISuspect *
  106.   resultWrapper () const;
  107.  
  108.  
  109. /*---------------------  ACTIONS   ---------------------------------
  110.  | getAll                Get all suspects from the database.
  111.  |                       (This application is limited in scope;
  112.  |                       the primary purpose was to show the use
  113.  |                       of a container and notebook.  So, the
  114.  |                       use of a database is limited.  Information
  115.  |                       about suspects are retrieved from the database.)
  116.  | primeDBWithSuspects   prime the database with a small set of suspects
  117.  |                       so the sample can enable data to be viewed
  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 & primeDBWithSuspects ();
  124. virtual ISuspectClientMgr & processResult ();
  125.  
  126.  
  127. /*---------------------  OPERATORS   -------------------------------
  128.  *-----------------------------------------------------------------*/
  129.  
  130.  
  131. protected:
  132. /*---------------------  ENUMERATED TYPES  ------------------------
  133.  *-----------------------------------------------------------------*/
  134.  
  135. /*---------------------  PROTECTED SERVICES  ----------------------
  136. | These operations or services provided by this class:
  137. -------------------------------------------------------------------*/
  138.  
  139. private:
  140. /*---------------------  PRIVATE MEMBER DATA  ---------------------
  141.  *-----------------------------------------------------------------*/
  142.   IString dRequestBuffer;
  143.   IString dResultBuffer;
  144.   IVSequence<ISuspect *> * dResultListWrapper;
  145.   ISuspect * dResultWrapper;
  146.  
  147. // List of Data Members that are not Attributes
  148.  
  149. /*---------------------  PRIVATE SERVICES  -------------------------
  150. | These operations or services provided by this class:
  151. |    addResult()              adds a suspect object's pointer to the
  152. |                             result list.
  153. |    setResultWrapper()       sets the dResultList member data.
  154. -------------------------------------------------------------------*/
  155. virtual ISuspectClientMgr &
  156.   addResult (ISuspect * iSuspectWrapper);
  157. virtual ISuspectClientMgr &
  158.   addResult (ISuspect & iSuspect);
  159.  
  160. virtual ISuspectClientMgr &
  161.   setResultWrapper (ISuspect * iResultWrapper);
  162. virtual ISuspectClientMgr &
  163.   setResultWrapper (const ISuspect & iResult);
  164. };
  165.  
  166. /*----------------------------------------------------------------------------*/
  167. /* Resume compiler default packing.                                           */
  168. /*----------------------------------------------------------------------------*/
  169. #pragma pack()
  170.  
  171. #endif
  172.