Skip to content
Snippets Groups Projects
Commit 830b3278 authored by Dmitri Naumov's avatar Dmitri Naumov
Browse files

Use iosfwd declarations where possible.

parent 8697cdf2
No related branches found
No related tags found
No related merge requests found
Showing
with 43 additions and 46 deletions
......@@ -16,26 +16,11 @@
#include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <sstream>
#include <limits>
#include <QFileInfo>
// ThirdParty/logog
#include "logog/include/logog.hpp"
#include "StringTools.h"
#include "AsciiRasterInterface.h"
// GeoLib
#include "Raster.h"
#include <vtkFloatArray.h>
#include <vtkPointData.h>
#include <vtkImageAlgorithm.h>
#include <vtkImageData.h>
#include <vtkImageImport.h>
#include <vtkImageReader2.h>
......@@ -48,6 +33,13 @@
#include "xtiffio.h"
#endif
#include <logog/include/logog.hpp>
#include "AsciiRasterInterface.h"
#include "GeoLib/Raster.h"
vtkImageAlgorithm* VtkRaster::loadImage(const std::string &fileName,
double& x0, double& y0, double& delta)
{
......
......@@ -14,7 +14,7 @@
#ifndef VTKRASTER_H
#define VTKRASTER_H
#include <fstream>
#include <string>
class vtkImageAlgorithm;
class vtkImageImport;
......
......@@ -11,7 +11,7 @@
#define ASSEMBLERLIB_LOCALTOGLOBALINDEXMAP_H_
#ifndef NDEBUG
#include <iostream>
#include <iosfwd>
#endif // NDEBUG
#include <vector>
......
......@@ -16,7 +16,7 @@
#include <algorithm>
#include <cmath>
#include <iterator>
#include <iostream>
#include <iosfwd>
#include <fstream>
#include <vector>
......
......@@ -20,8 +20,6 @@
#include <string>
#include <list>
#include <sstream>
#include <fstream>
#include <iostream>
namespace BaseLib {
......
......@@ -12,7 +12,7 @@
#include <string>
#include <vector>
#include <list>
#include <iostream>
#include <iosfwd>
#include <algorithm>
#include <tclap/CmdLineInterface.h>
......
......@@ -37,7 +37,7 @@ public:
/// Reads a Surfer GRD raster file
static GeoLib::Raster* getRasterFromSurferFile(std::string const& fname);
/// Writes an Esri asc-file
static void writeRasterAsASC(GeoLib::Raster const& raster, std::string const& file_name);
......
......@@ -13,6 +13,9 @@
#include "CsvInterface.h"
#include <algorithm>
#include <stdexcept>
#include "GeoLib/Point.h"
namespace FileIO {
......
......@@ -14,14 +14,16 @@
#ifndef CSVINTERFACE_H_
#define CSVINTERFACE_H_
#include <logog/include/logog.hpp>
#include <array>
#include <fstream>
#include <iterator>
#include <limits>
#include <list>
#include <string>
#include <vector>
#include <logog/include/logog.hpp>
#include "BaseLib/StringTools.h"
......
......@@ -9,8 +9,7 @@
#ifndef FEFLOWINTERFACE_H_
#define FEFLOWINTERFACE_H_
#include <iostream>
#include <fstream>
#include <iosfwd>
#include <string>
#include <vector>
......
......@@ -12,25 +12,26 @@
*
*/
#include <GmshIO/GMSHLine.h>
#include <ostream>
#include "GMSHLine.h"
namespace FileIO
{
namespace GMSH {
GMSHLine::GMSHLine(size_t start_point_id, size_t end_point_id) :
GMSHLine::GMSHLine(std::size_t start_point_id, std::size_t end_point_id) :
_start_pnt_id(start_point_id), _end_pnt_id(end_point_id)
{}
GMSHLine::~GMSHLine()
{}
void GMSHLine::write(std::ostream &os, size_t id) const
void GMSHLine::write(std::ostream &os, std::size_t id) const
{
os << "Line(" << id << ") = {" << _start_pnt_id << "," << _end_pnt_id << "};\n";
}
void GMSHLine::resetLineData(size_t start_point_id, size_t end_point_id)
void GMSHLine::resetLineData(std::size_t start_point_id, std::size_t end_point_id)
{
_start_pnt_id = start_point_id;
_end_pnt_id = end_point_id;
......
......@@ -15,7 +15,7 @@
#ifndef GMSHLINE_H_
#define GMSHLINE_H_
#include <ostream>
#include <iosfwd>
namespace FileIO
{
......
......@@ -12,7 +12,10 @@
*
*/
#include "GmshIO/GMSHLineLoop.h"
#include <ostream>
#include "GMSHLine.h"
#include "GMSHLineLoop.h"
namespace FileIO
{
......@@ -24,8 +27,8 @@ GMSHLineLoop::GMSHLineLoop(bool is_sfc) :
GMSHLineLoop::~GMSHLineLoop()
{
const size_t n_lines (_lines.size());
for (size_t k(0); k<n_lines; k++) {
const std::size_t n_lines (_lines.size());
for (std::size_t k(0); k<n_lines; k++) {
delete _lines[k];
}
}
......@@ -35,14 +38,14 @@ void GMSHLineLoop::addLine(GMSHLine* line)
_lines.push_back(line);
}
void GMSHLineLoop::write(std::ostream &os, size_t line_offset, size_t sfc_offset) const
void GMSHLineLoop::write(std::ostream &os, std::size_t line_offset, std::size_t sfc_offset) const
{
const size_t n_lines (_lines.size());
for (size_t k(0); k<n_lines; k++) {
const std::size_t n_lines (_lines.size());
for (std::size_t k(0); k<n_lines; k++) {
(_lines[k])->write(os, line_offset+k);
}
os << "Line Loop(" << line_offset+n_lines << ") = {";
for (size_t k(0); k < n_lines - 1; k++)
for (std::size_t k(0); k < n_lines - 1; k++)
os << line_offset + k << ",";
os << line_offset + n_lines - 1 << "};\n";
......
......@@ -16,14 +16,15 @@
#define GMSHLINELOOP_H_
#include <vector>
#include <ostream>
#include <iosfwd>
#include "GMSHLine.h"
namespace FileIO
{
namespace GMSH {
class GMSHLine;
class GMSHLineLoop {
public:
GMSHLineLoop(bool is_sfc=false);
......
......@@ -16,7 +16,7 @@
#ifndef MESHIO_H_
#define MESHIO_H_
#include <iostream>
#include <iosfwd>
#include <string>
#include <vector>
#include <boost/optional.hpp>
......
......@@ -15,8 +15,6 @@
#ifndef OGSIOVER4_H_
#define OGSIOVER4_H_
#include <fstream>
#include <sstream>
#include <string>
#include <vector>
......
......@@ -14,7 +14,7 @@
#ifndef NODE_PARTITIONED_MESH_READER_H
#define NODE_PARTITIONED_MESH_READER_H
#include <fstream>
#include <iosfwd>
#include <string>
#include <vector>
......
......@@ -18,7 +18,7 @@
#ifndef PETRELIO_H_
#define PETRELIO_H_
#include <istream>
#include <iosfwd>
#include <list>
#include <string>
#include <vector>
......
......@@ -15,6 +15,7 @@
// ** INCLUDES **
#include "Writer.h"
#include <iostream>
#include <fstream>
#include <limits>
......
......@@ -16,7 +16,6 @@
#define WRITER_H
#include <string>
#include <iostream>
#include <sstream>
namespace FileIO
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment