ddc
ConcIndexatorInvoker.h
Go to the documentation of this file.
1 //
2 // Created by sokirko on 04.10.19.
3 //
4 
5 #ifndef CCONCINDEXATORINVOKER_H
6 #define CCONCINDEXATORINVOKER_H
7 
8 #include "ConcIndexator.h"
9 
10 class CDwdsThesaurus;
11 
12 class CGraphmatFile;
13 
14 class TAR;
16 
22  time_t m_StartTime;
24  vector<string> m_ErrorCorpusFiles;
25 
26  string GetTimeStatisticsFileName(string Path) const;
27 
28  string GetErrorLogFileName(string Path) const;
29 
30  void WriteTimeStatistics(const CConcIndexator &Indexator, DWORD MaxTokenCountInOnePeriod) const;
31 
32  void FinalizeIndex(CConcIndexator &Indexator, DWORD MaxTokenCountInOnePeriod) const;
33 
34  void BuildOnlyMorphIndex(string ProjectFile) const;
35 
36  void BuildIndexStart(string ProjectFile, CConcIndexator &indexator);
37 
38  void PrintProgress(DWORD saveCorpusEndTokenNo);
39 
40  void IndexFiles(CConcIndexator &Indexator);
41 
42  void SaveLoadIndexToDisk(CConcIndexator &Indexator);
43 
44  DWORD IndexFile(CConcIndexator &Indexator, CIndexDocument* document);
45 
47 
48  void ProcessTarOrSingleFile(CConcIndexator &Indexator, size_t &InputLoadIndexSize, size_t &MemoryLoadIndexSize);
49 
50 public:
57 
59  mutable string m_CurrMessage;
60 
62  bool m_bStdout;
63 
66 
69 
72 
75 
76 
78 
80  void SetCurrMessage(string Message) const;
81 
83  bool BuildIndex(string ProjectFile);
84 };
85 
86 
87 
88 #endif //PROJECT_CCONCINDEXATORINVOKER_H
89 
90 /*--- emacs style variables ---
91  * Local Variables:
92  * mode: C++
93  * c-file-style: "ellemtel"
94  * c-basic-offset: 4
95  * tab-width: 8
96  * indent-tabs-mode: nil
97  * End:
98  */
void PrintProgress(DWORD saveCorpusEndTokenNo)
Definition: ConcIndexatorInvoker.cpp:165
Definition: util_classes.h:76
string GetErrorLogFileName(string Path) const
Definition: ConcIndexatorInvoker.cpp:33
Definition: DocumentIterator.h:15
vector< string > m_ErrorCorpusFiles
Definition: ConcIndexatorInvoker.h:24
void WriteTimeStatistics(const CConcIndexator &Indexator, DWORD MaxTokenCountInOnePeriod) const
Definition: ConcIndexatorInvoker.cpp:40
CMyTimeSpanHolder m_Profiler
a slot to gather profiling information for loading stage
Definition: ConcIndexatorInvoker.h:74
void IndexFiles(CConcIndexator &Indexator)
Definition: ConcIndexatorInvoker.cpp:308
time_t m_StartTime
Definition: ConcIndexatorInvoker.h:22
void SaveLoadIndexToDisk(CConcIndexator &Indexator)
Definition: ConcIndexatorInvoker.cpp:176
CConcIndexatorInvoker is a class for invoking an index process.
Definition: ConcIndexatorInvoker.h:21
DWORD m_CorpusEndTokenNo
Definition: ConcIndexatorInvoker.h:23
int m_CurrentSourceFileNo
the index of the currently processing source file
Definition: ConcIndexatorInvoker.h:65
DWORD IndexFile(CConcIndexator &Indexator, CIndexDocument *document)
Definition: ConcIndexatorInvoker.cpp:195
void BuildOnlyMorphIndex(string ProjectFile) const
Definition: ConcIndexatorInvoker.cpp:116
void ProcessTarOrSingleFile(CConcIndexator &Indexator, size_t &InputLoadIndexSize, size_t &MemoryLoadIndexSize)
Definition: ConcIndexatorInvoker.cpp:279
bool m_bOnlyReindexMorphology
if true, then BuildIndex should only rebuild MorphPattern index
Definition: ConcIndexatorInvoker.h:54
bool BuildIndex(string ProjectFile)
builds index files for project ProjectFile
Definition: ConcIndexatorInvoker.cpp:335
bool m_bSkipInitialFileChecking
if true, then there is no initial checking whether the source files exist
Definition: ConcIndexatorInvoker.h:56
void FinalizeIndex(CConcIndexator &Indexator, DWORD MaxTokenCountInOnePeriod) const
Definition: ConcIndexatorInvoker.cpp:64
void BuildIndexStart(string ProjectFile, CConcIndexator &indexator)
Definition: ConcIndexatorInvoker.cpp:132
bool m_bStoppedByUser
if true, CConcIndexatorInvoker tries to stop indexing
Definition: ConcIndexatorInvoker.h:52
ConcIndexatorInvoker()
Definition: ConcIndexatorInvoker.cpp:10
void SetCurrMessage(string Message) const
outputs a message to stdout or to GUI
Definition: ConcIndexatorInvoker.cpp:22
Definition: RmlTar.cpp:49
Definition: DwdsThesaurus.h:25
bool m_bStdout
should DDC send all messages to stdout
Definition: ConcIndexatorInvoker.h:62
Definition: ConcIndexator.h:44
string GetTimeStatisticsFileName(string Path) const
Definition: ConcIndexatorInvoker.cpp:29
void AddInputLoadIndexToMemoryLoadIndexWrapper(CConcIndexator &Indexator)
Definition: ConcIndexatorInvoker.cpp:263
uint32_t DWORD
Definition: utilit.h:105
Definition: GraphmatFile.h:28
int m_SourceFilesNumber
the number of files to index
Definition: ConcIndexatorInvoker.h:68
string m_CurrMessage
the last message from indexing process
Definition: ConcIndexatorInvoker.h:59
string m_CurrentSourceFileName
the name of file
Definition: ConcIndexatorInvoker.h:71