home *** CD-ROM | disk | FTP | other *** search
/ Magazyn Internet 2000 May / MICD_2000_05.iso / CBuilder5 / INSTALL / DATA1.CAB / Program_Built_Files / Include / ratingsy.h < prev    next >
C/C++ Source or Header  |  2000-02-01  |  3KB  |  101 lines

  1. /***********************************************************************
  2. **      R A T I N G . H                                                *
  3. **                                                                     *
  4. ************************************************************************
  5. ** Copyright (C) 1996 - 1999 Microsoft Corporation                         *
  6. **                 All Rights Reserved                                 *
  7. ************************************************************************/
  8. /*
  9.  
  10.         RATING.H
  11.  
  12.         Rating record object class definitions for Microsoft Guide
  13.  
  14.  
  15.  
  16. */
  17.  
  18.  
  19.  
  20. #ifndef _RATINGSYSTEM_H_
  21. #pragma option push -b -a8 -pc -A- /*P_O_Push*/
  22. #define _RATINGSYSTEM_H_
  23.  
  24.  
  25. #include "dbsets.h"
  26.  
  27.  
  28. /*
  29.  
  30. Rating objects are constructed from database records of the RatingSystem table.
  31.  
  32. The CRatingSystemRecordset class is used to select and create CRatingSystem objects
  33. from the RatingSystem table via functions in the CDatabaseRecordset parent class.
  34.  
  35. */
  36.  
  37.  
  38. class COMMMSTVEXPORT CRatingSystemRecordset : public CDatabaseRecordset
  39. {
  40. // This class provides RatingSystem recordset manipulation via parent functions
  41.  
  42.     virtual CString GetTableName(VOID);
  43.  
  44.     virtual BOOL    SetRecordsetObject(VOID *cRecordsetObject);
  45.  
  46. public:
  47. virtual VOID*   GetRecordsetObject(VOID);
  48. virtual BOOLEAN Seek(LPCTSTR lpszComparison, CObject &coo);
  49. virtual BOOLEAN Seek(LPCTSTR lpszComparison, LONG lRatingSystemID);
  50. };
  51.  
  52.  
  53. class COMMMSTVEXPORT CRatingSystem : public CObject
  54. {
  55.     friend class CRatingSystemRecordset; // generates the CRating record object
  56.  
  57. private:
  58.  
  59.     LONG            m_lRatingSystemID;
  60.     LONG            m_lTuningSpace;
  61.     CString         m_cszName;
  62.     CString         m_cszDescription;
  63.     
  64. public:
  65.             CRatingSystem(LONG lRatingSystemID = AFX_RFX_LONG_PSEUDO_NULL,
  66.                             LONG lTuningSpace = 0,
  67.                             CString cszName = "",
  68.                             CString cszDescription = "") :
  69.                             m_lRatingSystemID(lRatingSystemID),
  70.                             m_lTuningSpace(lTuningSpace),
  71.                             m_cszName(cszName),
  72.                             m_cszDescription(cszDescription){ }
  73.             ~CRatingSystem(VOID) { }
  74.  
  75.     VOID    SetTuningSpace( LONG lTuningSpace) { m_lTuningSpace = lTuningSpace; }
  76.     VOID    SetName( LPCTSTR cszName) { m_cszName = cszName; }
  77.     VOID    SetDescription( LPCTSTR cszDescription) { m_cszDescription = cszDescription; }
  78.  
  79.     LONG            RatingSystemID() { return m_lRatingSystemID; }
  80.     LONG            TuningSpace() { return m_lTuningSpace; }
  81.     CString         Name() { return m_cszName; }
  82.     CString         Description() { return m_cszDescription; }
  83. };
  84.  
  85.  
  86. // Table: Rating
  87.  
  88. #define  TBL_RatingSystem  _T("[Rating System]")
  89.  
  90. //      Field:                                    Name                    Type        Size
  91.  
  92. #define FLD_RatingSystem_RatingSystemID        _T("RS Rating System ID")    // Long        4
  93. #define FLD_RatingSystem_TuningSpace        _T("RS Tuning Space")        // Long        4
  94. #define FLD_RatingSystem_Name                _T("RS Name")                // Text        255
  95. #define FLD_RatingSystem_Description        _T("RS Description")        // Text     50
  96.  
  97. #pragma option pop /*P_O_Pop*/
  98. #endif
  99.  
  100.  
  101.