25 #define CC_PARSERTHREADEDTASK_DEBUG_OUTPUT 0 27 #if defined(CC_GLOBAL_DEBUG_OUTPUT) 28 #if CC_GLOBAL_DEBUG_OUTPUT == 1 29 #undef CC_PARSERTHREADEDTASK_DEBUG_OUTPUT 30 #define CC_PARSERTHREADEDTASK_DEBUG_OUTPUT 1 31 #elif CC_GLOBAL_DEBUG_OUTPUT == 2 32 #undef CC_PARSERTHREADEDTASK_DEBUG_OUTPUT 33 #define CC_PARSERTHREADEDTASK_DEBUG_OUTPUT 2 37 #if CC_PARSERTHREADEDTASK_DEBUG_OUTPUT == 1 38 #define TRACE(format, args...) \ 39 CCLogger::Get()->DebugLog(F(format, ##args)) 40 #define TRACE2(format, args...) 41 #elif CC_PARSERTHREADEDTASK_DEBUG_OUTPUT == 2 42 #define TRACE(format, args...) \ 45 if (g_EnableDebugTrace) \ 46 CCLogger::Get()->DebugLog(F(format, ##args)); \ 49 #define TRACE2(format, args...) \ 50 CCLogger::Get()->DebugLog(F(format, ##args)) 52 #define TRACE(format, args...) 53 #define TRACE2(format, args...) 60 m_ParserMutex(parserMTX)
66 TRACE(
_T(
"ParserThreadedTask::Execute(): Enter"));
77 TRACE(
_T(
"ParserThreadedTask::Execute(): Parse predefined macros(in buffer)"));
87 TRACE(
_T(
"ParserThreadedTask::Execute(): Parse source files"));
88 while (!batchFiles.empty())
90 TRACE(
_T(
"-ParserThreadedTask::Execute(): Parse %s"), batchFiles.front().wx_str());
92 batchFiles.pop_front();
106 TRACE(
_T(
"ParserThreadedTask::Execute(): Leave"));
114 m_Parser(parser), m_Project(project)
120 TRACE(
_T(
"MarkFileAsLocalThreadedTask::Execute()"));
wxMutex & m_ParserMutex
a Parser object which contain TokenTree
bool m_IgnoreThreadEvents
Parser::OnAllThreadsDone will be called when m_Pool finished its job, but when we run a batch parsing...
wxString relativeFilename
The relative (to the project) filename of this file.
cbProject * m_Project
a Parser object which contain TokenTree
#define CC_LOCKER_TRACK_P_MTX_UNLOCK
virtual int Execute()
Override this function with the task's job Return value doesn't matter.
virtual int Execute()
Override this function with the task's job Return value doesn't matter.
virtual FilesList & GetFilesList()
Provides an easy way to iterate all the files belonging in this target.
wxFileName file
The full filename of this file.
MarkFileAsLocalThreadedTask(Parser *parser, cbProject *project)
a container class to hold all the Tokens getting from parsing stage
bool Parse(const wxString &filename, bool isLocal=true, bool locked=false)
parse the file, either immediately or delayed.
#define TRACE(format, args...)
std::list< wxString > StringList
Represents a file in a Code::Blocks project.
EFileType FileType(const wxString &filename, bool force_refresh=false)
return a file type, which can be either header files or implementation files or other files ...
StringList m_BatchParseFiles
All other batch parse files, like the normal headers/sources.
Represents a Code::Blocks project.
#define CC_LOCKER_TRACK_TT_MTX_UNLOCK(M)
bool m_IsParsing
true, if the parser is still busy with parsing, false if the parsing stage has finished this value is...
void MarkFileTokensAsLocal(const wxString &filename, bool local=true, void *userData=0)
mark the tokens so that they are associated with a C::B project
#define CC_LOCKER_TRACK_TT_MTX_LOCK(M)
bool m_IsFirstBatch
batch Parse mode flag.
#define CC_LOCKER_TRACK_P_MTX_LOCK
wxString m_PredefinedMacros
Pre-defined macros, its a buffer queried from the compiler command line.
virtual void ClearPredefinedMacros()
clears the list of predefined macros after it has been parsed
virtual TokenTree * GetTokenTree() const
wxString GetFullPath(wxPathFormat format=wxPATH_NATIVE) const
virtual bool ParseBuffer(const wxString &buffer, bool isLocal, bool bufferSkipBlocks=false, bool isTemp=false, const wxString &filename=wxEmptyString, int parentIdx=-1, int initLine=0)
Must add a locker before call all named ParseBufferXXX functions, ParseBuffer function will directly ...
ParserThreadedTask(Parser *parser, wxMutex &parserCS)
Parser class holds all the tokens of a C::B project.