.cpp: Reorganized

git-svn-id: svn://ultimatepp.org/upp/trunk@8468 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2015-05-22 07:02:28 +00:00
parent 356811e3eb
commit b4308009df
3 changed files with 20 additions and 9 deletions

View file

@ -111,6 +111,7 @@ void ClearSources();
const Index<String>& GetAllSources();
void GatherSources(const String& master_path, const String& path_);
String GetMasterFile(const String& file);
const VectorMap<String, String>& GetAllSourceMasters();
struct Cpp {
static Index<String> kw;

View file

@ -18,6 +18,11 @@ const Index<String>& GetAllSources()
return sSrcFile.GetIndex();
}
const VectorMap<String, String>& GetAllSourceMasters()
{
return sSrcFile;
}
void GatherSources(const String& master_path, const String& path_, Vector<int>& parents)
{
RHITCOUNT("GatherSources");

View file

@ -138,18 +138,13 @@ void FinishCodeBase()
Qualify(CodeBase());
}
void BaseInfoSync(Progress& pi)
{ // clears temporary caches (file times etc..)
PPSync(TheIde()->IdeGetIncludePath());
LTIMESTOP("Gathering files");
ClearSources();
const Workspace& wspc = GetIdeWorkspace();
LTIMING("Gathering files");
void LoadDefs()
{
LTIMING("LoadDefs");
Vector<String> defs;
defs.Add(ConfigFile("global.defs"));
const Workspace& wspc = GetIdeWorkspace();
for(int i = 0; i < wspc.GetCount(); i++) {
pi.Step();
const Package& pk = wspc.GetPackage(i);
String n = wspc[i];
for(int i = 0; i < pk.file.GetCount(); i++) {
@ -171,7 +166,17 @@ void BaseInfoSync(Progress& pi)
h << LoadFile(defs[i]) << "\n";
SetPPDefs(h);
}
}
void BaseInfoSync(Progress& pi)
{ // clears temporary caches (file times etc..)
PPSync(TheIde()->IdeGetIncludePath());
LTIMESTOP("Gathering files");
ClearSources();
LoadDefs();
const Workspace& wspc = GetIdeWorkspace();
LTIMING("Gathering files");
pi.SetText("Gathering files");
pi.SetTotal(wspc.GetCount());
for(int pass = 0; pass < 2; pass++)