Develop and Download Open Source Software

Browse CVS Repository

Annotation of /malonnote/mnModel.h

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.11 - (hide annotations) (download) (as text)
Tue Sep 13 09:11:37 2005 UTC (18 years, 6 months ago) by maloninc
Branch: MAIN
Changes since 1.10: +3 -0 lines
File MIME type: text/x-chdr
implement type searching.

1 maloninc 1.1 #ifndef MNMODEL_H
2     #define MNMODEL_H
3    
4     #include <wx/wx.h>
5     #include <wx/treebase.h>
6    
7 maloninc 1.5 #include "config.h"
8    
9 maloninc 1.1 #define MAX_WIKI_TEXT_SIZE 10000
10     #define MAX_BUF_SIZE 1024
11     #define EXT_TAG ".txt"
12     #define DATE_TAG ":''DATE'':"
13 maloninc 1.10 #define TYPE_TAG ":''TYPE'':"
14     #define NEW_DATA DATE_TAG " %Y/%m/%d %H:%M:%S\n\n" TYPE_TAG " memo\n---------------------------------------------------------\n"
15    
16     #define ALLMEMO_TAG "malon-all"
17 maloninc 1.11 #define TYPESEARCH_TAG "malon-type:"
18 maloninc 1.1
19 maloninc 1.7 #define CODE_SET_EUC_JP "euc-jp"
20 maloninc 1.1 #ifdef __WXMAC__
21 maloninc 1.8 #define CODE_SET_SYSTEM "CP932"
22 maloninc 1.1 #endif
23 maloninc 1.2 #ifdef __WXCOCOA__
24 maloninc 1.8 #define CODE_SET_SYSTEM "CP932"
25 maloninc 1.2 #endif
26 maloninc 1.1 #ifdef __WXMSW__
27 maloninc 1.8 #define CODE_SET_SYSTEM "CP932"
28 maloninc 1.1 #endif
29     #ifdef __WXMOTIF__
30     #define CODE_SET_SYSTEM "eucJP"
31     #endif
32     #ifdef __WXGTK__
33 maloninc 1.6 #define CODE_SET_SYSTEM "euc-jp"
34 maloninc 1.1 #endif
35     #ifdef __WXX11__
36     #define CODE_SET_SYSTEM "eucJP"
37     #endif
38    
39 maloninc 1.9 #define MAC_BACKSLASH 0x80
40 maloninc 1.1
41    
42     class WikiData : wxTreeItemData{
43    
44     public:
45     WikiData(wxString* dataDir, const char* fileName, FILE* fp);
46     WikiData(wxString* dataDir);
47     ~WikiData();
48     const wxString* getFileName();
49     const wxString* getSubject();
50     const wxString* getDate();
51     const wxString* getText();
52     void modText(wxString* text);
53     void modSubject(wxString* newName);
54     void save();
55     void removeDataFile();
56    
57     private:
58     wxString* subject;
59     wxString* dataDirName;
60     wxString* fileName;
61     wxString* date;
62     wxString* text;
63     };
64    
65     WX_DECLARE_LIST(WikiData, WikiList);
66    
67    
68    
69     class mnModel {
70    
71     public:
72     mnModel(const char* dataDir);
73     ~mnModel();
74     WikiList* search(const char* searchStr);
75 maloninc 1.11 bool normalSearch(char* tokenList[], FILE*fp, char* decodeFileNameBuf);
76     bool typeSearch(char* typeStr, FILE*fp);
77 maloninc 1.1 void addWikiData(WikiData* wikiData);
78     void addSearchStr(wxString* searchStr);
79     void removeSearchStr(wxString searchStr);
80     void modSearchStr(wxString* oldStr, wxString* newStr);
81     const wxArrayString* getSearchStrList();
82     WikiData* newWikiData();
83 maloninc 1.4 const wxString* getWikiDataDir();
84 maloninc 1.1
85     private:
86     wxString* wikiDataDir;
87     wxArrayString* searchStrList;
88     };
89    
90    
91     #endif //MNMODEL_H

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26