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

  1. /***********************************************************************
  2. **          C H A N S T R . H                                            *
  3. **                                                                     *
  4. ************************************************************************
  5. ** Copyright (C) 1996 by Microsoft Corporation                         *
  6. **                 All Rights Reserved                                 *
  7. ************************************************************************/
  8. /*
  9.         CHANSTR.H
  10.  
  11.         ChannelStream record object class definitions for Microsoft Guide
  12. */
  13.  
  14.  
  15. #ifndef _CHANSTR_H_
  16. #define _CHANSTR_H_
  17.  
  18.  
  19. #include "dbsets.h"
  20.  
  21.  
  22. /*
  23.  
  24. ChannelStream objects are constructed from database records of the ChannelStream table.
  25.  
  26. The CChannelStreamRecordset class is used to select and create CChannelStream objects
  27. from the ChannelStream table via functions in the CDatabaseRecordset parent class.
  28.  
  29. */
  30.  
  31.  
  32. class  COMMMSTVEXPORT CChannelStreamRecordset : public CDatabaseRecordset
  33. {
  34. // This class provides ChannelStream 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. };
  44.  
  45.  
  46. class COMMMSTVEXPORT CChannelStream : public CObject
  47. {
  48.     friend class CChannelStreamRecordset; // generates the CChannelStream record object
  49.  
  50. private:
  51.  
  52.     LONG        m_lChannelID;
  53.     LONG        m_lStreamTypeID;
  54.     LONG        m_lSubChannel;
  55.     CString        m_cszName;
  56.  
  57. public:
  58.  
  59.     CChannelStream(LONG lChannelID = 0,
  60.                     LONG lStreamTypeID = 0,
  61.                     LONG lSubChannel = 0,
  62.                     CString cszName = "") :
  63.                     m_lChannelID(lChannelID),
  64.                     m_lStreamTypeID(lStreamTypeID),
  65.                     m_lSubChannel(lSubChannel),
  66.                     m_cszName(cszName) { }
  67.  
  68.     ~CChannelStream(VOID) { }
  69.  
  70.     VOID    SetChannelID( LONG lChannelID) { m_lChannelID = lChannelID; }
  71.     VOID    SetStreamTypeID( LONG lStreamTypeID) { m_lStreamTypeID = lStreamTypeID; }
  72.     VOID    SetSubChannel( LONG lSubChannel) { m_lSubChannel = lSubChannel; }
  73.     VOID    SetName( CString cszName) { m_cszName = cszName; }
  74.  
  75.     LONG            ChannelID() { return m_lChannelID; }
  76.     LONG            StreamTypeID() { return m_lStreamTypeID; }
  77.     LONG            SubChannel() { return m_lSubChannel; }
  78.     CString         Name() { return m_cszName; }
  79. };
  80.  
  81. // Table: ChannelStream
  82.  
  83. #define TBL_ChannelStream  _T("[Channel Stream]")
  84.  
  85. //      Field:                          Name                        Type        Size
  86.  
  87. #define FLD_ChannelStream_ChannelID        _T("CSR Channel ID")            // Long      4
  88. #define FLD_ChannelStream_StreamTypeID    _T("CSR Stream Type ID")        // Long      4
  89. #define FLD_ChannelStream_SubChannel    _T("CSR SubChannel")            // Long     4
  90. #define FLD_ChannelStream_Name            _T("CSR Name")                  // Memo     255
  91.  
  92. #endif
  93.  
  94.  
  95.