Commit cbc2d1ac authored by David Gobbi's avatar David Gobbi Committed by Kitware Robot

Merge topic 'vtksys-fstream'

98e06fbc Use vtksys::ifstream and vtksys::ofstream
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Acked-by: Cory Quammen's avatarCory Quammen <cory.quammen@kitware.com>
Merge-request: !3850
parents e5af304c 98e06fbc
Pipeline #160622 running with stage
......@@ -19,11 +19,13 @@
#include "vtkObjectFactory.h"
#include "vtkPythonInterpreter.h"
#include "vtksys/FStream.hxx"
#include "vtksys/SystemTools.hxx"
#include <algorithm>
#include <random>
#include <sstream>
#include <string>
#include <vtksys/SystemTools.hxx>
//----------------------------------------------------------------------------
namespace
......@@ -91,7 +93,7 @@ int vtkCPPythonScriptPipeline::Initialize(const char* fileName)
if (rank == 0)
{
std::string line;
std::ifstream myfile(fileName);
vtksys::ifstream myfile(fileName);
std::string desiredString;
if (myfile.is_open())
{
......
......@@ -34,6 +34,8 @@
#define NAME_ARRAY "Name"
#define DEFAULT_NAME ""
#include "vtksys/FStream.hxx"
vtkStandardNewMacro(vtkAnalyzeReader);
//----------------------------------------------------------------------------
......@@ -1381,7 +1383,7 @@ int vtkAnalyzeReader::CanReadFile(const char* fname)
return false;
}
ifstream local_InputStream;
vtksys::ifstream local_InputStream;
local_InputStream.open(HeaderFileName.c_str(), ios::in | ios::binary);
if (local_InputStream.fail())
{
......
......@@ -32,6 +32,8 @@
#define NAME_ARRAY "Name"
#define DEFAULT_NAME ""
#include "vtksys/FStream.hxx"
vtkStandardNewMacro(vtkNIfTIReader);
//----------------------------------------------------------------------------
......@@ -1277,7 +1279,7 @@ int vtkNIfTIReader::CanReadFile(const char* fname)
return false;
}
ifstream local_InputStream;
vtksys::ifstream local_InputStream;
local_InputStream.open(HeaderFileName.c_str(), ios::in | ios::binary);
if (local_InputStream.fail())
{
......
......@@ -56,6 +56,8 @@
#include "vtkStringArray.h"
#include "vtkUnstructuredGrid.h"
#include "vtksys/FStream.hxx"
#include "cdi.h"
#include "vtk_netcdf.h"
......@@ -1467,7 +1469,7 @@ int vtkCDIReader::GetVars()
// prepare data structure and read in names
string filename = PerformanceDataFile + "0000";
ifstream file(filename.c_str());
vtksys::ifstream file(filename.c_str());
if (file.good())
{
this->HaveDomainData = true;
......@@ -2835,7 +2837,7 @@ int vtkCDIReader::LoadDomainVarData(int variableIndex)
vector<string> wordVec;
vector<string>::iterator k;
ifstream file(filename.c_str());
vtksys::ifstream file(filename.c_str());
string str, word;
double temp[1];
......
......@@ -79,6 +79,8 @@
#include "vtkXMLDataElement.h"
#include "vtkXMLDataObjectWriter.h"
#include "vtkXMLUtilities.h"
#include "vtksys/FStream.hxx"
#include "vtksys/SystemTools.hxx"
#include "vtkPVLODActor.h"
......@@ -2119,7 +2121,7 @@ void vtkPVOpenVRHelper::ExportLocationsAsSkyboxes(vtkSMViewProxy* smview)
std::string dir = "pv-skybox/";
vtksys::SystemTools::MakeDirectory(dir);
ofstream json("pv-skybox/index.json");
vtksys::ofstream json("pv-skybox/index.json");
json << "{ \"data\": [ { \"mimeType\": \"image/jpg\","
"\"pattern\": \"{poseIndex}/{orientation}.jpg\","
"\"type\": \"blob\", \"name\": \"image\", \"metadata\": {}}], "
......
......@@ -21,6 +21,7 @@
#include "vtkVector.h"
#include "vtkVectorOperators.h"
#include "vtksys/FStream.hxx"
#include "vtksys/SystemTools.hxx"
#include "nlohmann/json.hpp"
......@@ -824,7 +825,7 @@ std::streamoff vtkParFlowMetaReader::GetEndOffset(Domain dom) const
}
bool vtkParFlowMetaReader::ReadSubgridHeader(
ifstream& pfb, vtkVector3i& si, vtkVector3i& sn, vtkVector3i& sr)
istream& pfb, vtkVector3i& si, vtkVector3i& sn, vtkVector3i& sr)
{
pfb.read(reinterpret_cast<char*>(si.GetData()), 3 * sizeof(int));
pfb.read(reinterpret_cast<char*>(sn.GetData()), 3 * sizeof(int));
......@@ -838,7 +839,7 @@ bool vtkParFlowMetaReader::ReadSubgridHeader(
return pfb.good() && !pfb.eof();
}
bool vtkParFlowMetaReader::ReadComponentSubgridOverlap(ifstream& pfb, const vtkVector3i& si,
bool vtkParFlowMetaReader::ReadComponentSubgridOverlap(istream& pfb, const vtkVector3i& si,
const vtkVector3i& sn, const int extent[6], int component, vtkDoubleArray* variable)
{
vtkIdType subgridSize = sn[0] * sn[1];
......@@ -948,7 +949,7 @@ bool vtkParFlowMetaReader::ReadComponentSubgridOverlap(ifstream& pfb, const vtkV
int vtkParFlowMetaReader::LoadPFBComponent(Domain dom, vtkDoubleArray* variable,
const std::string& filename, int component, const int extent[6]) const
{
std::ifstream pfb(filename.c_str(), std::ios::binary);
vtksys::ifstream pfb(filename.c_str(), std::ios::binary);
if (!pfb.good() && !vtksys::SystemTools::FileIsFullPath(filename))
{
pfb.clear();
......@@ -1293,7 +1294,7 @@ int vtkParFlowMetaReader::RequestInformation(
std::vector<uint8_t> contents;
if (rank == 0)
{
std::ifstream pfb(this->FileName, std::ios::binary);
vtksys::ifstream pfb(this->FileName, std::ios::binary);
if (pfb.good())
{
pfb.seekg(0, std::ios::end);
......
......@@ -11,7 +11,6 @@
#include "nlohmann/json.hpp"
#include <array>
#include <fstream>
#include <set>
#include <string>
#include <vector>
......@@ -169,7 +168,7 @@ protected:
/// Get grid topology on rank 0.
///
/// This sets IJKDivs on rank 0.
void ScanBlocks(std::ifstream& file, int nblocks);
void ScanBlocks(istream& file, int nblocks);
/// Broadcast grid topology from rank 0.
///
......@@ -188,9 +187,9 @@ protected:
/// subgrid header just past the end of known space.
std::streamoff GetEndOffset(Domain dom) const;
static bool ReadSubgridHeader(ifstream& pfb, vtkVector3i& si, vtkVector3i& sn, vtkVector3i& sr);
static bool ReadSubgridHeader(istream& pfb, vtkVector3i& si, vtkVector3i& sn, vtkVector3i& sr);
static bool ReadComponentSubgridOverlap(ifstream& pfb, const vtkVector3i& si,
static bool ReadComponentSubgridOverlap(istream& pfb, const vtkVector3i& si,
const vtkVector3i& sn, const int extent[6], int component, vtkDoubleArray* variable);
int LoadPFBComponent(Domain dom, vtkDoubleArray* variable, const std::string& filename,
......
......@@ -12,6 +12,8 @@
#include "vtkVector.h"
#include "vtkVectorOperators.h"
#include "vtksys/FStream.hxx"
#include <cctype>
#include <sstream>
......@@ -96,7 +98,7 @@ int vtkParFlowReader::RequestData(vtkInformation* vtkNotUsed(request),
return 0;
}
std::ifstream pfb(this->FileName, std::ios::binary);
vtksys::ifstream pfb(this->FileName, std::ios::binary);
if (!pfb.good())
{
vtkErrorMacro("Unable to open file.");
......@@ -214,7 +216,7 @@ int vtkParFlowReader::RequestData(vtkInformation* vtkNotUsed(request),
}
bool vtkParFlowReader::ReadSubgridHeader(
ifstream& pfb, vtkVector3i& si, vtkVector3i& sn, vtkVector3i& sr)
istream& pfb, vtkVector3i& si, vtkVector3i& sn, vtkVector3i& sr)
{
pfb.read(reinterpret_cast<char*>(si.GetData()), 3 * sizeof(int));
pfb.read(reinterpret_cast<char*>(sn.GetData()), 3 * sizeof(int));
......@@ -228,7 +230,7 @@ bool vtkParFlowReader::ReadSubgridHeader(
return pfb.good() && !pfb.eof();
}
void vtkParFlowReader::ScanBlocks(std::ifstream& pfb, int vtkNotUsed(numSubGrids))
void vtkParFlowReader::ScanBlocks(istream& pfb, int vtkNotUsed(numSubGrids))
{
auto mpc = vtkMultiProcessController::GetGlobalController();
if (mpc && mpc->GetLocalProcessId() > 0)
......@@ -348,8 +350,8 @@ std::streamoff vtkParFlowReader::GetEndOffset() const
return offset;
}
void vtkParFlowReader::ReadBlock(std::ifstream& pfb, vtkMultiBlockDataSet* output,
vtkVector3d& origin, vtkVector3d& spacing, const std::string& arrayName, int blockId)
void vtkParFlowReader::ReadBlock(istream& pfb, vtkMultiBlockDataSet* output, vtkVector3d& origin,
vtkVector3d& spacing, const std::string& arrayName, int blockId)
{
vtkVector3i si;
vtkVector3i sn;
......@@ -422,8 +424,7 @@ void vtkParFlowReader::ReadBlock(std::ifstream& pfb, vtkMultiBlockDataSet* outpu
}
}
void vtkParFlowReader::ReadBlockIntoArray(
std::ifstream& file, vtkImageData* img, vtkDoubleArray* arr)
void vtkParFlowReader::ReadBlockIntoArray(istream& file, vtkImageData* img, vtkDoubleArray* arr)
{
arr->SetNumberOfTuples(img->GetNumberOfCells());
auto cellData = img->GetCellData();
......
......@@ -7,7 +7,6 @@
#include "vtkVector.h"
#include <fstream>
#include <vector>
class vtkDoubleArray;
......@@ -73,7 +72,7 @@ protected:
/// Get grid topology on rank 0.
///
/// This sets IJKDivs on rank 0.
void ScanBlocks(std::ifstream& file, int nblocks);
void ScanBlocks(istream& file, int nblocks);
/// Broadcast grid topology from rank 0.
///
......@@ -93,10 +92,10 @@ protected:
/// for IJKDivs.
std::streamoff GetEndOffset() const;
static bool ReadSubgridHeader(ifstream& pfb, vtkVector3i& si, vtkVector3i& sn, vtkVector3i& sr);
static bool ReadSubgridHeader(istream& pfb, vtkVector3i& si, vtkVector3i& sn, vtkVector3i& sr);
/// Read a single block from the file
void ReadBlock(std::ifstream& file, vtkMultiBlockDataSet* output, vtkVector3d& origin,
void ReadBlock(istream& file, vtkMultiBlockDataSet* output, vtkVector3d& origin,
vtkVector3d& spacing, const std::string& arrayName, int block);
/// Given the size of the whole grid, the number of subgrids on each axis, and a block IJK
......@@ -104,7 +103,7 @@ protected:
static void GetBlockExtent(const vtkVector3i& wholeExtentIn, const vtkVector3i& numberOfBlocksIn,
const vtkVector3i& blockIJKIn, vtkVector3i& blockExtentMinOut, vtkVector3i& blockExtentMaxOut);
static void ReadBlockIntoArray(std::ifstream& file, vtkImageData* img, vtkDoubleArray* arr);
static void ReadBlockIntoArray(istream& file, vtkImageData* img, vtkDoubleArray* arr);
/// The filename, which must be a valid path before RequestData is called.
char* FileName;
......
......@@ -33,6 +33,8 @@
#include "vtkSetGet.h"
#include "vtkXMLDataSetWriter.h"
#include "vtksys/FStream.hxx"
#include "vtknvindex_config_settings.h"
#include "vtknvindex_forwarding_logger.h"
......@@ -262,7 +264,7 @@ bool vtknvindex_xml_config_parser::get_temp_path(std::string& temp_path)
//-------------------------------------------------------------------------------------------------
bool vtknvindex_xml_config_parser::create_config_file(const std::string& filename) const
{
std::ofstream xml_file;
vtksys::ofstream xml_file;
xml_file.open(filename.c_str());
if (xml_file.is_open())
{
......
......@@ -25,10 +25,10 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <fstream>
#include <iomanip>
#include <iostream>
#include "vtksys/FStream.hxx"
#include "vtksys/SystemTools.hxx"
#include "vtknvindex_forwarding_logger.h"
......@@ -56,7 +56,7 @@ void vtknvindex_performance_values::print_perf_values(
// Prints only a subset of the full performance values that NVIDIA IndeX provides.
// Additional fields can be added as and when required.
std::ofstream file_handler;
vtksys::ofstream file_handler;
file_handler.open(m_performance_log_file.c_str(), std::ios::out | std::ios::app);
std::ostringstream s;
const std::streamsize ssize_time(10);
......
......@@ -28,7 +28,6 @@
#ifndef vtknvindex_performance_values_h
#define vtknvindex_performance_values_h
#include <fstream>
#include <string>
#include "vtksys/SystemInformation.hxx"
......
......@@ -27,6 +27,7 @@
#include <cassert>
#include "vtksys/FStream.hxx"
#include "vtksys/SystemInformation.hxx"
#include "vtksys/SystemTools.hxx"
......@@ -65,14 +66,14 @@
//-------------------------------------------------------------------------------------------------
bool file_to_string(const std::string& file_path, std::string& out_file_string)
{
std::ifstream src_file;
vtksys::ifstream src_file;
src_file.open(file_path.c_str(), std::ios::in | std::ios::binary | std::ios::ate);
if (!src_file.is_open())
return false;
const std::ifstream::pos_type src_file_size = src_file.tellg();
const vtksys::ifstream::pos_type src_file_size = src_file.tellg();
src_file.seekg(std::ios::beg);
out_file_string.resize(src_file_size, '\0');
......@@ -1546,7 +1547,7 @@ void vtknvindex_scene::export_session()
INFO_LOG << "Writing export session to file '"
<< vtksys::SystemTools::JoinPath(path_components) << "'";
std::ofstream f(output_filename.c_str());
vtksys::ofstream f(output_filename.c_str());
f << s.str();
std::ostringstream af;
m_cluster_properties->get_affinity()->scene_dump_affinity_info(af);
......
......@@ -49,6 +49,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "vtkSMProxyManager.h"
#include "vtkSMSessionProxyManager.h"
#include "vtksys/FStream.hxx"
class pqCustomFilterManagerForm : public Ui::pqCustomFilterManager
{
};
......@@ -214,7 +216,7 @@ void pqCustomFilterManager::exportSelected(const QStringList& files)
QStringList::ConstIterator jter = files.begin();
for (; jter != files.end(); ++jter)
{
ofstream os((*jter).toLocal8Bit().data(), ios::out);
vtksys::ofstream os((*jter).toLocal8Bit().data(), ios::out);
root->PrintXML(os, vtkIndent());
}
......
......@@ -43,7 +43,9 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "vtkSMTransferFunctionPresets.h"
#include "vtkSMTransferFunctionProxy.h"
#include <vtk_jsoncpp.h>
#include "vtksys/FStream.hxx"
#include "vtk_jsoncpp.h"
#include <QInputEvent>
#include <QList>
......@@ -952,7 +954,7 @@ void pqPresetDialog::exportPresets()
}
assert(presetCollection.size() > 0);
ofstream outfs;
vtksys::ofstream outfs;
outfs.open(filename.toStdString().c_str());
if (!outfs.is_open())
{
......
......@@ -19,7 +19,8 @@
#include "vtkDynamicLoader.h"
#include "vtkObjectFactory.h"
#include <vtksys/SystemTools.hxx>
#include "vtksys/FStream.hxx"
#include "vtksys/SystemTools.hxx"
#include <map>
#include <sstream>
......@@ -184,7 +185,7 @@ void vtkClientServerInterpreter::SetLogFile(const char* name)
// If a non-empty name was given, open a new log file.
if (name && name[0])
{
this->LogFileStream = new ofstream(name);
this->LogFileStream = new vtksys::ofstream(name);
if (this->LogFileStream && *this->LogFileStream)
{
this->LogStream = this->LogFileStream;
......
......@@ -196,7 +196,7 @@ protected:
// A stream to which a log is written.
ostream* LogStream;
ofstream* LogFileStream;
ostream* LogFileStream;
// Internal message processing functions.
int ProcessCommandNew(const vtkClientServerStream& css, int midx);
......
......@@ -27,6 +27,10 @@
#define GENERATE_DEBUG_LOG 0
#if GENERATE_DEBUG_LOG
#include "vtksys/FStream.hxx"
#endif
//****************************************************************************/
// Internal Classes and typedefs
//****************************************************************************/
......@@ -34,7 +38,7 @@ class vtkCompositeMultiProcessController::vtkCompositeInternals
{
public:
#if GENERATE_DEBUG_LOG
ofstream LogFile;
vtksys::ofstream LogFile;
#endif
struct RMICallbackInfo
{
......
......@@ -525,7 +525,7 @@ void vtkPVDataInformation::CopyFromDataSet(vtkDataSet* data)
}
#if 0
vtkProcessModule *pm = vtkProcessModule::GetProcessModule();
ofstream *tmpFile = pm->GetLogFile();
ostream *tmpFile = pm->GetLogFile();
if (tmpFile)
{
if (data->GetSource())
......
......@@ -27,6 +27,8 @@
#include "vtkPVServerManagerPluginInterface.h"
#include "vtkPVXMLParser.h"
#include "vtkProcessModule.h"
#include "vtksys/FStream.hxx"
#include "vtksys/SystemTools.hxx"
#include <cstdlib>
......@@ -73,7 +75,7 @@ public:
vtkPVXMLOnlyPlugin* instance = new vtkPVXMLOnlyPlugin();
instance->PluginName = vtksys::SystemTools::GetFilenameWithoutExtension(xmlfile);
ifstream is;
vtksys::ifstream is;
is.open(xmlfile, ios::binary);
// get length of file:
is.seekg(0, ios::end);
......
......@@ -32,13 +32,14 @@
#include "vtkProcessModule.h"
#include "vtkVersion.h"
#include "vtksys/FStream.hxx"
#include "vtksys/String.hxx"
#include "vtksys/SystemTools.hxx"
#include <assert.h>
#include <fstream>
#include <sstream>
#include <string>
#include <vector>
#include <vtksys/String.hxx>
#include <vtksys/SystemTools.hxx>
#if defined(_WIN32) && !defined(__CYGWIN__)
/* String comparison routine. */
......@@ -321,7 +322,7 @@ void vtkPVPluginTracker::LoadPluginConfigurationXMLs(const char* appname)
void vtkPVPluginTracker::LoadPluginConfigurationXMLConf(
std::string const& exe_dir, std::string const& conf)
{
std::ifstream fin(conf.c_str());
vtksys::ifstream fin(conf.c_str());
std::string line;
// TODO: Replace with a JSON parser.
while (std::getline(fin, line))
......
......@@ -23,7 +23,8 @@
#include "vtkPVXMLElement.h"
#include "vtkStringList.h"
#include <fstream>
#include "vtksys/FStream.hxx"
#include <iostream>
#define safeio(a) ((a) ? (a) : "NULL")
......@@ -118,7 +119,7 @@ int vtkSMProxyConfigurationWriter::WriteConfiguration(const char* cFilename)
filename += ext;
}
std::ofstream os(filename.c_str(), ios::out);
vtksys::ofstream os(filename.c_str(), ios::out);
if (!os.good())
{
vtkErrorMacro("Failed to open " << filename.c_str() << " for writing.");
......
......@@ -36,8 +36,9 @@
#include "vtkSMMessage.h"
#include "vtkSmartPointer.h"
#include "vtksys/FStream.hxx"
#include <assert.h>
#include <fstream>
#include <set>
#include <sstream>
#include <string>
......@@ -293,7 +294,7 @@ vtkPVSessionCore::vtkPVSessionCore()
{
filename << this->ParallelController->GetLocalProcessId();
}
this->LogStream = new ofstream(filename.str().c_str());
this->LogStream = new vtksys::ofstream(filename.str().c_str());
LOG("Log for " << options->GetArgv0() << " (" << this->ParallelController->GetLocalProcessId()
<< ")");
}
......
......@@ -50,12 +50,14 @@
#include "vtkStringList.h"
#include "vtkVersion.h"
#include "vtksys/FStream.hxx"
#include "vtksys/RegularExpression.hxx"
#include <assert.h>
#include <map>
#include <set>
#include <sstream>
#include <vector>
#include <vtksys/RegularExpression.hxx>
#include "vtkSMSessionProxyManagerInternals.h"
......@@ -1261,7 +1263,7 @@ void vtkSMSessionProxyManager::LoadXMLState(
bool vtkSMSessionProxyManager::SaveXMLState(const char* filename)
{
vtkPVXMLElement* rootElement = this->SaveXMLState();
ofstream os(filename, ios::out);
vtksys::ofstream os(filename, ios::out);
if (!os.is_open())
{
return false;
......
......@@ -32,9 +32,11 @@
#include "vtkSmartPointer.h"
#include "vtkStringList.h"
#include "vtksys/FStream.hxx"
#include "vtksys/SystemTools.hxx"
#include "vtk_jsoncpp.h"
#include <sstream>
#include <vtksys/SystemTools.hxx>
#include <algorithm>
#include <cfloat>
......@@ -1002,7 +1004,7 @@ bool vtkSMSettings::AddCollectionFromString(const std::string& settings, double
bool vtkSMSettings::AddCollectionFromFile(const std::string& fileName, double priority)
{
std::string settingsFileName(fileName);
std::ifstream settingsFile(settingsFileName.c_str(), ios::in | ios::binary | ios::ate);
vtksys::ifstream settingsFile(settingsFileName.c_str(), ios::in | ios::binary | ios::ate);
if (settingsFile.is_open())
{
std::streampos size = settingsFile.tellg();
......@@ -1115,7 +1117,7 @@ bool vtkSMSettings::SaveSettingsToFile(const std::string& filePath)
return false;
}
std::ofstream settingsFile(filePath.c_str(), ios::out | ios::binary);
vtksys::ofstream settingsFile(filePath.c_str(), ios::out | ios::binary);
if (settingsFile.is_open())
{
std::string output = this->Internal->SettingCollections[0].Value.toStyledString();
......
......@@ -22,9 +22,11 @@
#include "vtkSMTransferFunctionProxy.h"
#include "vtkTuple.h"
#include "vtk_jsoncpp.h"
#include "vtksys/FStream.hxx"
#include "vtksys/SystemTools.hxx"
#include "vtk_jsoncpp.h"
#include <cassert>
#include <list>
#include <memory>
......@@ -143,7 +145,7 @@ public:
Json::CharReaderBuilder builder;
builder["collectComments"] = false;
Json::Value root;
ifstream file;
vtksys::ifstream file;
file.open(filename);
if (!file)
{
......@@ -485,7 +487,7 @@ bool vtkSMTransferFunctionPresets::ImportPresets(const char* filename)
if (vtksys::SystemTools::LowerCase(vtksys::SystemTools::GetFilenameLastExtension(filename)) ==
".xml")
{
ifstream in(filename);
vtksys::ifstream in(filename);
if (in)
{
std::ostringstream contents;
......
......@@ -41,6 +41,8 @@
#include "vtkTuple.h"
#include "vtk_jsoncpp.h"
#include "vtksys/FStream.hxx"
#include <algorithm>
#include <cmath>
#include <set>
......@@ -273,7 +275,7 @@ bool vtkSMTransferFunctionProxy::ExportTransferFunction(
exportCollection.append(transferFunction);
ofstream outfs;
vtksys::ofstream outfs;
outfs.open(filename);
if (!outfs.is_open())
{
......@@ -1370,7 +1372,7 @@ bool vtkSMTransferFunctionProxy::ConvertLegacyColorMapsToJSON(
return false;
}
ofstream file;
vtksys::ofstream file;
file.open(outjsonfile);
if (file)
{
......
......@@ -24,10 +24,12 @@
#include "vtkSubsetInclusionLattice.h"
#include "vtkTypeTraits.h"
#include "vtksys/FStream.hxx"
#include "vtksys/SystemTools.hxx"
#include <algorithm>
#include <cassert>
#include <iterator> // std::back_inserter
#include <vtksys/SystemTools.hxx>
//============================================================================
// class: vtkFileSeriesHelper::vtkTimeInformation
......@@ -211,7 +213,7 @@ bool vtkFileSeriesHelper::ReadMetaFile(const char* metafilename)
}
// Open the metafile.
ifstream metafile(metafilename);
vtksys::ifstream metafile(metafilename);
if (metafile.bad())
{
// vtkErrorMacro("Failed to open meta-file: " << metafilename);
......
......@@ -79,10 +79,11 @@ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "vtkStreamingDemandDrivenPipeline.h"
#include "vtkUnstructuredGrid.h"
#include "vtksys/FStream.hxx"
// C/C++ includes
#include <algorithm>
#include <cassert>
#include <fstream>
#include <iterator>
#include <sstream>
#include <stdexcept>
......@@ -192,7 +193,7 @@ void vtkACosmoReader::ReadMetaDataFile(const int levelIdx, std::string file)
// STEP 0: Open metadata file
int blockCount = 0;
std::ifstream ifs;
vtksys::ifstream ifs;
ifs.open(file.c_str());
if (!ifs.is_open())
{
......@@ -583,7 +584,7 @@ void vtkACosmoReader::ReadBlockFromFile(
#endif
// STEP 0: Open file
std::ifstream ifs;
vtksys::ifstream ifs;
ifs.open(file.c_str(), std::ios::in | std::ios::binary);
if (!ifs.is_open())
{
......
......@@ -30,6 +30,8 @@
#include "vtk_jsoncpp.h"
#include "vtksys/FStream.hxx"
#include <algorithm>
#include <cassert>
#include <map>
......@@ -228,7 +230,7 @@ void vtkPMultiResolutionGenericIOReader::SetFileName(const char* fname)