Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove usage of removed vtksys:: stringstream's. #286

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion smtk/bridge/discrete/extension/reader/vtkCUBITReader.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include "vtkPolyData.h"
#include "vtkPolyDataNormals.h"

#include <vtksys/ios/sstream>
#include <sstream>

namespace smtk {
namespace bridge {
Expand Down
4 changes: 2 additions & 2 deletions smtk/bridge/discrete/kernel/Serialize/vtkModelXMLParser.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include "vtkModelXMLParser.h"
#include "vtkObjectFactory.h"
#include "vtkXMLElement.h"
#include "vtksys/ios/sstream"
#include <sstream>

vtkStandardNewMacro(vtkModelXMLParser);

Expand Down Expand Up @@ -63,7 +63,7 @@ void vtkModelXMLParser::StartElement(const char* name, const char** atts)
}
else
{
vtksys_ios::ostringstream idstr;
std::ostringstream idstr;
idstr << this->ElementIdIndex++ << ends;
element->SetId(idstr.str().c_str());
}
Expand Down
4 changes: 2 additions & 2 deletions smtk/bridge/discrete/kernel/Serialize/vtkXMLArchiveReader.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
#include <list>
#include <map>
#include <vtksys/SystemTools.hxx>
#include <vtksys/ios/sstream>
#include <sstream>

vtkStandardNewMacro(vtkXMLArchiveReader);

Expand Down Expand Up @@ -402,7 +402,7 @@ void SerializeKeyVectorKey(vtkInformation* info,
return;
}

vtksys_ios::istringstream valueStr(values);
std::istringstream valueStr(values);
for (int i = 0; i < length; ++i)
{
std::string keyName;
Expand Down
8 changes: 4 additions & 4 deletions smtk/bridge/discrete/kernel/Serialize/vtkXMLArchiveWriter.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#include <list>
#include <map>
#include <algorithm>
#include "vtksys/ios/sstream"
#include <sstream>

vtkStandardNewMacro(vtkXMLArchiveWriter);

Expand Down Expand Up @@ -229,7 +229,7 @@ void SerializeStringVectorKey(vtkInformation* info,
keyElem->SetName(keyName);
parent->AddNestedElement(keyElem);

vtksys_ios::ostringstream valueStr;
std::ostringstream valueStr;
unsigned int length = static_cast<unsigned int>(info->Length(key));
int* lengths = new int[length];
for (unsigned int i = 0; i < length; ++i)
Expand Down Expand Up @@ -258,7 +258,7 @@ void SerializeKeyVectorKey(vtkInformation* info,
keyElem->SetName(keyName);
parent->AddNestedElement(keyElem);

vtksys_ios::ostringstream valueStr;
std::ostringstream valueStr;
unsigned int length = static_cast<unsigned int>(info->Length(key));
for (unsigned int i = 0; i < length; ++i)
{
Expand Down Expand Up @@ -422,7 +422,7 @@ void vtkXMLArchiveWriter::Serialize(const char* name,
for(; iter != map.end(); iter++)
{
std::vector<vtkSmartPointer<vtkObject> >& objs = iter->second;
vtksys_ios::ostringstream str;
std::ostringstream str;
str << "Key_" << iter->first;
this->Serialize(str.str().c_str(), objs);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ class VTKSMTKDISCRETEMODEL_EXPORT vtkXMLArchiveWriter : public vtkSerializer
//
// vtkSmartPointer<vtkXMLArchiveWriter> writer =
// vtkSmartPointer<vtkXMLArchiveWriter>::New();
// vtksys_ios::ostringstream ostr;
// std::ostringstream ostr;
// writer->SetArchiveVersion(1);
// std::vector<vtkSmartPointer<vtkObject> > objs;
// objs.push_back(root);
Expand Down
22 changes: 11 additions & 11 deletions smtk/bridge/discrete/kernel/Serialize/vtkXMLElement.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ vtkStandardNewMacro(vtkXMLElement);

#include <string>
#include <vector>
#include <vtksys/ios/sstream>
#include <sstream>

#if defined(_WIN32) && !defined(__CYGWIN__)
# define SNPRINTF _snprintf
Expand Down Expand Up @@ -73,23 +73,23 @@ void vtkXMLElement::PrintSelf(ostream& os, vtkIndent indent)
void vtkXMLElement::AddAttribute(const char* attrName,
unsigned int attrValue)
{
vtksys_ios::ostringstream valueStr;
std::ostringstream valueStr;
valueStr << attrValue << ends;
this->AddAttribute(attrName, valueStr.str().c_str());
}

//----------------------------------------------------------------------------
void vtkXMLElement::AddAttribute(const char* attrName, int attrValue)
{
vtksys_ios::ostringstream valueStr;
std::ostringstream valueStr;
valueStr << attrValue << ends;
this->AddAttribute(attrName, valueStr.str().c_str());
}

//----------------------------------------------------------------------------
void vtkXMLElement::AddAttribute(const char* attrName, unsigned long attrValue)
{
vtksys_ios::ostringstream valueStr;
std::ostringstream valueStr;
valueStr << attrValue << ends;
this->AddAttribute(attrName, valueStr.str().c_str());
}
Expand All @@ -98,7 +98,7 @@ void vtkXMLElement::AddAttribute(const char* attrName, unsigned long attrValue)
//----------------------------------------------------------------------------
void vtkXMLElement::AddAttribute(const char* attrName, vtkIdType attrValue)
{
vtksys_ios::ostringstream valueStr;
std::ostringstream valueStr;
valueStr << attrValue << ends;
this->AddAttribute(attrName, valueStr.str().c_str());
}
Expand All @@ -107,7 +107,7 @@ void vtkXMLElement::AddAttribute(const char* attrName, vtkIdType attrValue)
//----------------------------------------------------------------------------
void vtkXMLElement::AddAttribute(const char* attrName, double attrValue)
{
vtksys_ios::ostringstream valueStr;
std::ostringstream valueStr;
valueStr << attrValue << ends;
this->AddAttribute(attrName, valueStr.str().c_str());
}
Expand Down Expand Up @@ -135,7 +135,7 @@ void vtkXMLElement::AddAttribute(const char* attrName,
return;
}

vtksys_ios::ostringstream valueStr;
std::ostringstream valueStr;
for(unsigned int i=0; i<length; i++)
{
valueStr << vals[i];
Expand All @@ -156,7 +156,7 @@ void vtkXMLElement::AddAttribute(const char *attrName,
return;
}

vtksys_ios::ostringstream valueStr;
std::ostringstream valueStr;
for(unsigned int i=0; i<length; i++)
{
valueStr << vals[i] << " ";
Expand All @@ -175,7 +175,7 @@ void vtkXMLElement::AddAttribute(const char* attrName,
return;
}

vtksys_ios::ostringstream valueStr;
std::ostringstream valueStr;
for(unsigned int i=0; i<length; i++)
{
valueStr << vals[i] << " ";
Expand All @@ -195,7 +195,7 @@ void vtkXMLElement::AddAttribute(const char* attrName,
return;
}

vtksys_ios::ostringstream valueStr;
std::ostringstream valueStr;
for(unsigned int i=0; i<length; i++)
{
valueStr << vals[i] << " ";
Expand Down Expand Up @@ -523,7 +523,7 @@ unsigned int vtkXMLVectorAttributeParse(const char* str,
T* data)
{
if(!str || !length) { return 0; }
vtksys_ios::stringstream vstr;
std::stringstream vstr;
vstr << str << ends;
for(unsigned int i=0; i < length; ++i)
{
Expand Down
6 changes: 3 additions & 3 deletions smtk/bridge/discrete/kernel/vtkDiscreteModelWrapper.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
#include "vtkStringArray.h"
#include "vtkCompositeDataIterator.h"
#include "vtkModelItemIterator.h"
#include <vtksys/ios/sstream>
#include <sstream>

vtkStandardNewMacro(vtkDiscreteModelWrapper);
//vtkCxxSetObjectMacro(vtkDiscreteModelWrapper, Model, vtkDiscreteModel);
Expand Down Expand Up @@ -252,7 +252,7 @@ vtkStringArray* vtkDiscreteModelWrapper::SerializeModel()
}
vtkSmartPointer<vtkXMLModelWriter> serializer =
vtkSmartPointer<vtkXMLModelWriter>::New();
vtksys_ios::ostringstream ostr;
std::ostringstream ostr;
// Set to version to 1 (default is 0)
serializer->SetArchiveVersion(1);
// The archiver expects a vector of objects
Expand Down Expand Up @@ -306,7 +306,7 @@ int vtkDiscreteModelWrapper::RebuildModel(const char* data,
this->Model->Reset();

// Create an input stream to read the XML back
vtksys_ios::istringstream istr(data);
std::istringstream istr(data);
vtkSmartPointer<vtkXMLModelReader> reader =
vtkSmartPointer<vtkXMLModelReader>::New();

Expand Down
8 changes: 4 additions & 4 deletions smtk/bridge/discrete/kernel/vtkXMLModelReader.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
#include "vtkType.h"
#
#include <map>
#include "vtksys/ios/sstream"
#include <sstream>
#include <vtksys/SystemTools.hxx>


Expand Down Expand Up @@ -375,7 +375,7 @@ vtkModelLoopUse* vtkXMLModelReader::ConstructModelLoopUse(int /*id*/)
for(size_t i=0;i<associatedModelEdgeUses.size();i++)
{
// get edge use adjacencies
vtksys_ios::ostringstream idstr;
std::ostringstream idstr;
idstr << associatedModelEdgeUses[i] << ends;
vtkXMLElement* edgeUseElement =
this->RootElement->FindNestedElement(idstr.str().c_str());
Expand Down Expand Up @@ -479,7 +479,7 @@ vtkModelRegion* vtkXMLModelReader::ConstructModelRegion(int id)
this->Model->GetModelEntity(vtkModelMaterialType, associations[vtkModelMaterialType][0]));

// get shell use adjacencies
vtksys_ios::ostringstream idstr;
std::ostringstream idstr;
idstr << associations[vtkModelShellUseType][0] << ends;
vtkXMLElement* shellElement = this->RootElement->FindNestedElement(idstr.str().c_str());
std::vector<vtkIdType> shellFaceUses;
Expand Down Expand Up @@ -619,7 +619,7 @@ vtkModelEdgeUse* vtkXMLModelReader::ConstructModelEdgeUse(int id)
for(size_t i=0;i<associations[vtkModelVertexUseType].size();i++)
{
// get vertex use adjacencies
vtksys_ios::ostringstream idstr;
std::ostringstream idstr;
idstr << associations[vtkModelVertexUseType][i] << ends;
vtkXMLElement* vertexUseElement =
this->RootElement->FindNestedElement(idstr.str().c_str());
Expand Down
6 changes: 3 additions & 3 deletions smtk/bridge/discrete/kernel/vtkXMLModelWriter.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

#include <list>
#include <map>
#include "vtksys/ios/sstream"
#include <sstream>

vtkStandardNewMacro(vtkXMLModelWriter);

Expand Down Expand Up @@ -303,7 +303,7 @@ void vtkXMLModelWriter::Serialize(const char* name,
for(; iter != map.end(); iter++)
{
std::vector<vtkSmartPointer<vtkObject> >& objs = iter->second;
vtksys_ios::ostringstream str;
std::ostringstream str;
str << "Key_" << iter->first;
this->Serialize(str.str().c_str(), objs);
}
Expand Down Expand Up @@ -340,7 +340,7 @@ vtkXMLElement* vtkXMLModelWriter::CreateDOM(const char* rootName,
return this->RootElement;
}

void vtkXMLModelWriter::Serialize(vtksys_ios::ostringstream& ostr, const char* rootName,
void vtkXMLModelWriter::Serialize(std::ostringstream& ostr, const char* rootName,
std::vector<vtkSmartPointer<vtkObject> >& objs)
{
if(this->Internal)
Expand Down
6 changes: 3 additions & 3 deletions smtk/bridge/discrete/kernel/vtkXMLModelWriter.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@


#include <vector> // Vector of smart pointers
#include <vtksys/ios/sstream>
#include <sstream>
#include "vtkSmartPointer.h" // Vector of smart pointers

//BTX
Expand Down Expand Up @@ -90,13 +90,13 @@ class VTKSMTKDISCRETEMODEL_EXPORT vtkXMLModelWriter : public vtkSerializer
//
// vtkSmartPointer<vtkXMLModelWriter> writer =
// vtkSmartPointer<vtkXMLModelWriter>::New();
// vtksys_ios::ostringstream ostr;
// std::ostringstream ostr;
// writer->SetArchiveVersion(1);
// std::vector<vtkSmartPointer<vtkSerializableObject> > objs;
// objs.push_back(shell);
// writer->Serialize(ostr, "ConceptualModel", objs);
// \endcode
virtual void Serialize(vtksys_ios::ostringstream& ostr, const char* rootName,
virtual void Serialize(std::ostringstream& ostr, const char* rootName,
std::vector<vtkSmartPointer<vtkObject> >& objs);
//ETX

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include "vtkSMProxyManager.h"
#include "vtkSMStringVectorProperty.h"

#include <vtksys/ios/sstream>
#include <sstream>

vtkStandardNewMacro(vtkCMBImportBCFileOperatorClient);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include "vtkSMSession.h"
#include "vtkSMStringVectorProperty.h"

#include <vtksys/ios/sstream>
#include <sstream>

vtkStandardNewMacro(vtkCMBModelBuilder2DClient);

Expand Down Expand Up @@ -116,7 +116,7 @@ bool vtkCMBModelBuilder2DClient::UpdateClientModel(vtkDiscreteModel* ClientModel
const char* data = SerializedModel->GetElement(0);

// Create an input stream to read the XML back
vtksys_ios::istringstream istr(data);
std::istringstream istr(data);
vtkSmartPointer<vtkXMLModelReader> reader =
vtkSmartPointer<vtkXMLModelReader>::New();
ClientModel->Reset();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include "vtkSMProxyManager.h"
#include "vtkSMStringVectorProperty.h"

#include <vtksys/ios/sstream>
#include <sstream>

vtkStandardNewMacro(vtkCMBModelBuilderClient);

Expand Down Expand Up @@ -105,7 +105,7 @@ bool vtkCMBModelBuilderClient::UpdateClientModel(vtkDiscreteModel* ClientModel,
const char* data = SerializedModel->GetElement(0);

// Create an input stream to read the XML back
vtksys_ios::istringstream istr(data);
std::istringstream istr(data);
vtkSmartPointer<vtkXMLModelReader> reader =
vtkSmartPointer<vtkXMLModelReader>::New();
ClientModel->Reset();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include "vtkSMProxyManager.h"
#include "vtkSMStringVectorProperty.h"

#include <vtksys/ios/sstream>
#include <sstream>

vtkStandardNewMacro(vtkGeoTransformOperatorClient);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include "vtkSMStringVectorProperty.h"
#include "vtkSMPropertyHelper.h"

#include <vtksys/ios/sstream>
#include <sstream>

vtkStandardNewMacro(vtkCMBMeshGridRepresentationClient);
vtkCxxSetObjectMacro(vtkCMBMeshGridRepresentationClient, MeshRepresentationSource, vtkSMProxy);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include <vtkDiscreteModel.h>
#include <vtkDiscreteModelWrapper.h>

#include <vtksys/ios/sstream>
#include <sstream>

vtkStandardNewMacro(vtkCMBMeshWrapper);

Expand Down
Loading