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

  1. /***********************************************************************
  2. **      S T A T I O N . H                                                *
  3. **                                                                     *
  4. ************************************************************************
  5. ** Copyright (C) 1996 by Microsoft Corporation                         *
  6. **                 All Rights Reserved                                 *
  7. ************************************************************************/
  8. /*
  9.         STATION.H
  10.  
  11.         Station record object class definitions for Microsoft Guide
  12. */
  13.  
  14.  
  15. #ifndef _STATION_H_
  16. #define _STATION_H_
  17.  
  18.  
  19. /*
  20.  
  21. Station objects are constructed from database records of the Station table.
  22.  
  23. The CStationRecordset class is used to select and create Station objects
  24. from the Station table via functions in the CDatabaseRecordset parent class.
  25.  
  26. */
  27.  
  28.  
  29. #include "dbsets.h"
  30.  
  31.  
  32. class COMMMSTVEXPORT CStationRecordset : public CDatabaseRecordset
  33. {
  34. // This class provides Channel recordset manipulation via parent functions
  35.  
  36. virtual CString GetTableName( VOID);
  37.  
  38. virtual BOOL    SetRecordsetObject( VOID* cRecordsetObject);
  39.  
  40. public:
  41. virtual VOID*   GetRecordsetObject( VOID);
  42. virtual BOOLEAN Seek(LPCTSTR lpszComparison, CObject &coo);
  43. virtual BOOLEAN Seek(LPCTSTR lpszComparison, LONG lStationID);
  44. };
  45.  
  46.  
  47. class COMMMSTVEXPORT CStation : public CObject
  48. {
  49.     friend class CStationRecordset; // generates the CStation record object
  50.  
  51. protected:
  52.  
  53.     long m_lStationID;
  54.     CString m_cszCallLetters;
  55.     CString m_cszName;
  56.     long m_lNetworkID;
  57.     CString m_cszLogo;
  58.     CString m_cszDescription;
  59.         
  60. public:
  61.  
  62.     CStation(LONG lStationID = AFX_RFX_LONG_PSEUDO_NULL,
  63.                 CString sCallLetters = "",
  64.                 CString sName = "",
  65.                 LONG lNetworkID = 0,
  66.                 CString sLogo = "",
  67.                 CString sDescription = "") :
  68.                 m_lStationID(0),
  69.                 m_cszCallLetters(sCallLetters),
  70.                 m_cszName(sName),
  71.                 m_lNetworkID(lNetworkID),
  72.                 m_cszLogo(sLogo),
  73.                 m_cszDescription(sDescription) { }
  74.     ~CStation() { }
  75.  
  76.     void SetCallLetters( LPCTSTR szCallLetters ) { m_cszCallLetters = szCallLetters; }
  77.     void SetName( LPCTSTR szName ) { m_cszName = szName; }
  78.     void SetNetworkID( long lNetworkID ) { m_lNetworkID = lNetworkID; }
  79.     void SetLogo( LPCTSTR szLogo ) { m_cszLogo = szLogo; }
  80.     void SetDescription( LPCTSTR szDescription ) { m_cszDescription = szDescription; }
  81.     
  82.     long StationID() { return m_lStationID; } 
  83.     CString CallLetters() { return m_cszCallLetters; }
  84.     CString Name() { return m_cszName; }
  85.     long NetworkID() { return m_lNetworkID; }
  86.     CString Logo() { return m_cszLogo; }
  87.     CString Description() { return m_cszDescription; }
  88. };
  89.  
  90.  
  91. // Table: Station
  92.  
  93. #define  TBL_Station  _T("Station")
  94.  
  95. #define FLD_Station_StationID        _T("S Station ID")
  96. #define FLD_Station_CallLetters        _T("S Call Letters")
  97. #define FLD_Station_Name            _T("S Name")
  98. #define FLD_Station_NetworkID        _T("S Network ID")
  99. #define FLD_Station_Logo            _T("S Logo")
  100. #define FLD_Station_Description        _T("S Description")
  101.  
  102. #endif
  103.  
  104.  
  105.