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

  1. #ifndef _IALSRMGR_
  2. #define _IALSRMGR_
  3. /******************************************************************************
  4. * .FILE:        ialsrmgr.hpp                                                  *
  5. *                                                                             *
  6. * .DESCRIPTION: Header file for the class IAliasClientMgr                     *
  7. *                                                                             *
  8. * .CLASSES:     IAliasClientMgr                                               *
  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>               //Parent of IAliasClientMgr
  28. #include <istring.hpp>                //IString header
  29. #include <ivseq.h>                    //IVSequence header
  30. #include "ialias.hpp"                 //IAlias header
  31.  
  32. //Forward declarations of other classes
  33.  
  34. //**************************************************************************
  35. // Class:   IAliasClientMgr
  36. //
  37. // Purpose: Describes IAliasClientMgr
  38. //
  39. //**************************************************************************
  40. class IVBSAMP_IMPORT IAliasClientMgr : public IStandardNotifier
  41. {
  42.  
  43. public:
  44. /*---------------------  CONSTRUCTORS/DESTRUCTORS  ----------------
  45.  *-----------------------------------------------------------------*/
  46. IAliasClientMgr ();
  47. virtual  ~IAliasClientMgr ();
  48.  
  49.  
  50. /*---------------------  NOTIFICATION EVENTS  ----------------------
  51.  | These INotificationId strings are used for all notifications that IWindow
  52.  | provides to its observers:
  53.  |     -parseResultId      Notification identifier provided to
  54.  |                         observers when the parsing of dResultBuffer
  55.  |                         has completed.
  56.  |     -resultBufferId     Notification identifier provided to
  57.  |                         observers when the resultBuffer attribute
  58.  |                         changes.
  59.  |     -resultListId       Notification identifier provided to
  60.  |                         observers when the resultList attribute
  61.  |                         changes.
  62.  |     -resultObjectId     Notification identifier provided to
  63.  |                         observers when the resultObject attribute
  64.  |                         changes.
  65.  |     -resultWrapperId    Notification identifier provided to
  66.  |                         observers when the resultWrapper attribute
  67.  |                         changes.
  68.  *-----------------------------------------------------------------*/
  69. static INotificationId parsedResultId;
  70. static INotificationId requestBufferId;
  71. static INotificationId resultBufferId;
  72. static INotificationId resultListId;
  73. //temporarily added resultListWrapperId
  74. static INotificationId resultListWrapperId;
  75. static INotificationId resultObjectId;
  76. static INotificationId resultWrapperId;
  77. static INotificationId sameRequestId;
  78. static INotificationId manyObjectsFoundId;
  79. static INotificationId noObjectsFoundId;
  80. static INotificationId oneObjectFoundId;
  81.  
  82.  
  83. /*---------------------  ATTRIBUTES  -------------------------------
  84.  | The following members are for accessing the attributes of this class:
  85.  |     -resultBuffer       Returns the resultBuffer attribute.
  86.  |     -resultList         Returns resultList attribute, which
  87.  |                         represents the list of alias objects
  88.  |                         that were created via parsing the
  89.  |                         resultBuffer attribute.
  90.  |     -resultObject       Returns the resultObject attribute, which
  91.  |                         represents the first alias object parsed
  92.  |                         from the resultBuffer attribute.
  93.  |     -resultWrapper      Returns a pointer to the resultObject
  94.  |                         attribute.
  95.  |     -setResultBuffer    Sets the resultBuffer attribute.
  96.  |                         NOTE: the IString passed in should map to
  97.  |                               an IResultRecord, where the resultData
  98.  |                               of the IResultRecord represents zero
  99.  |                               or more alias records (IAliasRecord).
  100.  |                               numResults of the IResultRecord must
  101.  |                               indicate how many alias records
  102.  |                               resultData contains.
  103.  *-----------------------------------------------------------------*/
  104. virtual IString
  105.   requestBuffer () const;
  106. virtual IString
  107.   resultBuffer () const;
  108. virtual IVSequence <IAlias *>
  109.   resultList () const;
  110. virtual IVSequence <IAlias *> *
  111.   resultListWrapper () const;
  112. virtual IAlias
  113.   resultObject () const;
  114. virtual IAlias *
  115.   resultWrapper () const;
  116. virtual IAliasClientMgr&
  117.   setRequestBuffer (const IString & iRequestBuffer);
  118. virtual IAliasClientMgr&
  119.   setResultBuffer (const IString & iResultBuffer);
  120.  
  121.  
  122. /*---------------------  ACTIONS   ---------------------------------
  123.  | allByBookNumber()  Retrieves from the database a list of aliases
  124.  |                    for a given suspect.
  125.  | processResult()    Creates a list of adddress objects by parsing
  126.  |                    information contained in the resultBuffer
  127.  |                    attribute.
  128.  *-----------------------------------------------------------------*/
  129. virtual IString
  130.    allByBookNumber (unsigned long aBookNumber);
  131. virtual IAliasClientMgr &
  132.    processResult();
  133.  
  134.  
  135. /*---------------------  OPERATORS   -------------------------------
  136.  *-----------------------------------------------------------------*/
  137.  
  138.  
  139. protected:
  140. /*---------------------  ENUMERATED TYPES  ------------------------
  141.  *-----------------------------------------------------------------*/
  142.  
  143. /*---------------------  PROTECTED SERVICES  ----------------------
  144. | These operations or services provided by this class:
  145. -------------------------------------------------------------------*/
  146.  
  147.  
  148. private:
  149. /*---------------------  PRIVATE MEMBER DATA  ---------------------
  150.  *-----------------------------------------------------------------*/
  151.   IString dRequestBuffer;
  152.   IString dResultBuffer;
  153.   IAlias *dResultWrapper;
  154.   IVSequence <IAlias *> *dResultListWrapper;
  155.  
  156. /*---------------------  PRIVATE SERVICES  -------------------------
  157. | These operations or services provided by this class:
  158. |    addResult()              adds an Alias object's pointer to
  159. |                             the result list.
  160. |    setResultWrapper()       sets the dResultList member data.
  161. -------------------------------------------------------------------*/
  162. IAliasClientMgr & IAliasClientMgr ::
  163.   addResult(IAlias * iAlias);
  164. IAliasClientMgr & IAliasClientMgr ::
  165.   addResult(IAlias & iAlias);
  166.  
  167. IAliasClientMgr&
  168.   setResultWrapper (IAlias * iResultWrapper);
  169. IAliasClientMgr&
  170.   setResultWrapper (const IAlias & iResult);
  171.  
  172. };
  173.  
  174. #endif
  175.