Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

90 lines
1.7 KiB

  1. // hostDoc.cpp : implementation of the CHostDoc class
  2. //
  3. #include "stdinc.h"
  4. #include "host.h"
  5. #include "hostDoc.h"
  6. #ifdef _DEBUG
  7. #define new DEBUG_NEW
  8. #undef THIS_FILE
  9. static char THIS_FILE[] = __FILE__;
  10. #endif
  11. /////////////////////////////////////////////////////////////////////////////
  12. // CHostDoc
  13. IMPLEMENT_DYNCREATE(CHostDoc, CDocument)
  14. BEGIN_MESSAGE_MAP(CHostDoc, CDocument)
  15. //{{AFX_MSG_MAP(CHostDoc)
  16. // NOTE - the ClassWizard will add and remove mapping macros here.
  17. // DO NOT EDIT what you see in these blocks of generated code!
  18. //}}AFX_MSG_MAP
  19. END_MESSAGE_MAP()
  20. /////////////////////////////////////////////////////////////////////////////
  21. // CHostDoc construction/destruction
  22. CHostDoc::CHostDoc()
  23. {
  24. // TODO: add one-time construction code here
  25. }
  26. CHostDoc::~CHostDoc()
  27. {
  28. }
  29. BOOL CHostDoc::OnNewDocument()
  30. {
  31. if (!CDocument::OnNewDocument())
  32. return FALSE;
  33. // TODO: add reinitialization code here
  34. // (SDI documents will reuse this document)
  35. m_sPath = L"";
  36. m_sDBName = L"";
  37. m_sDBQuery = L"";
  38. return TRUE;
  39. }
  40. /////////////////////////////////////////////////////////////////////////////
  41. // CHostDoc serialization
  42. void CHostDoc::Serialize(CArchive& ar)
  43. {
  44. if (ar.IsStoring())
  45. {
  46. // TODO: add storing code here
  47. ar << m_sPath;
  48. ar << m_sDBName;
  49. ar << m_sDBQuery;
  50. }
  51. else
  52. {
  53. // TODO: add loading code here
  54. ar >> m_sPath;
  55. ar >> m_sDBName;
  56. ar >> m_sDBQuery;
  57. }
  58. }
  59. /////////////////////////////////////////////////////////////////////////////
  60. // CHostDoc diagnostics
  61. #ifdef _DEBUG
  62. void CHostDoc::AssertValid() const
  63. {
  64. CDocument::AssertValid();
  65. }
  66. void CHostDoc::Dump(CDumpContext& dc) const
  67. {
  68. CDocument::Dump(dc);
  69. }
  70. #endif //_DEBUG
  71. /////////////////////////////////////////////////////////////////////////////
  72. // CHostDoc commands