ENH: shorten the symbols a bit and remove maps of std::string for map of cmStdString

This commit is contained in:
Bill Hoffman 2004-09-29 16:07:07 -04:00
parent 64a6ad4975
commit 5bf55d1590
10 changed files with 28 additions and 28 deletions

View File

@ -206,7 +206,7 @@ private:
}; };
//! Map of configuration properties //! Map of configuration properties
typedef std::map<std::string, std::string> tm_DartConfigurationMap; typedef std::map<cmStdString, cmStdString> tm_DartConfigurationMap;
std::string m_ToplevelPath; std::string m_ToplevelPath;
tm_DartConfigurationMap m_DartConfiguration; tm_DartConfigurationMap m_DartConfiguration;

View File

@ -74,7 +74,7 @@ bool cmCacheManager::LoadCache(const char* path)
bool cmCacheManager::LoadCache(const char* path, bool cmCacheManager::LoadCache(const char* path,
bool internal) bool internal)
{ {
std::set<std::string> emptySet; std::set<cmStdString> emptySet;
return this->LoadCache(path, internal, emptySet, emptySet); return this->LoadCache(path, internal, emptySet, emptySet);
} }
@ -155,8 +155,8 @@ bool cmCacheManager::ParseEntry(const char* entry,
bool cmCacheManager::LoadCache(const char* path, bool cmCacheManager::LoadCache(const char* path,
bool internal, bool internal,
std::set<std::string>& excludes, std::set<cmStdString>& excludes,
std::set<std::string>& includes) std::set<cmStdString>& includes)
{ {
std::string cacheFile = path; std::string cacheFile = path;
cacheFile += "/CMakeCache.txt"; cacheFile += "/CMakeCache.txt";

View File

@ -103,8 +103,8 @@ public:
bool LoadCache(const char* path); bool LoadCache(const char* path);
bool LoadCache(const char* path, bool internal); bool LoadCache(const char* path, bool internal);
bool LoadCache(const char* path, bool internal, bool LoadCache(const char* path, bool internal,
std::set<std::string>& excludes, std::set<cmStdString>& excludes,
std::set<std::string>& includes); std::set<cmStdString>& includes);
///! Save cache for given makefile. Saves to ouput home CMakeCache.txt. ///! Save cache for given makefile. Saves to ouput home CMakeCache.txt.
bool SaveCache(cmMakefile*) ; bool SaveCache(cmMakefile*) ;

View File

@ -36,7 +36,7 @@ public:
static cmDynamicLoaderCache* GetInstance(); static cmDynamicLoaderCache* GetInstance();
private: private:
std::map<std::string, cmLibHandle> m_CacheMap; std::map<cmStdString, cmLibHandle> m_CacheMap;
static cmDynamicLoaderCache* Instance; static cmDynamicLoaderCache* Instance;
}; };
@ -58,7 +58,7 @@ void cmDynamicLoaderCache::CacheFile(const char* path, const cmLibHandle& p)
bool cmDynamicLoaderCache::GetCacheFile(const char* path, cmLibHandle& p) bool cmDynamicLoaderCache::GetCacheFile(const char* path, cmLibHandle& p)
{ {
std::map<std::string, cmLibHandle>::iterator it = m_CacheMap.find(path); std::map<cmStdString, cmLibHandle>::iterator it = m_CacheMap.find(path);
if ( it != m_CacheMap.end() ) if ( it != m_CacheMap.end() )
{ {
p = it->second; p = it->second;
@ -69,7 +69,7 @@ bool cmDynamicLoaderCache::GetCacheFile(const char* path, cmLibHandle& p)
bool cmDynamicLoaderCache::FlushCache(const char* path) bool cmDynamicLoaderCache::FlushCache(const char* path)
{ {
std::map<std::string, cmLibHandle>::iterator it = m_CacheMap.find(path); std::map<cmStdString, cmLibHandle>::iterator it = m_CacheMap.find(path);
bool ret = false; bool ret = false;
if ( it != m_CacheMap.end() ) if ( it != m_CacheMap.end() )
{ {
@ -82,7 +82,7 @@ bool cmDynamicLoaderCache::FlushCache(const char* path)
void cmDynamicLoaderCache::FlushCache() void cmDynamicLoaderCache::FlushCache()
{ {
for ( std::map<std::string, cmLibHandle>::iterator it = m_CacheMap.begin(); for ( std::map<cmStdString, cmLibHandle>::iterator it = m_CacheMap.begin();
it != m_CacheMap.end(); it++ ) it != m_CacheMap.end(); it++ )
{ {
cmDynamicLoader::CloseLibrary(it->second); cmDynamicLoader::CloseLibrary(it->second);

View File

@ -436,7 +436,7 @@ void cmGlobalGenerator::Configure()
// now do it // now do it
this->RecursiveConfigure(lg,0.0f,0.9f); this->RecursiveConfigure(lg,0.0f,0.9f);
std::set<std::string> notFoundMap; std::set<cmStdString> notFoundMap;
// after it is all done do a ConfigureFinalPass // after it is all done do a ConfigureFinalPass
cmCacheManager* manager = 0; cmCacheManager* manager = 0;
for (i = 0; i < m_LocalGenerators.size(); ++i) for (i = 0; i < m_LocalGenerators.size(); ++i)
@ -480,7 +480,7 @@ void cmGlobalGenerator::Configure()
if(notFoundMap.size()) if(notFoundMap.size())
{ {
std::string notFoundVars; std::string notFoundVars;
for(std::set<std::string>::iterator ii = notFoundMap.begin(); for(std::set<cmStdString>::iterator ii = notFoundMap.begin();
ii != notFoundMap.end(); ++ii) ii != notFoundMap.end(); ++ii)
{ {
notFoundVars += *ii; notFoundVars += *ii;

View File

@ -36,7 +36,7 @@ bool cmLoadCacheCommand::InitialPass(std::vector<std::string> const& args)
// and they can not be overridden. // and they can not be overridden.
bool excludeFiles=false; bool excludeFiles=false;
unsigned int i; unsigned int i;
std::set<std::string> excludes; std::set<cmStdString> excludes;
for(i=0; i<args.size(); i++) for(i=0; i<args.size(); i++)
{ {
@ -58,7 +58,7 @@ bool cmLoadCacheCommand::InitialPass(std::vector<std::string> const& args)
// If this set is empty, no internal cache entries are // If this set is empty, no internal cache entries are
// brought in. // brought in.
bool includeFiles=false; bool includeFiles=false;
std::set<std::string> includes; std::set<cmStdString> includes;
for(i=0; i<args.size(); i++) for(i=0; i<args.size(); i++)
{ {

View File

@ -693,7 +693,7 @@ void cmLocalUnixMakefileGenerator::OutputLinkLibraries(std::ostream& fout,
const cmTarget &tgt) const cmTarget &tgt)
{ {
// Try to emit each search path once // Try to emit each search path once
std::set<std::string> emitted; std::set<cmStdString> emitted;
// Embed runtime search paths if possible and if required. // Embed runtime search paths if possible and if required.
bool outputRuntime = true; bool outputRuntime = true;
@ -1660,7 +1660,7 @@ void cmLocalUnixMakefileGenerator::OutputDependLibs(std::ostream& fout)
{ {
// Build a set of libraries that will be linked into any target in // Build a set of libraries that will be linked into any target in
// this directory. // this directory.
std::set<std::string> used; std::set<cmStdString> used;
// for each target // for each target
const cmTargets &tgts = m_Makefile->GetTargets(); const cmTargets &tgts = m_Makefile->GetTargets();
@ -1669,7 +1669,7 @@ void cmLocalUnixMakefileGenerator::OutputDependLibs(std::ostream& fout)
l != tgts.end(); l++) l != tgts.end(); l++)
{ {
// Each dependency should only be emitted once per target. // Each dependency should only be emitted once per target.
std::set<std::string> emitted; std::set<cmStdString> emitted;
if ((l->second.GetType() == cmTarget::SHARED_LIBRARY) if ((l->second.GetType() == cmTarget::SHARED_LIBRARY)
|| (l->second.GetType() == cmTarget::MODULE_LIBRARY) || (l->second.GetType() == cmTarget::MODULE_LIBRARY)
|| (l->second.GetType() == cmTarget::STATIC_LIBRARY) || (l->second.GetType() == cmTarget::STATIC_LIBRARY)
@ -1734,7 +1734,7 @@ void cmLocalUnixMakefileGenerator::OutputDependLibs(std::ostream& fout)
// build them in this makefile. If the library is in another // build them in this makefile. If the library is in another
// directory, add a rule to jump to that directory and make sure it // directory, add a rule to jump to that directory and make sure it
// exists. // exists.
for(std::set<std::string>::const_iterator lib = used.begin(); for(std::set<cmStdString>::const_iterator lib = used.begin();
lib != used.end(); ++lib) lib != used.end(); ++lib)
{ {
// loop over the list of directories that the libraries might // loop over the list of directories that the libraries might
@ -2315,8 +2315,8 @@ bool cmLocalUnixMakefileGenerator::OutputObjectDepends(std::ostream& fout)
// by the class cmMakeDepend GenerateMakefile // by the class cmMakeDepend GenerateMakefile
void cmLocalUnixMakefileGenerator::OutputCheckDepends(std::ostream& fout) void cmLocalUnixMakefileGenerator::OutputCheckDepends(std::ostream& fout)
{ {
std::set<std::string> emittedLowerPath; std::set<cmStdString> emittedLowerPath;
std::set<std::string> emitted; std::set<cmStdString> emitted;
// Iterate over every target. // Iterate over every target.
std::map<cmStdString, cmTarget>& targets = m_Makefile->GetTargets(); std::map<cmStdString, cmTarget>& targets = m_Makefile->GetTargets();
fout << "# Suppresses display of executed commands\n"; fout << "# Suppresses display of executed commands\n";
@ -2362,7 +2362,7 @@ void cmLocalUnixMakefileGenerator::OutputCheckDepends(std::ostream& fout)
} }
} }
fout << "\n\n# if any of these files changes run make dependlocal\n"; fout << "\n\n# if any of these files changes run make dependlocal\n";
std::set<std::string>::iterator i; std::set<cmStdString>::iterator i;
for(i = emitted.begin(); i != emitted.end(); ++i) for(i = emitted.begin(); i != emitted.end(); ++i)
{ {
fout << "cmake.depends: " << *i << "\n"; fout << "cmake.depends: " << *i << "\n";
@ -2371,7 +2371,7 @@ void cmLocalUnixMakefileGenerator::OutputCheckDepends(std::ostream& fout)
<< "\t$(MAKE) $(MAKESILENT) dependlocal\n\n"; << "\t$(MAKE) $(MAKESILENT) dependlocal\n\n";
fout << "\n\n"; fout << "\n\n";
fout << "# if a .h file is removed then run make dependlocal\n\n"; fout << "# if a .h file is removed then run make dependlocal\n\n";
for(std::set<std::string>::iterator it = emitted.begin(); for(std::set<cmStdString>::iterator it = emitted.begin();
it != emitted.end(); ++it) it != emitted.end(); ++it)
{ {
fout << *it << ":\n" fout << *it << ":\n"
@ -2387,7 +2387,7 @@ void cmLocalUnixMakefileGenerator::OutputCustomRules(std::ostream& fout)
// we cannot provide multiple rules for a single output // we cannot provide multiple rules for a single output
// so we will keep track of outputs to make sure we don't write // so we will keep track of outputs to make sure we don't write
// two rules. First found wins // two rules. First found wins
std::set<std::string> processedOutputs; std::set<cmStdString> processedOutputs;
// first output all custom rules // first output all custom rules
const std::vector<cmSourceFile*>& sources = m_Makefile->GetSourceFiles(); const std::vector<cmSourceFile*>& sources = m_Makefile->GetSourceFiles();
@ -2964,7 +2964,7 @@ void cmLocalUnixMakefileGenerator::OutputSourceObjectBuildRules(std::ostream& fo
{ {
fout << "# Rules to build source files :\n\n"; fout << "# Rules to build source files :\n\n";
std::set<std::string> rules; std::set<cmStdString> rules;
// Iterate over every target. // Iterate over every target.
std::map<cmStdString, cmTarget>& targets = m_Makefile->GetTargets(); std::map<cmStdString, cmTarget>& targets = m_Makefile->GetTargets();

View File

@ -1413,7 +1413,7 @@ const char* cmMakefile::GetSafeDefinition(const char* def) const
std::vector<std::string> cmMakefile::GetDefinitions(int cacheonly /* = 0 */) const std::vector<std::string> cmMakefile::GetDefinitions(int cacheonly /* = 0 */) const
{ {
std::map<std::string, int> definitions; std::map<cmStdString, int> definitions;
if ( !cacheonly ) if ( !cacheonly )
{ {
DefinitionMap::const_iterator it; DefinitionMap::const_iterator it;
@ -1430,7 +1430,7 @@ std::vector<std::string> cmMakefile::GetDefinitions(int cacheonly /* = 0 */) con
std::vector<std::string> res; std::vector<std::string> res;
std::map<std::string, int>::iterator fit; std::map<cmStdString, int>::iterator fit;
for ( fit = definitions.begin(); fit != definitions.end(); fit ++ ) for ( fit = definitions.begin(); fit != definitions.end(); fit ++ )
{ {
res.push_back(fit->first); res.push_back(fit->first);

View File

@ -44,7 +44,7 @@ void cmTarget::TraceVSDependencies(std::string projFile,
std::vector<cmSourceFile*> & classes = this->GetSourceFiles(); std::vector<cmSourceFile*> & classes = this->GetSourceFiles();
// use a deck to keep track of processed source files // use a deck to keep track of processed source files
std::queue<std::string> srcFilesToProcess; std::queue<std::string> srcFilesToProcess;
std::set<std::string> srcFilesQueued; std::set<cmStdString> srcFilesQueued;
std::string name; std::string name;
std::vector<cmSourceFile*> newClasses; std::vector<cmSourceFile*> newClasses;
for(std::vector<cmSourceFile*>::const_iterator i = classes.begin(); for(std::vector<cmSourceFile*>::const_iterator i = classes.begin();

View File

@ -98,7 +98,7 @@ int cmakewizard::RunWizard(std::vector<std::string> const& args)
make.SetCMakeCommand(args[0].c_str()); make.SetCMakeCommand(args[0].c_str());
make.LoadCache(); make.LoadCache();
make.SetCacheArgs(args); make.SetCacheArgs(args);
std::map<std::string,std::string> askedCache; std::map<cmStdString, cmStdString> askedCache;
bool asked = false; bool asked = false;
// continue asking questions until no new questions are asked // continue asking questions until no new questions are asked
do do