home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / vc98 / include / subgenre.h < prev    next >
C/C++ Source or Header  |  1998-04-25  |  2KB  |  94 lines

  1. /***********************************************************************
  2. **      S U B G E N R E . H                                            *
  3. **                                                                     *
  4. ************************************************************************
  5. ** Copyright (C) 1996 by Microsoft Corporation                         *
  6. **                 All Rights Reserved                                 *
  7. ************************************************************************/
  8. /*
  9.  
  10.         SUBGENRE.H
  11.  
  12.         SubGenre record object class definitions for Microsoft Guide
  13.  
  14.  
  15.  
  16. */
  17.  
  18.  
  19.  
  20. #ifndef _SUBGENRE_H_
  21. #define _SUBGENRE_H_
  22.  
  23. /*
  24.  
  25. SubGenre objects are constructed from database records of the SubGenre table.
  26.  
  27. The CSubGenreRecordset class is used to select and create CSubGenre objects
  28. from the SubGenre table via functions in the CDatabaseRecordset parent class.
  29.  
  30. */
  31.  
  32.  
  33. #include "dbsets.h"
  34.  
  35.  
  36.  
  37. class COMMMSTVEXPORT CSubGenreRecordset : public CDatabaseRecordset
  38. {
  39.  
  40. // This class provides SubGenre recordset manipulation via parent functions
  41.  
  42.  
  43. virtual CString GetTableName( VOID);
  44.  
  45. virtual BOOL    SetRecordsetObject( VOID* cRecordsetObject);
  46.  
  47. public:
  48. virtual VOID*   GetRecordsetObject( VOID);
  49. virtual BOOLEAN Seek(LPCTSTR lpszComparison, CObject &coo);
  50. virtual BOOLEAN Seek(LPCTSTR lpszComparison, LONG lSubGenreID);
  51. };
  52.  
  53.  
  54.  
  55.  
  56. class COMMMSTVEXPORT CSubGenre : public CObject
  57. {
  58.  
  59.     friend class CSubGenreRecordset; // generates the CSubGenre record object
  60.  
  61. private:
  62.  
  63.     LONG        m_lSubGenreID;
  64.     CString        m_cszName;
  65.  
  66. public:
  67.  
  68.     CSubGenre(LONG lSubGenreID = AFX_RFX_LONG_PSEUDO_NULL,
  69.                 CString cszName = "") :
  70.                 m_lSubGenreID(lSubGenreID),
  71.                 m_cszName(cszName) { }
  72.  
  73.     ~CSubGenre(VOID) { }
  74.  
  75.     VOID    SetName( LPCTSTR cszName) { m_cszName = cszName; }
  76.  
  77.     LONG           SubGenreID() { return m_lSubGenreID; }
  78.     CString         Name() { return m_cszName; }
  79. };
  80.  
  81.  
  82. // Table: SubGenre
  83.  
  84. #define  TBL_SubGenre  _T("SubGenre")
  85.  
  86. //      Field:                         Index   Name             Type    Size
  87.  
  88. #define FLD_SubGenre_SubGenreID    _T("SG SubGenre ID")    // SubGenreID       Long     4
  89. #define FLD_SubGenre_Name        _T("SG Name")            // Name             Text    25
  90.  
  91.  
  92. #endif
  93.  
  94.