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

  1. #ifndef _ISUSPECT_
  2. #define _ISUSPECT_
  3. /******************************************************************************
  4. * .FILE:        isuspect.hpp                                                  *
  5. *                                                                             *
  6. * .DESCRIPTION: Header file for the class ISuspect                            *
  7. *                                                                             *
  8. * .CLASSES:     ISuspect                                                      *
  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 <istring.hpp>
  28. #include <ivseq.h>
  29. #include <ireslib.hpp>
  30. #include "iperson.hpp"
  31. #include "iarrest.hpp"
  32.  
  33. /*----------------------------------------------------------------------------*/
  34. /* Align classes on four byte boundary.                                       */
  35. /*----------------------------------------------------------------------------*/
  36. #pragma pack(4)
  37.  
  38. class IVBSAMP_IMPORT ISuspect : public IPerson {
  39.  
  40. /*--------------------------- PUBLIC -----------------------------------------*/
  41. public:
  42.  
  43. /*------------------------- Constructors/Destructor ----------------------------
  44.  -----------------------------------------------------------------------------*/
  45.   ISuspect ();
  46.   ISuspect (const ISuspect & partCopy);
  47. virtual
  48.   ~ISuspect ();
  49.  
  50. /*---------------------  ENUMERATED TYPES  ------------------------
  51.  *-----------------------------------------------------------------*/
  52. enum IMugAngle   {left,                     //0
  53.                   front,                    //1
  54.                   right};                   //2
  55.  
  56. /*-------------------------------- Operators -----------------------------------
  57. ------------------------------------------------------------------------------*/
  58.   ISuspect & operator= (const ISuspect & aSuspect);
  59.  
  60.   Boolean
  61.     operator == (const ISuspect & value) const,
  62.     operator != (const ISuspect & value) const,
  63.     operator == (const ISuspect * value) const,
  64.     operator != (const ISuspect * value) const;
  65.  
  66.   virtual IString asString () const;
  67.   virtual IString asDebugInfo () const;
  68.  
  69.  
  70.  
  71. /*-------------------------------- Attributes ----------------------------------
  72.  | The following are attributes for this class:
  73.  |    arrestList                 - list of arrests associated with a suspect
  74.  |    bookNumber                 - number assigned to a suspect when first booked
  75.  |    bookNumberAsString         - number assigned to a suspect when first booked
  76.  |                                 (as an IString)
  77.  |    hasMole                    - indicates if suspect has one or more moles
  78.  |    hasScar                    - indicates if suspect has one or more scars
  79.  |    hasTattoo                  - indicates if suspect has one or more tattoos
  80.  |    MO                         - modis operandi
  81.  |    moleDesc                   - description and location of suspect's moles
  82.  |    mugFront                   - Id of bitmap for suspect's front portrait
  83.  |    mugLeft                    - Id of bitmap for suspect's left portrait
  84.  |    mugRight                   - Id of bitmap for suspect's right portrait
  85.  |    mugFrontAsHandle           - Resource handle for Id of Bitmap for suspect's front portrait
  86.  |    mugLeftAsHandle            - Resource handle for Id of bitmap for suspect's left portrait
  87.  |    mugRightAsHandle           - Resource handle for Id of bitmap for suspect's right portrait
  88.  |    scarDesc                   - description and location of suspect's scars
  89.  |    tattooDesc                 - description and location of suspect's tattoos
  90.  -----------------------------------------------------------------------------*/
  91.   virtual IVSequence<IArrest *> * arrestList() const;
  92.   virtual ISuspect & setArrestList(IVSequence<IArrest *> * aArrestList);
  93.  
  94.   virtual IString bookNumberAsString() const;
  95.   virtual ISuspect & setBookNumberAsString(const IString & aBookNumber);
  96.  
  97.   virtual unsigned long bookNumber() const;
  98.   virtual ISuspect & setBookNumber(const unsigned long aBookNumber);
  99.  
  100.   virtual Boolean hasMole() const;
  101.   virtual ISuspect & enableHasMole(Boolean enable = true);
  102.  
  103.   virtual Boolean hasScar() const;
  104.   virtual ISuspect & enableHasScar(Boolean enable = true);
  105.  
  106.   virtual Boolean hasTattoo() const;
  107.   virtual ISuspect & enableHasTattoo(Boolean enable = true);
  108.  
  109.   virtual IString MO() const;
  110.   virtual ISuspect & setMO(const IString & aMO);
  111.  
  112.   virtual IString moleDesc() const;
  113.   virtual ISuspect & setMoleDesc(const IString & aMoleDesc);
  114.  
  115.   virtual unsigned short mugFront() const;
  116.   virtual ISuspect & setMugFront(const unsigned short aMugFront);
  117.  
  118.   virtual unsigned short mugLeft() const;
  119.   virtual ISuspect & setMugLeft(const unsigned short aMugLeft);
  120.  
  121.   virtual unsigned short mugRight() const;
  122.   virtual ISuspect & setMugRight(const unsigned short aMugRight);
  123.  
  124.   virtual IBitmapHandle mugFrontAsHandle() const;
  125.   virtual IBitmapHandle mugLeftAsHandle() const;
  126.   virtual IBitmapHandle mugRightAsHandle() const;
  127.  
  128.   virtual IString scarDesc() const;
  129.   virtual ISuspect & setScarDesc(const IString & aScarDesc);
  130.  
  131.   virtual IString tattooDesc() const;
  132.   virtual ISuspect & setTattooDesc(const IString & aTattooDesc);
  133.  
  134.  
  135. /*----------------------- Notification Event Ids -------------------------------
  136.  -----------------------------------------------------------------------------*/
  137.   static INotificationId arrestListId;
  138.   static INotificationId bookNumberId;
  139.   static INotificationId hasMoleId;
  140.   static INotificationId hasScarId;
  141.   static INotificationId hasTattooId;
  142.   static INotificationId MOId;
  143.   static INotificationId moleDescId;
  144.   static INotificationId mugFrontId;
  145.   static INotificationId mugLeftId;
  146.   static INotificationId mugRightId;
  147.   static INotificationId scarDescId;
  148.   static INotificationId tattooDescId;
  149.  
  150. /*--------------------------- PRIVATE ----------------------------------------*/
  151. private:
  152.   static const unsigned short defaultMugId;
  153.   static const IDynamicLinkLibrary mugLib;
  154.   unsigned long  iBookNumber;
  155.   unsigned short iMugFront;
  156.   unsigned short iMugLeft;
  157.   unsigned short iMugRight;
  158.   Boolean iHasMole;
  159.   Boolean iHasScar;
  160.   Boolean iHasTattoo;
  161.   IString iMO;
  162.   IString iMoleDesc;
  163.   IString iScarDesc;
  164.   IString iTattooDesc;
  165.   IVSequence<IArrest *> *iArrestList;
  166.  
  167. };   //ISuspect
  168.  
  169. /*----------------------------------------------------------------------------*/
  170. /* Resume compiler default packing.                                           */
  171. /*----------------------------------------------------------------------------*/
  172. #pragma pack()
  173.  
  174. #endif
  175.