-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathsreditDoc.h
126 lines (99 loc) · 3.93 KB
/
sreditDoc.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
/*===========================================================================
*
* File: SrbeditDoc.H
* Author: Dave Humphrey ([email protected])
* Created On: 26 November 2011
*
* Definition of the CSrEditDoc document class.
*
*=========================================================================*/
#ifndef __SREDITDOC_H
#define __SREDITDOC_H
/*===========================================================================
*
* Begin Required Includes
*
*=========================================================================*/
#include "common/csvfile.h"
#include "modfile/srsimplerecordhandler.h"
#include "modfile/srmultirecordhandler.h"
/*===========================================================================
* End of Required Includes
*=========================================================================*/
/*===========================================================================
*
* Begin Definitions
*
*=========================================================================*/
/* View update hints */
#define SREDIT_DOC_HINT_UPDATEALL 8001
#define SREDIT_DOC_HINT_GETDATA 8002
#define SREDIT_DOC_HINT_CLEARFILTERS 8003
#define SREDIT_DOC_HINT_UPDATEFILTERS 8004
#define SREDIT_DOC_HINT_UPDATERECORD 8005
#define SREDIT_DOC_HINT_ADDRECORD 8006
/*===========================================================================
* End of Definitions
*=========================================================================*/
/*===========================================================================
*
* Begin Type Definitions
*
*=========================================================================*/
/* Used for view updates */
class srrecupdateinfo_t : public CObject
{
public:
CSrRecord* pOldRecord;
CSrRecord* pNewRecord;
};
/*===========================================================================
* End of Type Definitions
*=========================================================================*/
/*===========================================================================
*
* Class CSrEditDoc Definition
*
*=========================================================================*/
class CSrEditDoc : public CDocument
{
/*---------- Begin Protected Class Members --------------------------*/
protected:
CSrMultiRecordHandler m_RecordHandler;
bool m_HasActiveContent;
/*---------- Begin Protected Class Methods --------------------------*/
protected:
/* Create from serialization only */
CSrEditDoc();
DECLARE_DYNCREATE(CSrEditDoc)
/*---------- Begin Public Class Methods -----------------------------*/
public:
/* Destructor */
virtual ~CSrEditDoc();
/* Find operations */
dword Search (srfinddata_t& FindData, CSrCallback* pCallback) { return m_RecordHandler.Search(FindData, pCallback); }
/* Get class members */
CSrEspFile& GetActiveFile (void) { return (m_RecordHandler.GetActiveFile()); }
CSrGroup* GetTopGroup (void) { return m_RecordHandler.GetTopGroup(); }
CSrMultiRecordHandler& GetRecordHandler (void) { return (m_RecordHandler); }
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
public:
virtual BOOL OnNewDocument();
virtual void Serialize(CArchive& ar);
virtual void DeleteContents();
virtual BOOL OnOpenDocument (LPCTSTR lpszPathName);
virtual BOOL OnSaveDocument (LPCTSTR lpszPathName);
virtual BOOL DoFileSave();
protected:
DECLARE_MESSAGE_MAP();
};
/*===========================================================================
* End of Class CSrEditDoc Definition
*=========================================================================*/
#endif
/*===========================================================================
* End of File SrEditDoc.H
*=========================================================================*/