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

  1. /***********************************************************************
  2. **          S T R E A M T Y . H                                        *
  3. **                                                                     *
  4. ************************************************************************
  5. ** Copyright (C) 1996 by Microsoft Corporation                         *
  6. **                 All Rights Reserved                                 *
  7. ************************************************************************/
  8. /*
  9.         STREAMTY.H
  10.  
  11.         StreamType record object class definitions for Microsoft Guide
  12. */
  13.  
  14.  
  15. #ifndef _STREAMTY_H_
  16. #define _STREAMTY_H_
  17.  
  18.  
  19. #include "dbsets.h"
  20.  
  21.  
  22. /*
  23.  
  24. StreamType objects are constructed from database records of the StreamType table.
  25.  
  26. The CStreamTypeRecordset class is used to select and create CStreamType objects
  27. from the StreamType table via functions in the CDatabaseRecordset parent class.
  28.  
  29. */
  30.  
  31.  
  32. class COMMMSTVEXPORT CStreamTypeRecordset : public CDatabaseRecordset
  33. {
  34.  
  35. // This class provides StreamType recordset manipulation via parent functions
  36.  
  37.  
  38. virtual CString GetTableName( VOID);
  39.  
  40. virtual BOOL    SetRecordsetObject( VOID* cRecordsetObject);
  41.  
  42. public:
  43. virtual VOID*   GetRecordsetObject( VOID);
  44. virtual BOOLEAN Seek(LPCTSTR lpszComparison, CObject &coo);
  45. virtual BOOLEAN Seek(LPCTSTR lpszComparison, LONG lStreamTypeID);
  46. };
  47.  
  48.  
  49. class COMMMSTVEXPORT CStreamType : public CObject
  50. {
  51.  
  52.     friend class CStreamTypeRecordset; // generates the CStreamType record object
  53.  
  54. private:
  55.  
  56.     LONG        m_lStreamTypeID;
  57.     LONG        m_lTuningSpace;
  58.     LONG        m_lValue;
  59.     CString        m_cszDescription;
  60.     LONG        m_lCategory;
  61.     LONG        m_lLocaleID;
  62.  
  63. public:
  64.  
  65.     CStreamType(LONG lStreamTypeID = AFX_RFX_LONG_PSEUDO_NULL,
  66.                 LONG lTuningSpace = 0,
  67.                 LONG lValue = 0,
  68.                 CString cszDescription = "",
  69.                 LONG lCategory = 0,
  70.                 LONG lLocaleID = 0) :
  71.                 m_lStreamTypeID(lStreamTypeID),
  72.                 m_lTuningSpace(lTuningSpace),
  73.                 m_lValue(lValue),
  74.                 m_cszDescription(cszDescription),
  75.                 m_lCategory(lCategory),
  76.                 m_lLocaleID(lLocaleID) { }
  77.  
  78.     ~CStreamType(VOID) { }
  79.  
  80.     VOID    SetTuningSpace( LONG lTuningSpace) { m_lTuningSpace = lTuningSpace; }
  81.     VOID    SetValue( LONG lValue) { m_lValue = lValue; }
  82.     VOID    SetDescription( CString cszDescription) { m_cszDescription = cszDescription; }
  83.     VOID    SetCategory( LONG lCategory) { m_lCategory = lCategory; }
  84.     VOID    SetLocaleID( LONG lLocaleID) { m_lLocaleID = lLocaleID; }
  85.  
  86.     LONG            StreamTypeID() { return m_lStreamTypeID; }
  87.     LONG            TuningSpace() { return m_lTuningSpace; }
  88.     LONG            Value() { return m_lValue; }
  89.     CString         Description() { return m_cszDescription; }
  90.     LONG            Category() { return m_lCategory; }
  91.     LONG            LocaleID() { return m_lLocaleID; }
  92. };
  93.  
  94.  
  95. // Table: StreamType
  96.  
  97. #define TBL_StreamType  _T("[Stream Type]")
  98.  
  99. //      Field:                          Name                        Type            Size
  100.  
  101. #define FLD_StreamType_StreamTypeID        _T("SR Stream Type ID")        // AutoLong      4
  102. #define FLD_StreamType_TuningSpace        _T("SR Tuning Space")        // Long          4
  103. #define FLD_StreamType_Value            _T("SR Value")              // Long          4
  104. #define FLD_StreamType_Description        _T("SR Description")        // Text          Memo
  105. #define FLD_StreamType_Category            _T("SR Category")            // Long          4
  106. #define FLD_StreamType_LocaleID            _T("SR LocaleID")            // Long          4
  107.  
  108. #endif
  109.  
  110.