Commit 49695248 authored by Marcus D. Hanwell's avatar Marcus D. Hanwell Committed by Code Review
Browse files

Merge topic 'pipelinesource-noboost' into master

59a7a77c Remove boost dependence from vtkViewsInfovis
parents 179e285f 59a7a77c
find_package(Boost REQUIRED)
include_directories(${Boost_INCLUDE_DIRS})
SET(Module_SRCS
vtkApplyColors.cxx
vtkApplyIcons.cxx
......
......@@ -34,8 +34,6 @@
#include "vtkVariantArray.h"
#include "vtkView.h"
#include <boost/algorithm/string.hpp>
#include <vtksys/stl/map>
#include <vtksys/stl/stack>
#include <vtksys/ios/sstream>
......@@ -244,6 +242,20 @@ void vtkPipelineGraphSource::PipelineToDot(vtkAlgorithm* sink, ostream& output,
PipelineToDot(sinks, output, graph_name);
}
namespace {
void replace_all(std::string& str, std::string oldStr, std::string newStr)
{
size_t pos = 0;
while((pos = str.find(oldStr, pos)) != std::string::npos)
{
str.replace(pos, oldStr.length(), newStr);
pos += newStr.length();
}
}
}
void vtkPipelineGraphSource::PipelineToDot(vtkCollection* sinks, ostream& output, const vtkStdString& graph_name)
{
// Create a graph representation of the pipeline ...
......@@ -279,9 +291,9 @@ void vtkPipelineGraphSource::PipelineToDot(vtkCollection* sinks, ostream& output
std::string object_state;
for(std::getline(buffer, line); buffer; std::getline(buffer, line))
{
boost::algorithm::replace_all(line, "\"", "'");
boost::algorithm::replace_all(line, "\r", "");
boost::algorithm::replace_all(line, "\n", "");
replace_all(line, "\"", "'");
replace_all(line, "\r", "");
replace_all(line, "\n", "");
if(0 == line.find("Debug:"))
continue;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment