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

  1. /***********************************************************************
  2. **      E P I S O D E T. H                                              *
  3. **                                                                     *
  4. ************************************************************************
  5. ** Copyright (C) 1996 - 1999 Microsoft Corporation                         *
  6. **                 All Rights Reserved                                 *
  7. ************************************************************************/
  8. /*
  9.         EPISODET.H
  10.  
  11.         EpisodeT record object class definitions for Microsoft Guide
  12.  
  13.     This code controls the Episode table.  The code in Episode.cpp
  14.     controls the SQ_EPG query.
  15.  
  16. */
  17.  
  18.  
  19. #ifndef __EPISODET_H__
  20. #pragma option push -b -a8 -pc -A- /*P_O_Push*/
  21. #define __EPISODET_H__
  22.  
  23.  
  24. /*
  25.  
  26. EpisodeT objects are constructed from database records of the EpisodeT table.
  27.  
  28. The CEpisodeTRecordset class is used to select and create CEpisodeT objects
  29. from the EpisodeT table via functions in the CDatabaseRecordset parent class.
  30.  
  31. */
  32.  
  33.  
  34. #include "dbsets.h"
  35.  
  36.  
  37. class COMMMSTVEXPORT CEpisodeTRecordset : public CDatabaseRecordset
  38. {
  39. // This class provides EpisodeT recordset manipulation via parent functions
  40. protected:
  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 lEpisodeID);
  50. };
  51.  
  52.  
  53. class COMMMSTVEXPORT CEpisodeT : public CObject
  54. {
  55.  
  56.     friend class CEpisodeTRecordset; // generates the CEpisodeT record object
  57.  
  58. private:
  59.  
  60.     LONG            m_lEpisodeID;
  61.     CString            m_cszTitle;
  62.     CString            m_cszDescription;
  63.     LONG            m_lEnhMapID;
  64.     LONG            m_lDisplayMask;
  65.     LONG            m_lThemeID;
  66.     LONG            m_lRatingID;
  67.     LONG            m_lAbbreviation;
  68.     COleDateTime    m_codtLastUpdate;
  69.  
  70. public:
  71.  
  72.     CEpisodeT(LONG lEpisodeID = AFX_RFX_LONG_PSEUDO_NULL,
  73.                 CString cszTitle = "",
  74.                 CString cszDescription = "",
  75.                 LONG lEnhMapID = 0,
  76.                 LONG lDisplayMask = 0,
  77.                 LONG lThemeID = 0,
  78.                 LONG lRatingID = 0,
  79.                 LONG lAbbreviation = 0,
  80.                 COleDateTime codtLastUpdate = (DATE) 0) :
  81.             m_lEpisodeID(lEpisodeID),
  82.             m_cszTitle(cszTitle),
  83.             m_cszDescription(cszDescription),
  84.             m_lEnhMapID(lEnhMapID),
  85.             m_lDisplayMask(lDisplayMask),
  86.             m_lThemeID(lThemeID),
  87.             m_lRatingID(lRatingID),
  88.             m_lAbbreviation(lAbbreviation),
  89.             m_codtLastUpdate(codtLastUpdate) { }
  90.     ~CEpisodeT(VOID) { }
  91.     
  92.     VOID    SetTitle( LPCTSTR cszTitle) { m_cszTitle = cszTitle; }
  93.     VOID    SetDescription( LPCTSTR cszDescription) { m_cszDescription = cszDescription; }
  94.     VOID    SetEnhMapID( LONG lEnhMapID) { m_lEnhMapID = lEnhMapID; }
  95.     VOID    SetDisplayMask( LONG lDisplayMask) { m_lDisplayMask = lDisplayMask; }
  96.     VOID    SetThemeID( LONG lThemeID) { m_lThemeID = lThemeID; }
  97.     VOID    SetRatingID( LONG lRatingID) { m_lRatingID = lRatingID; }
  98.     VOID    SetAbbreviation( LONG lAbbreviation) { m_lAbbreviation = lAbbreviation; }
  99.     VOID    SetLastUpdate( COleDateTime codtLastUpdate) { m_codtLastUpdate = codtLastUpdate; }
  100.  
  101.  
  102.     LONG            EpisodeID() { return m_lEpisodeID; }
  103.     CString            Title() { return m_cszTitle; }
  104.     CString            Description() { return m_cszDescription; }
  105.     LONG            EnhMapID() { return m_lEnhMapID; }
  106.     LONG            DisplayMask() { return m_lDisplayMask; }
  107.     LONG            ThemeID() { return m_lThemeID; }
  108.     LONG            RatingID() { return m_lRatingID; }
  109.     LONG            Abbreviation() { return m_lAbbreviation; }
  110.     COleDateTime    LastUpdate() { return m_codtLastUpdate; }
  111. };
  112.  
  113. // Table: EpisodeT
  114.  
  115. #define  TBL_EpisodeT  _T("Episode")
  116.  
  117. //      Field:                          Name                            Type    Size
  118.  
  119. #define FLD_EpisodeT_EpisodeID            _T("E Episode ID")              // Auto-Count
  120. #define FLD_EpisodeT_Title                _T("E Title")                   // Text    255
  121. #define FLD_EpisodeT_Description          _T("E Description")             // Text    255
  122. #define FLD_EpisodeT_EnhMapID              _T("E Enhancement Mapping ID")
  123. #define FLD_EpisodeT_DisplayMask          _T("E Display Mask")            // Long      4
  124. #define FLD_EpisodeT_ThemeID              _T("E Theme ID")                  // Long       4
  125. #define FLD_EpisodeT_RatingID             _T("E Rating ID")               // Long      4
  126. #define FLD_EpisodeT_Abbreviation         _T("E Abbreviation")            // Long      4
  127. #define FLD_EpisodeT_LastUpdate              _T("E Last Update")             // Date      4
  128.  
  129.  
  130. #pragma option pop /*P_O_Pop*/
  131. #endif // __EPISODET_H__
  132.