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

  1. #ifndef _IADRRMGR_
  2. #define _IADRRMGR_
  3. //****************************************************************************
  4. // IAddressClientMgr Class - C++ Header File (iadrrmgr.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 IAddressClientMgr
  21. #include <istring.hpp>                //IString header
  22. #include <ivseq.h>                    //IVSequence header
  23. #include <iadd.hpp>                   //IAddress header
  24.  
  25. //Forward declarations of other classes
  26.  
  27. //**************************************************************************
  28. // Class:   IAddressClientMgr
  29. //
  30. // Purpose: Describes IAddressClientMgr
  31. //
  32. //**************************************************************************
  33. class _Export IAddressClientMgr : public IStandardNotifier
  34. {
  35.  
  36. public:
  37. /*---------------------  CONSTRUCTORS/DESTRUCTORS  ----------------
  38.  *-----------------------------------------------------------------*/
  39. IAddressClientMgr ();
  40. virtual  ~IAddressClientMgr ();
  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 resultBufferId;
  64. static INotificationId resultListId;
  65. static INotificationId resultObjectId;
  66. static INotificationId resultWrapperId;
  67.  
  68.  
  69. /*---------------------  ATTRIBUTES  -------------------------------
  70.  | The following members are for accessing the attributes of this class:
  71.  |     -resultBuffer       Returns the resultBuffer attribute.
  72.  |     -resultList         Returns resultList attribute, which
  73.  |                         represents the list of address objects
  74.  |                         that were created via parsing the
  75.  |                         resultBuffer attribute.
  76.  |     -resultObject       Returns the resultObject attribute, which
  77.  |                         represents the first address object parsed
  78.  |                         from the resultBuffer attribute.
  79.  |     -resultWrapper      Returns a pointer to the resultObject
  80.  |                         attribute.
  81.  |     -setResultBuffer    Sets the resultBuffer attribute.
  82.  |                         NOTE: the IString passed in should map to
  83.  |                               an IResultRecord, where the resultData
  84.  |                               of the IResultRecord represents zero
  85.  |                               or more address records (IAddressRecord).
  86.  |                               numResults of the IResultRecord must
  87.  |                               indicate how many address records
  88.  |                               resultData contains.
  89.  *-----------------------------------------------------------------*/
  90. virtual IString
  91.   resultBuffer () const;
  92. virtual IVSequence <IAddress *>
  93.   resultList () const;
  94. virtual IVSequence <IAddress *> * 
  95.   resultListWrapper () const;
  96. virtual IAddress
  97.   resultObject () const;
  98. virtual IAddress *
  99.   resultWrapper () const;
  100. virtual IAddressClientMgr&
  101.   setResultBuffer (const IString & iResultBuffer);
  102.  
  103.  
  104. /*---------------------  ACTIONS   ---------------------------------
  105.  | processResult()  Creates a list of adddress objects by parsing
  106.  |                  information contained in the resultBuffer
  107.  |                  attribute.
  108.  *-----------------------------------------------------------------*/
  109. virtual IAddressClientMgr &
  110.    processResult();
  111.  
  112.  
  113. /*---------------------  OPERATORS   -------------------------------
  114.  *-----------------------------------------------------------------*/
  115.  
  116.  
  117. protected:
  118. /*---------------------  ENUMERATED TYPES  ------------------------
  119.  *-----------------------------------------------------------------*/
  120.  
  121. /*---------------------  PROTECTED SERVICES  ----------------------
  122. | These operations or services provided by this class:
  123. -------------------------------------------------------------------*/
  124.  
  125.  
  126. private:
  127. /*---------------------  PRIVATE MEMBER DATA  ---------------------
  128.  *-----------------------------------------------------------------*/
  129.   IString dResultBuffer;
  130.   IAddress *dResultWrapper;
  131.   IVSequence <IAddress *> *dResultListWrapper;
  132.  
  133. /*---------------------  PRIVATE SERVICES  -------------------------
  134. | These operations or services provided by this class:
  135. |    addResult()              adds an Address object's pointer to
  136. |                             the result list.
  137. |    setResultWrapper()       sets the dResultList member data.
  138. -------------------------------------------------------------------*/
  139. IAddressClientMgr & IAddressClientMgr ::
  140.   addResult(IAddress * iAddress);
  141. IAddressClientMgr & IAddressClientMgr ::
  142.   addResult(IAddress & iAddress);
  143.  
  144. IAddressClientMgr&
  145.   setResultWrapper (IAddress * iResultWrapper);
  146. IAddressClientMgr&
  147.   setResultWrapper (const IAddress & iResult);
  148.  
  149. };
  150.  
  151. #endif
  152.