Bridge++  Version 1.5.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
dataIO.h
Go to the documentation of this file.
1 
14 #ifndef DATAIO_INCLUDED
15 #define DATAIO_INCLUDED
16 
17 #include "bridge_complex.h"
18 
20 #include "bridgeIO.h"
21 using Bridge::vout;
22 
23 #include <string>
24 using std::string;
25 
26 
28 
38 class DataIO
39 {
40  public:
41  DataIO() : m_vl(CommonParameters::Vlevel()) {}
42  virtual ~DataIO() {}
43 
44  private:
45  // non-copyable
46  DataIO(const DataIO&);
47  DataIO& operator=(const DataIO&);
48 
49  public:
50 
51  virtual void read_file(double *v, const size_t n, const string&) = 0;
52  virtual void write_file(const double *v, const size_t n, const string&, const bool append = true) = 0;
53 
54  virtual void read_file(dcomplex *v, const size_t n, const string&) = 0;
55  virtual void write_file(const dcomplex *v, const size_t n, const string&, const bool append = true) = 0;
56 
57  virtual void read_file(std::vector<double>&, const string&) = 0;
58  virtual void write_file(const std::vector<double>&, const string&, const bool append = true) = 0;
59 
60  virtual void read_file(std::vector<dcomplex>&, const string&) = 0;
61  virtual void write_file(const std::vector<dcomplex>&, const string&, const bool append = true) = 0;
62 
63  protected:
65 };
66 #endif /* DATAIO_INCLUDED */
BridgeIO vout
Definition: bridgeIO.cpp:503
virtual ~DataIO()
Definition: dataIO.h:42
Common parameter class: provides parameters as singleton.
virtual void write_file(const double *v, const size_t n, const string &, const bool append=true)=0
DataIO & operator=(const DataIO &)
VerboseLevel
Definition: bridgeIO.h:42
Bridge::VerboseLevel m_vl
Definition: dataIO.h:64
DataIO()
Definition: dataIO.h:41
DataIO class for file I/O of general collection of data.
Definition: dataIO.h:38
virtual void read_file(double *v, const size_t n, const string &)=0