Code::Blocks  SVN r11506
parserthreadedtask.h
Go to the documentation of this file.
1 /*
2  * This file is part of the Code::Blocks IDE and licensed under the GNU General Public License, version 3
3  * http://www.gnu.org/licenses/gpl-3.0.html
4  */
5 
6 #ifndef PARSERTHREADEDTASK_H
7 #define PARSERTHREADEDTASK_H
8 
9 #include <wx/thread.h>
10 
11 #include <cbthreadpool.h>
12 
13 class Parser;
14 class cbProject;
15 
21 {
22 public:
23  ParserThreadedTask(Parser* parser, wxMutex& parserCS);
24 
25  // this function really do the following jobs:
26  // run sequence parsing jobs in a single thread, those include
27  // 1, parsing predefined macro buffers
28  // 2, parsing project files(mainly the implementation source files)
29  virtual int Execute();
30 
31 private:
34 };
35 
42 {
43 public:
44  MarkFileAsLocalThreadedTask(Parser* parser, cbProject* project);
45 
46  virtual int Execute();
47 
48 private:
51 };
52 
53 #endif // PARSERTHREADEDTASK_H
wxMutex & m_ParserMutex
a Parser object which contain TokenTree
cbProject * m_Project
a Parser object which contain TokenTree
virtual int Execute()
Override this function with the task&#39;s job Return value doesn&#39;t matter.
mark all the tokens belong to the project as "local" E.g.
Represents a Code::Blocks project.
Definition: cbproject.h:96
This is what you have to use instead of wxThread to add tasks to the Thread Pool. ...
a cbThreadedTask can be executed in cbThreadPool to do a lot of parsing jobs in the begining stage of...
ParserThreadedTask(Parser *parser, wxMutex &parserCS)
Parser class holds all the tokens of a C::B project.
Definition: parser.h:117