Commit 3154b783 authored by Brad King's avatar Brad King

Remove use of include <vtksys/ios/sstream> and vtksys_ios::*stringstream

Use the following commands to switch to standard header and namespace:

 git grep -l vtksys/ios | xargs sed -i 's|vtksys/ios/sstream|sstream|'
 git grep -l vtksys_ios:: | xargs sed -i 's|vtksys_ios::|std::|g'
parent 53e8c979
......@@ -31,7 +31,7 @@
#include <assert.h>
#include <string>
#include <vtksys/ios/sstream>
#include <sstream>
#include <vtksys/SystemTools.hxx>
//----------------------------------------------------------------------------
......
......@@ -28,7 +28,7 @@
#include <string>
#include <vtksys/SystemTools.hxx>
#include <vtksys/ios/sstream>
#include <sstream>
extern "C" {
void vtkPVInitializePythonModules();
......@@ -52,7 +52,7 @@ namespace
vtkPythonInterpreter::Initialize();
vtksys_ios::ostringstream loadPythonModules;
std::ostringstream loadPythonModules;
loadPythonModules
<< "import sys\n"
<< "import paraview\n"
......@@ -190,7 +190,7 @@ int vtkCPPythonScriptPipeline::Initialize(const char* fileName)
// del _source
// del _code
// import foo
vtksys_ios::ostringstream loadPythonModules;
std::ostringstream loadPythonModules;
loadPythonModules << "import types" << std::endl;
loadPythonModules << "_" << fileNameName << " = types.ModuleType('" << fileNameName << "')" << std::endl;
loadPythonModules << "_" << fileNameName << ".__file__ = '" << fileNameName << ".pyc'" << std::endl;
......@@ -230,7 +230,7 @@ int vtkCPPythonScriptPipeline::RequestDataDescription(
// check the script to see if it should be run...
vtkStdString dataDescriptionString = this->GetPythonAddress(dataDescription);
vtksys_ios::ostringstream pythonInput;
std::ostringstream pythonInput;
pythonInput << "dataDescription = vtkPVCatalystPython.vtkCPDataDescription('"
<< dataDescriptionString << "')\n"
<< this->PythonScriptName << ".RequestDataDescription(dataDescription)\n";
......@@ -254,7 +254,7 @@ int vtkCPPythonScriptPipeline::CoProcess(
vtkStdString dataDescriptionString = this->GetPythonAddress(dataDescription);
vtksys_ios::ostringstream pythonInput;
std::ostringstream pythonInput;
pythonInput
<< "dataDescription = vtkPVCatalystPython.vtkCPDataDescription('"
<< dataDescriptionString << "')\n"
......@@ -270,7 +270,7 @@ int vtkCPPythonScriptPipeline::Finalize()
{
InitializePython();
vtksys_ios::ostringstream pythonInput;
std::ostringstream pythonInput;
pythonInput
<< "if hasattr(" << this->PythonScriptName << ", 'Finalize'):\n"
<< " " << this->PythonScriptName << ".Finalize()\n";
......
......@@ -36,7 +36,7 @@ PURPOSE. See the above copyright notice for more information.
#include <assert.h>
#include <string>
#include <vtksys/ios/sstream>
#include <sstream>
//****************************************************************************
class vtkPVServerSideAnimationPlayer::vtkInternals
......
......@@ -19,7 +19,7 @@
#include "vtkProcessModule.h"
#include "vtkPythonInterpreter.h"
#include <vtksys/ios/sstream>
#include <sstream>
vtkStandardNewMacro(vtkPythonAnimationCue);
//----------------------------------------------------------------------------
......@@ -60,7 +60,7 @@ void vtkPythonAnimationCue::HandleStartCueEvent()
}
if (this->Script)
{
vtksys_ios::ostringstream stream;
std::ostringstream stream;
stream << "from paraview import servermanager" << endl;
stream << "def start_cue(foo): pass" << endl;
stream << this->Script << endl;
......@@ -97,7 +97,7 @@ void vtkPythonAnimationCue::HandleTickEvent()
}
if (this->Script)
{
vtksys_ios::ostringstream stream;
std::ostringstream stream;
stream << "from paraview import servermanager" << endl;
stream << this->Script << endl;
stream << "_me = servermanager.vtkPythonAnimationCue('" << aplus << "')\n";
......@@ -133,7 +133,7 @@ void vtkPythonAnimationCue::HandleEndCueEvent()
}
if (this->Script)
{
vtksys_ios::ostringstream stream;
std::ostringstream stream;
stream << "from paraview import servermanager" << endl;
stream << "def end_cue(foo): pass" << endl;
stream << this->Script << endl;
......
......@@ -18,7 +18,7 @@
#include "vtkSIProxy.h"
#include "vtkSMMessage.h"
#include <vtksys/ios/sstream>
#include <sstream>
vtkStandardNewMacro(vtkSIXMLAnimationWriterRepresentationProperty);
//----------------------------------------------------------------------------
......@@ -62,7 +62,7 @@ bool vtkSIXMLAnimationWriterRepresentationProperty::Push(
this->GetSIObject(proxy_ids[cc]));
// Assign unique group name for each source.
vtksys_ios::ostringstream groupname_str;
std::ostringstream groupname_str;
groupname_str << "source" << proxy_ids[cc];
stream << vtkClientServerStream::Invoke
<< object
......
......@@ -29,7 +29,7 @@
#include <map>
#include <string>
#include <vector>
#include <vtksys/ios/sstream>
#include <sstream>
//----------------------------------------------------------------------------
vtkStandardNewMacro(vtkXMLPVAnimationWriter);
......@@ -252,7 +252,7 @@ void vtkXMLPVAnimationWriter::WriteTime(double time)
std::string fname =
this->Internal->CreateFileName(i, this->GetFilePrefix(),
writer->GetDefaultFileExtension());
vtksys_ios::ostringstream entry_with_warning_C4701;
std::ostringstream entry_with_warning_C4701;
entry_with_warning_C4701
<< "<DataSet timestep=\"" << time
<< "\" group=\"" << this->Internal->InputGroupNames[i].c_str()
......@@ -326,7 +326,7 @@ vtkXMLPVAnimationWriterInternals::CreateFileName(int index,
const char* ext)
{
// Start with the directory and file name prefix.
vtksys_ios::ostringstream fn_with_warning_C4701;
std::ostringstream fn_with_warning_C4701;
fn_with_warning_C4701 << prefix << "/" << prefix << "_";
// Add the group name.
......
......@@ -27,7 +27,7 @@
#include <map>
#include <vector>
#include "vtksys/ios/sstream"
#include "sstream"
#include "vtksys/SystemTools.hxx"
#include "vtksys/SystemInformation.hxx"
......
......@@ -31,7 +31,7 @@
#include <map>
#include <set>
#include <vector>
#include <vtksys/ios/sstream>
#include <sstream>
namespace
{
......
......@@ -29,13 +29,13 @@
#include <string>
#include <vtksys/SystemTools.hxx>
#include <vtksys/Directory.hxx>
#include <vtksys/ios/sstream>
#include <sstream>
#include <cstdlib>
#define vtkPVPluginLoaderDebugMacro(x)\
{ if (this->DebugPlugin) {\
vtksys_ios::ostringstream vtkerror;\
std::ostringstream vtkerror;\
vtkerror << x;\
vtkOutputWindowDisplayText(vtkerror.str().c_str());} }
......@@ -395,7 +395,7 @@ bool vtkPVPluginLoader::LoadPluginInternal(const char* file, bool no_errors)
// totally bogus (even for the GUI layer).
if (pv_verfication_data != __PV_PLUGIN_VERIFICATION_STRING__)
{
vtksys_ios::ostringstream error;
std::ostringstream error;
error << "Mismatch in versions: \n" <<
"ParaView Signature: " << __PV_PLUGIN_VERIFICATION_STRING__ << "\n"
"Plugin Signature: " << pv_verfication_data.c_str();
......
......@@ -31,7 +31,7 @@
#include <assert.h>
#include <string>
#include <vector>
#include <vtksys/ios/sstream>
#include <sstream>
#include <vtksys/SystemTools.hxx>
#include <vtksys/String.hxx>
......@@ -47,7 +47,7 @@
#define vtkPVPluginTrackerDebugMacro(x)\
{ if (debug_plugin) {\
vtksys_ios::ostringstream vtkerror;\
std::ostringstream vtkerror;\
vtkerror << x << endl;\
vtkOutputWindowDisplayText(vtkerror.str().c_str());} }
......
......@@ -20,7 +20,7 @@
#include <vtksys/CommandLineArguments.hxx>
#include <vtksys/SystemTools.hxx>
#include <vtksys/ios/sstream>
#include <sstream>
//----------------------------------------------------------------------------
vtkStandardNewMacro(vtkPVPythonOptions);
......@@ -43,7 +43,7 @@ int vtkPVPythonOptions::PostProcess(int argc, const char* const* argv)
if ( this->PythonScriptName &&
vtksys::SystemTools::GetFilenameLastExtension(this->PythonScriptName) != ".py")
{
vtksys_ios::ostringstream str;
std::ostringstream str;
str << "Wrong batch script name: " << this->PythonScriptName;
this->SetErrorMessage(str.str().c_str());
return 0;
......
......@@ -18,7 +18,7 @@
#include "vtkProcessModule.h"
#include "vtkPVServerOptionsInternals.h"
#include <vtksys/ios/sstream>
#include <sstream>
#include <vtksys/SystemTools.hxx>
#include <cstdio>
......@@ -140,12 +140,12 @@ int vtkPVServerOptions::AddMachineInformation(const char** atts)
}
else if(key == "FullScreen")
{
vtksys_ios::istringstream str(const_cast<char *>(value.c_str()));
std::istringstream str(const_cast<char *>(value.c_str()));
str >> info.FullScreen;
}
else if(key == "ShowBorders")
{
vtksys_ios::istringstream str(const_cast<char *>(value.c_str()));
std::istringstream str(const_cast<char *>(value.c_str()));
str >> info.ShowBorders;
}
else if(key == "StereoType")
......@@ -186,7 +186,7 @@ int vtkPVServerOptions::AddMachineInformation(const char** atts)
else if(key == "LowerLeft")
{
caveBounds++;
vtksys_ios::istringstream str(const_cast<char *>(value.c_str()));
std::istringstream str(const_cast<char *>(value.c_str()));
for(int j =0; j < 3; j++)
{
str >> info.LowerLeft[j];
......@@ -195,7 +195,7 @@ int vtkPVServerOptions::AddMachineInformation(const char** atts)
else if(key == "LowerRight")
{
caveBounds++;
vtksys_ios::istringstream str(const_cast<char *>(value.c_str()));
std::istringstream str(const_cast<char *>(value.c_str()));
for(int j =0; j < 3; j++)
{
str >> info.LowerRight[j];
......@@ -204,7 +204,7 @@ int vtkPVServerOptions::AddMachineInformation(const char** atts)
else if(key == "UpperRight")
{
caveBounds++;
vtksys_ios::istringstream str(const_cast<char *>(value.c_str()));
std::istringstream str(const_cast<char *>(value.c_str()));
for(int j =0; j < 3; j++)
{
str >> info.UpperRight[j];
......@@ -231,7 +231,7 @@ int vtkPVServerOptions::AddEyeSeparationInformation(const char** atts)
std::string value = atts[1];
if(key == "Value")
{
vtksys_ios::istringstream str(const_cast<char *>(value.c_str()));
std::istringstream str(const_cast<char *>(value.c_str()));
str >> this->Internals->EyeSeparation;
}
else
......
......@@ -22,7 +22,7 @@
#include "vtkQuadricClustering.h"
#include "vtkTimerLog.h"
#include <vtksys/ios/sstream>
#include <sstream>
//----------------------------------------------------------------------------
vtkStandardNewMacro(vtkPVTimerInformation);
......@@ -146,7 +146,7 @@ void vtkPVTimerInformation::CopyFromObject(vtkObject*)
length = vtkTimerLog::GetNumberOfEvents() * 40;
if (length > 0)
{
vtksys_ios::ostringstream fptr;
std::ostringstream fptr;
//*fptr << "Hello world !!!\n ()";
vtkTimerLog::DumpLogWithIndents(&fptr, threshold);
fptr << ends;
......
......@@ -29,7 +29,7 @@
#include <assert.h>
#include <map>
#include <vector>
#include <vtksys/ios/sstream>
#include <sstream>
#include <vtksys/SystemTools.hxx>
vtkStandardNewMacro(vtkPythonAnnotationFilter);
......@@ -85,7 +85,7 @@ int vtkPythonAnnotationFilter::RequestData(
this->CurrentInputDataObject = input;
// Extract time information
vtksys_ios::ostringstream timeInfo;
std::ostringstream timeInfo;
if (vtkInformation* dataInformation = input->GetInformation())
{
if (dataInformation->Has(vtkDataObject::DATA_TIME_STEP()))
......@@ -161,7 +161,7 @@ static std::string vtkGetReferenceAsString(void* ref)
//----------------------------------------------------------------------------
void vtkPythonAnnotationFilter::EvaluateExpression()
{
vtksys_ios::ostringstream stream;
std::ostringstream stream;
stream
<< "def vtkPythonAnnotationFilter_EvaluateExpression():" << endl
<< " from paraview import annotation as pv_ann" << endl
......
......@@ -30,7 +30,7 @@
#include <vtksys/SystemTools.hxx>
#include <string>
#include <vtksys/ios/sstream>
#include <sstream>
#include <vector>
#include <map>
......@@ -318,7 +318,7 @@ vtkMultiProcessController* vtkTCPNetworkAccessManager::ConnectToRemote(
vtkSocketCommunicator* comm = vtkSocketCommunicator::SafeDownCast(
controller->GetCommunicator());
#if GENERATE_DEBUG_LOG
vtksys_ios::ostringstream mystr;
std::ostringstream mystr;
mystr << "/tmp/client."<< getpid() << ".log";
comm->LogToFile(mystr.str().c_str());
#endif
......
......@@ -19,7 +19,7 @@
#include "vtkPythonInterpreter.h"
#include <string>
#include <vtksys/ios/sstream>
#include <sstream>
#include <vtksys/SystemTools.hxx>
//----------------------------------------------------------------------------
......@@ -57,7 +57,7 @@ vtkAnnotateGlobalDataFilter::~vtkAnnotateGlobalDataFilter()
//----------------------------------------------------------------------------
void vtkAnnotateGlobalDataFilter::EvaluateExpression()
{
vtksys_ios::ostringstream stream;
std::ostringstream stream;
stream
<< "def vtkAnnotateGlobalDataFilter_EvaluateExpression():" << endl
<< " from paraview import annotation as pv_ann" << endl
......
......@@ -31,7 +31,7 @@
#include <map>
#include <string>
#include <vtksys/SystemTools.hxx>
#include <vtksys/ios/sstream>
#include <sstream>
vtkStandardNewMacro(vtkPythonCalculator);
......@@ -133,7 +133,7 @@ void vtkPythonCalculator::Exec(const char* expression)
aplus += 2; //skip over "0x"
}
vtksys_ios::ostringstream python_stream;
std::ostringstream python_stream;
python_stream
<< "import paraview\n"
<< "from paraview import calculator\n"
......
......@@ -40,7 +40,7 @@
#include "vtkSelectionNode.h"
#include "vtkTable.h"
#include <vtksys/ios/sstream>
#include <sstream>
#include <set>
#include <string>
......
......@@ -28,7 +28,7 @@
#include "vtkSelectionSerializer.h"
#include <assert.h>
#include <vtksys/ios/sstream>
#include <sstream>
vtkStandardNewMacro(vtkChartSelectionRepresentation);
//----------------------------------------------------------------------------
......@@ -133,7 +133,7 @@ int vtkChartSelectionRepresentation::RequestData(vtkInformation* request,
vtkMultiProcessController* controller = pm->GetGlobalController();
if (myId == 0)
{
vtksys_ios::ostringstream res;
std::ostringstream res;
vtkSelectionSerializer::PrintXML(res, vtkIndent(), 1, clone.GetPointer());
// Send the size of the string.
......
......@@ -32,7 +32,7 @@
#include "vtkStreamingDemandDrivenPipeline.h"
#include "vtkUnstructuredGrid.h"
#include <vtksys/ios/sstream>
#include <sstream>
vtkStandardNewMacro(vtkClientServerMoveData);
vtkCxxSetObjectMacro(vtkClientServerMoveData, Controller,
......@@ -214,7 +214,7 @@ int vtkClientServerMoveData::SendData(vtkDataObject* input,
}
else
{
vtksys_ios::ostringstream res;
std::ostringstream res;
vtkSelectionSerializer::PrintXML(res, vtkIndent(), 1, sel);
// Send the size of the string.
......
......@@ -50,7 +50,7 @@
#include "vtkUnstructuredGrid.h"
#include "vtk_zlib.h"
#include <vtksys/ios/sstream>
#include <sstream>
#include <vector>
#ifdef PARAVIEW_USE_MPI
......@@ -1068,7 +1068,7 @@ void vtkMPIMoveData::MarshalDataToBuffer(vtkDataObject* data)
// the extents.
int *extent = imageData->GetExtent();
double* origin = imageData->GetOrigin();
vtksys_ios::ostringstream stream;
std::ostringstream stream;
stream << "EXTENT " << extent[0] << " " <<
extent[1] << " " <<
extent[2] << " " <<
......
......@@ -21,7 +21,7 @@
#include "vtkUnsignedCharArray.h"
#include "vtkZlibImageCompressor.h"
#include <vtksys/ios/sstream>
#include <sstream>
#include <assert.h>
vtkStandardNewMacro(vtkPVClientServerSynchronizedRenderers);
......
......@@ -43,7 +43,7 @@
#include <map>
#include <set>
#include <vector>
#include <vtksys/ios/sstream>
#include <sstream>
#define VTK_MAX_CATEGORICAL_VALS (32)
......
......@@ -23,7 +23,7 @@
#include "vtkSelectionNode.h"
#include "vtkSelectionSerializer.h"
#include "vtkSmartPointer.h"
#include "vtksys/ios/sstream"
#include "sstream"
vtkStandardNewMacro(vtkPVSelectionInformation);
......@@ -111,7 +111,7 @@ void vtkPVSelectionInformation::CopyToStream(vtkClientServerStream* css)
css->Reset();
*css << vtkClientServerStream::Reply;
vtksys_ios::ostringstream res;
std::ostringstream res;
vtkSelectionSerializer::PrintXML(res, vtkIndent(), 1, this->Selection);
res << ends;
*css << res.str().c_str();
......
......@@ -33,7 +33,7 @@
#include "vtkTuple.h"
#include <vtksys/SystemTools.hxx>
#include <vtksys/ios/sstream>
#include <sstream>
#include <assert.h>
#include <map>
#include <set>
......@@ -610,7 +610,7 @@ vtkRenderWindow* vtkPVSynchronizedRenderWindows::NewRenderWindow()
vtkRenderWindow* window = vtkRenderWindow::New();
window->DoubleBufferOn();
window->AlphaBitPlanesOn();
vtksys_ios::ostringstream name_stream;
std::ostringstream name_stream;
if (this->Mode == BATCH)
{
name_stream << "ParaView (batch)";
......@@ -1714,7 +1714,7 @@ bool vtkPVSynchronizedRenderWindows::BroadcastToDataServer(vtkSelection* selecti
return true;
}
vtksys_ios::ostringstream xml_stream;
std::ostringstream xml_stream;
vtkSelectionSerializer::PrintXML(xml_stream, vtkIndent(), 1, selection);
vtkMultiProcessStream stream;
stream << xml_stream.str();
......
......@@ -35,7 +35,7 @@
#include "vtkContextMouseEvent.h"
#include <string>
#include <vtksys/ios/sstream>
#include <sstream>
class vtkPVXYChartView::vtkInternals
{
......@@ -708,7 +708,7 @@ void vtkPVXYChartView::Render(bool interactive)
}
if (this->InternalTitle)
{
vtksys_ios::ostringstream new_title;
std::ostringstream new_title;
std::string title(this->InternalTitle);
size_t pos = title.find("${TIME}");
if (pos != std::string::npos)
......
......@@ -30,7 +30,7 @@
#include "vtkTimerLog.h"
#include <algorithm>
#include <vtksys/ios/sstream>
#include <sstream>
class vtkPythonView::vtkInternals
......@@ -145,7 +145,7 @@ void vtkPythonView::Update()
}
// Import necessary items from ParaView
vtksys_ios::ostringstream importStream;
std::ostringstream importStream;
importStream << "import paraview" << endl
<< "from vtkPVClientServerCoreRenderingPython import vtkPythonView" << endl
<< "pythonView = vtkPythonView('" << addressOfThis << " ')" << endl;
......@@ -163,7 +163,7 @@ void vtkPythonView::Update()
// Update the data array settings. Do this only on servers where local data is available
if (this->IsLocalDataAvailable())
{
vtksys_ios::ostringstream setupDataCommandStream;
std::ostringstream setupDataCommandStream;
setupDataCommandStream
<< "from paraview import python_view\n"
<< "try:\n"
......@@ -413,7 +413,7 @@ void vtkPythonView::StillRender()
int width = this->Size[0] * this->Magnification;
int height = this->Size[1] * this->Magnification;
vtksys_ios::ostringstream renderCommandStream;
std::ostringstream renderCommandStream;
renderCommandStream
<< "from paraview import python_view\n"
<< "try:\n"
......
......@@ -22,7 +22,7 @@
#include <map>
#include <string>
#include <vector>
#include <vtksys/ios/sstream>
#include <sstream>
#include <sys/stat.h>
vtkStandardNewMacro(vtkClientServerInterpreter);
......@@ -274,7 +274,7 @@ vtkClientServerInterpreter::ProcessOneMessage(const vtkClientServerStream& css,
default:
{
// Command is not known.
vtksys_ios::ostringstream error;
std::ostringstream error;
error << "Message with type "
<< vtkClientServerStream::GetStringFromCommand(cmd)
<< " cannot be executed." << ends;
......@@ -348,7 +348,7 @@ vtkClientServerInterpreter
if(this->Internal->IDToMessageMap.find(id.ID) !=
this->Internal->IDToMessageMap.end())
{
vtksys_ios::ostringstream error;
std::ostringstream error;
error << "Attempt to create object with existing ID " << id.ID << "."
<< ends;
*this->LastResultMessage
......@@ -380,7 +380,7 @@ vtkClientServerInterpreter
else
{
// Object was not created.
vtksys_ios::ostringstream error;
std::ostringstream error;
error << "Cannot create object of type \"" << cname << "\"." << ends;
*this->LastResultMessage
<< vtkClientServerStream::Error << error.str().c_str()
......@@ -442,7 +442,7 @@ vtkClientServerInterpreter
else
{
// Command function was not found for the class.
vtksys_ios::ostringstream error;
std::ostringstream error;
const char* cname = obj? obj->GetClassName():"(vtk object is NULL)";
error << "Wrapper function not found for class \"" << cname << "\"."
<< ends;
......@@ -570,7 +570,7 @@ vtkClientServerInterpreter
if(this->Internal->IDToMessageMap.find(id.ID) !=
this->Internal->IDToMessageMap.end())
{
vtksys_ios::ostringstream error;
std::ostringstream error;
error << "Attempt to assign existing ID " << id.ID << "." << ends;
*this->LastResultMessage
<< vtkClientServerStream::Error << error.str().c_str()
......@@ -616,7 +616,7 @@ int vtkClientServerInterpreter::ExpandMessage(const vtkClientServerStream& in,
out.Reset();
if(inIndex < 0 || inIndex >= in.GetNumberOfMessages())
{
vtksys_ios::ostringstream error;
std::ostringstream error;
error << "ExpandMessage called to expand message index " << inIndex
<< " in a stream with " << in.GetNumberOfMessages()
<< " messages." << ends;
......
......@@ -26,7 +26,7 @@
#include <string>
#include <vector>
#include <vtksys/ios/sstream>
#include <sstream>
//----------------------------------------------------------------------------
// Portability of typename keyword.
......@@ -2334,7 +2334,7 @@ void vtkClientServerStream::PrintArgumentInternal(ostream& os, int message,
//----------------------------------------------------------------------------
const char* vtkClientServerStream::StreamToString() const
{