home *** CD-ROM | disk | FTP | other *** search
/ QBasic & Borland Pascal & C / Delphi5.iso / C / BC_502 / CATALG2.PAK / CAT2DOC.H < prev    next >
Encoding:
C/C++ Source or Header  |  1997-05-06  |  2.0 KB  |  88 lines

  1. // catalog2Doc.h : interface of the CCatalog2Doc class
  2. //
  3. /////////////////////////////////////////////////////////////////////////////
  4.  
  5. // This is a part of the Microsoft Foundation Classes C++ library.
  6. // Copyright (C) 1992-1995 Microsoft Corporation
  7. // All rights reserved.
  8. //
  9. // This source code is only intended as a supplement to the
  10. // Microsoft Foundation Classes Reference and related
  11. // electronic documentation provided with the library.
  12. // See these sources for detailed information regarding the
  13. // Microsoft Foundation Classes product.
  14.  
  15. class CCatalog2Doc : public CDocument
  16. {
  17. protected: // create from serialization only
  18.     CCatalog2Doc();
  19.     DECLARE_DYNCREATE(CCatalog2Doc)
  20.  
  21. // Attributes
  22. public:
  23.  
  24.     // current database
  25.     CDatabase    m_Database;
  26.  
  27.     // table stuff
  28.     CTables*    m_pTableset;
  29.     BOOL        m_bSystemTables;
  30.     BOOL        m_bViews;
  31.     BOOL        m_bSynonyms;
  32.  
  33.     // column stuff
  34.     CColumns*    m_pColumnset;
  35.     BOOL        m_bLength;
  36.     BOOL        m_bPrecision;
  37.     BOOL        m_bNullability;
  38.  
  39.     // level possibilities
  40.     enum Level
  41.     {
  42.         levelNone,
  43.         levelTable,
  44.         levelColumn
  45.     };
  46.  
  47.     Level        m_nLevel;
  48.  
  49. // Operations
  50. public:
  51.  
  52.     void    SetLevel(Level nLevel);
  53.     CString    GetDSN();
  54.     void    FetchColumnInfo(LPCSTR lpszName);
  55.     BOOL    FetchTableInfo();
  56.  
  57. // Overrides
  58.     // ClassWizard generated virtual function overrides
  59.     //{{AFX_VIRTUAL(CCatalog2Doc)
  60.     public:
  61.     virtual BOOL OnNewDocument();
  62.     virtual void Serialize(CArchive& ar);
  63.     virtual void OnCloseDocument();
  64.     //}}AFX_VIRTUAL
  65.     virtual BOOL OnOpenDocument();
  66.  
  67. // Implementation
  68. public:
  69.     virtual ~CCatalog2Doc();
  70. #ifdef _DEBUG
  71.     virtual void AssertValid() const;
  72.     virtual void Dump(CDumpContext& dc) const;
  73. #endif
  74.  
  75. protected:
  76.     // helpers
  77.     int        GetProfileValue(LPCTSTR lpszSection,LPCTSTR lpszItem);
  78.  
  79. // Generated message map functions
  80. protected:
  81.     //{{AFX_MSG(CCatalog2Doc)
  82.     afx_msg void OnViewSettings();
  83.     //}}AFX_MSG
  84.     DECLARE_MESSAGE_MAP()
  85. };
  86.  
  87. /////////////////////////////////////////////////////////////////////////////
  88.