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

  1. #ifndef _IADRRMGR_
  2. #define _IADRRMGR_
  3. /******************************************************************************
  4. * .FILE:        iadrrmgr.hpp                                                  *
  5. *                                                                             *
  6. * .DESCRIPTION: Header file for the class IAddressClientMgr                   *
  7. *                                                                             *
  8. * .CLASSES:     IAddressClientMgr                                             *
  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 IAddressClientMgr
  28. #include <istring.hpp>                //IString header
  29. #include <ivseq.h>                    //IVSequence header
  30. #include <iadd.hpp>                   //IAddress header
  31.  
  32. //Forward declarations of other classes
  33.  
  34. //**************************************************************************
  35. // Class:   IAddressClientMgr
  36. //
  37. // Purpose: Describes IAddressClientMgr
  38. //
  39. //**************************************************************************
  40. class IVBSAMP_IMPORT IAddressClientMgr : public IStandardNotifier
  41. {
  42.  
  43. public:
  44. /*---------------------  CONSTRUCTORS/DESTRUCTORS  ----------------
  45.  *-----------------------------------------------------------------*/
  46. IAddressClientMgr ();
  47. virtual  ~IAddressClientMgr ();
  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 resultBufferId;
  71. static INotificationId resultListId;
  72. static INotificationId resultObjectId;
  73. static INotificationId resultWrapperId;
  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 address objects
  81.  |                         that were created via parsing the
  82.  |                         resultBuffer attribute.
  83.  |     -resultObject       Returns the resultObject attribute, which
  84.  |                         represents the first address 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 address records (IAddressRecord).
  93.  |                               numResults of the IResultRecord must
  94.  |                               indicate how many address records
  95.  |                               resultData contains.
  96.  *-----------------------------------------------------------------*/
  97. virtual IString
  98.   resultBuffer () const;
  99. virtual IVSequence <IAddress *>
  100.   resultList () const;
  101. virtual IVSequence <IAddress *> *
  102.   resultListWrapper () const;
  103. virtual IAddress
  104.   resultObject () const;
  105. virtual IAddress *
  106.   resultWrapper () const;
  107. virtual IAddressClientMgr&
  108.   setResultBuffer (const IString & iResultBuffer);
  109.  
  110.  
  111. /*---------------------  ACTIONS   ---------------------------------
  112.  | processResult()  Creates a list of adddress objects by parsing
  113.  |                  information contained in the resultBuffer
  114.  |                  attribute.
  115.  *-----------------------------------------------------------------*/
  116. virtual IAddressClientMgr &
  117.    processResult();
  118.  
  119.  
  120. /*---------------------  OPERATORS   -------------------------------
  121.  *-----------------------------------------------------------------*/
  122.  
  123.  
  124. protected:
  125. /*---------------------  ENUMERATED TYPES  ------------------------
  126.  *-----------------------------------------------------------------*/
  127.  
  128. /*---------------------  PROTECTED SERVICES  ----------------------
  129. | These operations or services provided by this class:
  130. -------------------------------------------------------------------*/
  131.  
  132.  
  133. private:
  134. /*---------------------  PRIVATE MEMBER DATA  ---------------------
  135.  *-----------------------------------------------------------------*/
  136.   IString dResultBuffer;
  137.   IAddress *dResultWrapper;
  138.   IVSequence <IAddress *> *dResultListWrapper;
  139.  
  140. /*---------------------  PRIVATE SERVICES  -------------------------
  141. | These operations or services provided by this class:
  142. |    addResult()              adds an Address object's pointer to
  143. |                             the result list.
  144. |    setResultWrapper()       sets the dResultList member data.
  145. -------------------------------------------------------------------*/
  146. IAddressClientMgr & IAddressClientMgr ::
  147.   addResult(IAddress * iAddress);
  148. IAddressClientMgr & IAddressClientMgr ::
  149.   addResult(IAddress & iAddress);
  150.  
  151. IAddressClientMgr&
  152.   setResultWrapper (IAddress * iResultWrapper);
  153. IAddressClientMgr&
  154.   setResultWrapper (const IAddress & iResult);
  155.  
  156. };
  157.  
  158. #endif
  159.