home *** CD-ROM | disk | FTP | other *** search
/ PC Format (South-Africa) 2001 June / PCFJune.iso / Xenon / C++ / FreeCommandLineTools.exe / Include / genre.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-01-31  |  2.5 KB  |  100 lines

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