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

  1. #ifndef _ILASTSEEN_
  2. #define _ILASTSEEN_
  3. //****************************************************************************
  4. // ILastSeen Class - C++ Header File (ilstseen.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 ILastSeen
  21. #include <istring.hpp>
  22. #include <iadd.hpp>
  23.  
  24. /*----------------------------------------------------------------------------*/
  25. /* Align classes on four byte boundary.                                       */
  26. /*----------------------------------------------------------------------------*/
  27. #pragma pack(4)
  28.  
  29. //**************************************************************************
  30. // Class:   ILastSeen
  31. //
  32. // Purpose: Describes ILastSeen Class.
  33. //   This class defines ILastSeen objects for use in applications such as the
  34. //      Police Rap Sheet.
  35. //   These objects hold and manage all the data relevant to the sighting
  36. //      of a suspect by a witness.
  37. //
  38. //**************************************************************************
  39. class _Export ILastSeen : public IStandardNotifier
  40. {
  41.  
  42. public:
  43.  
  44.  
  45. /*---------------------  CONSTRUCTORS/DESTRUCTORS  ----------------
  46.  *-----------------------------------------------------------------*/
  47. ILastSeen();
  48. virtual  ~ILastSeen();
  49.  
  50.  
  51. /*---------------------  NOTIFICATION EVENTS  ----------------------
  52.  | These INotificationId strings are used for all notifications that 
  53.  | this class provides to its observers:
  54.  |     -locationID         Notification identifier provided to
  55.  |                         observers when the location attribute changes.
  56.  |     -witnessID          Notification identifier provided to
  57.  |                         observers when the witness  attribute changes.
  58.  |     -dateID             Notification identifier provided to
  59.  |                         observers when the location attribute changes.
  60.  |     -commentID          Notification identifier provided to
  61.  |                         observers when the comment  attribute changes.
  62.  *-----------------------------------------------------------------*/
  63. static INotificationId locationID;     
  64. static INotificationId witnessID ;     
  65. static INotificationId dateID    ;     
  66. static INotificationId commentID ;     
  67. static INotificationId addressId;
  68.  
  69.  
  70. /*---------------------  ATTRIBUTES  -------------------------------
  71.  | The following members are for accessing the attributes of this class:
  72.  |     -location           Returns the location attribute.
  73.  |     -setLocation        Sets the location  attribute.
  74.  |     -witness            Returns the witness  attribute.
  75.  |     -setWitness         Sets the witness   attribute.
  76.  |     -dateLastSeen       Returns the date     attribute.
  77.  |     -setDateLastSeen    Sets the date      attribute.
  78.  |     -comment            Returns the comment  attribute.
  79.  |     -setComment         Sets the comment   attribute.
  80.  *-----------------------------------------------------------------*/
  81. virtual IString location() const;
  82. virtual ILastSeen & setLocation(const IString & aLocation);
  83. virtual IString witness() const;
  84. virtual ILastSeen & setWitness(const IString & aWitness);
  85. virtual IString dateLastSeen() const;
  86. virtual ILastSeen & setDateLastSeen(const IString & aDate);
  87. virtual IString comment() const;
  88. virtual ILastSeen & setComment(const IString & aComment);
  89. virtual IAddress * address() const;
  90. virtual ILastSeen & setAddress(IAddress * aAddress);
  91.  
  92. /*---------------------  ACTIONS   --------------------------------- 
  93.  | asString    Formatted string for listbox and debugging output.
  94.  *-----------------------------------------------------------------*/
  95. virtual IString  
  96.    asString() const;
  97.  
  98.  
  99. /*---------------------  OPERATORS   -------------------------------
  100.  *-----------------------------------------------------------------*/
  101. Boolean
  102.    operator ==(const ILastSeen & value) const;
  103.    operator ==(const ILastSeen * value) const;
  104.    operator !=(const ILastSeen & value) const;
  105.    operator !=(const ILastSeen * value) const;
  106.  
  107. protected:
  108.  
  109. private:
  110. /*---------------------  PRIVATE MEMBER DATA  ---------------------
  111.  *-----------------------------------------------------------------*/
  112.    IString        dLocation;
  113.    IString        dWitness;
  114.    IString        dDate;
  115.    IString        dComment;
  116.    IAddress       *iAddress;
  117.  
  118. };   //ILastSeen
  119.  
  120. /*----------------------------------------------------------------------------*/
  121. /* Resume compiler default packing.                                           */
  122. /*----------------------------------------------------------------------------*/
  123. #pragma pack()
  124.  
  125. #endif
  126.