diff options
Diffstat (limited to 'Source/cmGraphVizWriter.cxx')
-rw-r--r-- | Source/cmGraphVizWriter.cxx | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/Source/cmGraphVizWriter.cxx b/Source/cmGraphVizWriter.cxx index db964a9..601993f 100644 --- a/Source/cmGraphVizWriter.cxx +++ b/Source/cmGraphVizWriter.cxx @@ -121,7 +121,7 @@ void cmGraphVizWriter::ReadSettings(const char* settingsFileName, __set_bool_if_set(this->GeneratePerTarget, "GRAPHVIZ_GENERATE_PER_TARGET"); __set_bool_if_set(this->GenerateDependers, "GRAPHVIZ_GENERATE_DEPENDERS"); - cmStdString ignoreTargetsRegexes; + std::string ignoreTargetsRegexes; __set_if_set(ignoreTargetsRegexes, "GRAPHVIZ_IGNORE_TARGETS"); this->TargetsToIgnoreRegex.clear(); @@ -135,7 +135,7 @@ void cmGraphVizWriter::ReadSettings(const char* settingsFileName, itvIt != ignoreTargetsRegExVector.end(); ++ itvIt ) { - cmStdString currentRegexString(*itvIt); + std::string currentRegexString(*itvIt); cmsys::RegularExpression currentRegex; if (!currentRegex.compile(currentRegexString.c_str())) { @@ -160,7 +160,7 @@ void cmGraphVizWriter::WriteTargetDependersFiles(const char* fileName) this->CollectTargetsAndLibs(); - for(std::map<cmStdString, const cmTarget*>::const_iterator ptrIt = + for(std::map<std::string, const cmTarget*>::const_iterator ptrIt = this->TargetPtrs.begin(); ptrIt != this->TargetPtrs.end(); ++ptrIt) @@ -192,7 +192,7 @@ void cmGraphVizWriter::WriteTargetDependersFiles(const char* fileName) std::cout << "Writing " << currentFilename << "..." << std::endl; this->WriteHeader(str); - this->WriteDependerConnections(ptrIt->first.c_str(), + this->WriteDependerConnections(ptrIt->first, insertedNodes, insertedConnections, str); this->WriteFooter(str); @@ -211,7 +211,7 @@ void cmGraphVizWriter::WritePerTargetFiles(const char* fileName) this->CollectTargetsAndLibs(); - for(std::map<cmStdString, const cmTarget*>::const_iterator ptrIt = + for(std::map<std::string, const cmTarget*>::const_iterator ptrIt = this->TargetPtrs.begin(); ptrIt != this->TargetPtrs.end(); ++ptrIt) @@ -241,7 +241,7 @@ void cmGraphVizWriter::WritePerTargetFiles(const char* fileName) std::cout << "Writing " << currentFilename << "..." << std::endl; this->WriteHeader(str); - this->WriteConnections(ptrIt->first.c_str(), + this->WriteConnections(ptrIt->first, insertedNodes, insertedConnections, str); this->WriteFooter(str); } @@ -265,7 +265,7 @@ void cmGraphVizWriter::WriteGlobalFile(const char* fileName) std::set<std::string> insertedConnections; std::set<std::string> insertedNodes; - for(std::map<cmStdString, const cmTarget*>::const_iterator ptrIt = + for(std::map<std::string, const cmTarget*>::const_iterator ptrIt = this->TargetPtrs.begin(); ptrIt != this->TargetPtrs.end(); ++ptrIt) @@ -280,7 +280,7 @@ void cmGraphVizWriter::WriteGlobalFile(const char* fileName) continue; } - this->WriteConnections(ptrIt->first.c_str(), + this->WriteConnections(ptrIt->first, insertedNodes, insertedConnections, str); } this->WriteFooter(str); @@ -300,12 +300,12 @@ void cmGraphVizWriter::WriteFooter(cmGeneratedFileStream& str) const } -void cmGraphVizWriter::WriteConnections(const char* targetName, +void cmGraphVizWriter::WriteConnections(const std::string& targetName, std::set<std::string>& insertedNodes, std::set<std::string>& insertedConnections, cmGeneratedFileStream& str) const { - std::map<cmStdString, const cmTarget* >::const_iterator targetPtrIt = + std::map<std::string, const cmTarget* >::const_iterator targetPtrIt = this->TargetPtrs.find(targetName); if (targetPtrIt == this->TargetPtrs.end()) // not found at all @@ -331,7 +331,7 @@ void cmGraphVizWriter::WriteConnections(const char* targetName, ++ llit ) { const char* libName = llit->first.c_str(); - std::map<cmStdString, cmStdString>::const_iterator libNameIt = + std::map<std::string, std::string>::const_iterator libNameIt = this->TargetNamesNodes.find(libName); // can happen e.g. if GRAPHVIZ_TARGET_IGNORE_REGEX is used @@ -349,8 +349,8 @@ void cmGraphVizWriter::WriteConnections(const char* targetName, this->WriteNode(libName, this->TargetPtrs.find(libName)->second, insertedNodes, str); - str << " \"" << myNodeName.c_str() << "\" -> \"" - << libNameIt->second.c_str() << "\""; + str << " \"" << myNodeName << "\" -> \"" + << libNameIt->second << "\""; str << " // " << targetName << " -> " << libName << std::endl; this->WriteConnections(libName, insertedNodes, insertedConnections, str); } @@ -359,12 +359,12 @@ void cmGraphVizWriter::WriteConnections(const char* targetName, } -void cmGraphVizWriter::WriteDependerConnections(const char* targetName, +void cmGraphVizWriter::WriteDependerConnections(const std::string& targetName, std::set<std::string>& insertedNodes, std::set<std::string>& insertedConnections, cmGeneratedFileStream& str) const { - std::map<cmStdString, const cmTarget* >::const_iterator targetPtrIt = + std::map<std::string, const cmTarget* >::const_iterator targetPtrIt = this->TargetPtrs.find(targetName); if (targetPtrIt == this->TargetPtrs.end()) // not found at all @@ -383,7 +383,7 @@ void cmGraphVizWriter::WriteDependerConnections(const char* targetName, std::string myNodeName = this->TargetNamesNodes.find(targetName)->second; // now search who links against me - for(std::map<cmStdString, const cmTarget*>::const_iterator dependerIt = + for(std::map<std::string, const cmTarget*>::const_iterator dependerIt = this->TargetPtrs.begin(); dependerIt != this->TargetPtrs.end(); ++dependerIt) @@ -407,11 +407,11 @@ void cmGraphVizWriter::WriteDependerConnections(const char* targetName, llit != ll->end(); ++ llit ) { - std::string libName = llit->first.c_str(); + std::string libName = llit->first; if (libName == targetName) { // So this target links against targetName. - std::map<cmStdString, cmStdString>::const_iterator dependerNodeNameIt = + std::map<std::string, std::string>::const_iterator dependerNodeNameIt = this->TargetNamesNodes.find(dependerIt->first); if(dependerNodeNameIt != this->TargetNamesNodes.end()) @@ -424,13 +424,13 @@ void cmGraphVizWriter::WriteDependerConnections(const char* targetName, insertedConnections.end()) { insertedConnections.insert(connectionName); - this->WriteNode(dependerIt->first.c_str(), dependerIt->second, + this->WriteNode(dependerIt->first, dependerIt->second, insertedNodes, str); str << " \"" << dependerNodeNameIt->second << "\" -> \"" << myNodeName << "\""; str << " // " <<targetName<< " -> " <<dependerIt->first<<std::endl; - this->WriteDependerConnections(dependerIt->first.c_str(), + this->WriteDependerConnections(dependerIt->first, insertedNodes, insertedConnections, str); } @@ -444,7 +444,7 @@ void cmGraphVizWriter::WriteDependerConnections(const char* targetName, } -void cmGraphVizWriter::WriteNode(const char* targetName, +void cmGraphVizWriter::WriteNode(const std::string& targetName, const cmTarget* target, std::set<std::string>& insertedNodes, cmGeneratedFileStream& str) const @@ -452,10 +452,10 @@ void cmGraphVizWriter::WriteNode(const char* targetName, if (insertedNodes.find(targetName) == insertedNodes.end()) { insertedNodes.insert(targetName); - std::map<cmStdString, cmStdString>::const_iterator nameIt = + std::map<std::string, std::string>::const_iterator nameIt = this->TargetNamesNodes.find(targetName); - str << " \"" << nameIt->second.c_str() << "\" [ label=\"" + str << " \"" << nameIt->second << "\" [ label=\"" << targetName << "\" shape=\"" << getShapeForTarget(target) << "\"];" << std::endl; } @@ -540,7 +540,7 @@ int cmGraphVizWriter::CollectAllExternalLibs(int cnt) continue; } - std::map<cmStdString, const cmTarget*>::const_iterator tarIt = + std::map<std::string, const cmTarget*>::const_iterator tarIt = this->TargetPtrs.find(libName); if ( tarIt == this->TargetPtrs.end() ) { @@ -558,7 +558,7 @@ int cmGraphVizWriter::CollectAllExternalLibs(int cnt) } -bool cmGraphVizWriter::IgnoreThisTarget(const char* name) +bool cmGraphVizWriter::IgnoreThisTarget(const std::string& name) { for(std::vector<cmsys::RegularExpression>::iterator itvIt = this->TargetsToIgnoreRegex.begin(); |