21 #define CC_SYSTEMHEADERSTHREAD_DEBUG_OUTPUT 0 23 #if defined(CC_GLOBAL_DEBUG_OUTPUT) 24 #if CC_GLOBAL_DEBUG_OUTPUT == 1 25 #undef CC_SYSTEMHEADERSTHREAD_DEBUG_OUTPUT 26 #define CC_SYSTEMHEADERSTHREAD_DEBUG_OUTPUT 1 27 #elif CC_GLOBAL_DEBUG_OUTPUT == 2 28 #undef CC_SYSTEMHEADERSTHREAD_DEBUG_OUTPUT 29 #define CC_SYSTEMHEADERSTHREAD_DEBUG_OUTPUT 2 33 #if CC_SYSTEMHEADERSTHREAD_DEBUG_OUTPUT == 1 34 #define TRACE(format, args...) \ 35 CCLogger::Get()->DebugLog(F(format, ##args)) 36 #define TRACE2(format, args...) 37 #elif CC_SYSTEMHEADERSTHREAD_DEBUG_OUTPUT == 2 38 #define TRACE(format, args...) \ 41 if (g_EnableDebugTrace) \ 42 CCLogger::Get()->DebugLog(F(format, ##args)); \ 45 #define TRACE2(format, args...) \ 46 CCLogger::Get()->DebugLog(F(format, ##args)) 48 #define TRACE(format, args...) 49 #define TRACE2(format, args...) 101 bool operator< (
const FileID &f)
const 103 if (st_dev == f.st_dev)
104 return st_ino < f.st_ino;
106 return st_dev<f.st_dev;
110 std::set<FileID> m_VisitedDirsByID;
143 m_IncludeDirs(incDirs)
151 TRACE(
_T(
"SystemHeadersThread: Terminated."));
172 for (
size_t i=0; i<dirs.
GetCount(); ++i)
189 evt.SetClientData(
this);
198 evt.SetClientData(
this);
211 evt.SetClientData(
this);
212 evt.SetString(
wxString::Format(
_T(
"SystemHeadersThread: Traversing %s finished, found %lu headers; time: %.3lf sec"),
215 timer.
Time()*0.001));
223 evt.SetClientData(
this);
227 static_cast<unsigned long>(dirs.
GetCount())));
232 TRACE(
_T(
"SystemHeadersThread: Done."));
246 m_SearchDir(searchDir),
247 m_Headers(headersMap[searchDir]),
296 if (stat(dirname.
utf8_str().data(), &s)==0)
302 if (m_VisitedDirsByID.find(f) != m_VisitedDirsByID.end())
304 m_VisitedDirsByID.insert(f);
313 if (path.
Last() != wxFILE_SEP_PATH)
314 path.
Append(wxFILE_SEP_PATH);
328 TRACE(
_T(
"HeaderDirTraverser: %lu directories and %lu files traversed. Unlocking temporarily."), static_cast<unsigned long>(
m_Dirs), static_cast<unsigned long>(
m_Files));
const wxScopedCharBuffer utf8_str() const
void SetPriority(unsigned int priority)
wxThreadError Create(unsigned int stackSize=0)
bool IsAbsolute(wxPathFormat format=wxPATH_NATIVE) const
virtual bool TestDestroy()
size_t Traverse(wxDirTraverser &sink, const wxString &filespec=wxEmptyString, int flags=wxDIR_DEFAULT) const
bool MakeRelativeTo(const wxString &pathBase=wxEmptyString, wxPathFormat format=wxPATH_NATIVE)
void wxPostEvent(wxEvtHandler *dest, const wxEvent &event)
size_t Replace(const wxString &strOld, const wxString &strNew, bool replaceAll=true)
DLLIMPORT wxString cbResolveSymLinkedDirPathRecursive(wxString dirpath)
Call cbResolveSymLinkedPath until the path is not a symlink.
wxString & Append(const char *psz)
void Start(long milliseconds=0)
size_t Add(const wxString &str, size_t copies=1)
wxUniChar GetChar(size_t n) const
wxString GetFullPath(wxPathFormat format=wxPATH_NATIVE) const
static wxString Format(const wxString &format,...)
size_t GetDirCount() const
std::set< wxString > StringSet