File indexing completed on 2025-04-19 09:09:51
0001 #ifndef ATOOLS_Org_Data_Writer_H
0002 #define ATOOLS_Org_Data_Writer_H
0003
0004 #include "ATOOLS/Org/Read_Write_Base.H"
0005
0006 namespace ATOOLS {
0007
0008 class Data_Writer: public Read_Write_Base {
0009 public:
0010
0011
0012 Data_Writer();
0013 Data_Writer(const std::string &wordsep,const std::string &linesep,
0014 const std::string &comment,const std::string &ignore="");
0015
0016
0017 ~Data_Writer();
0018
0019
0020 bool WriteComment(std::string comment=nullstring,
0021 unsigned int tagreference=0,
0022 bool endline=true,std::string tempfname=nullstring);
0023 bool WriteComment(std::vector<std::string> comments=
0024 std::vector<std::string>(0),
0025 unsigned int tagreference=0,bool endline=true,
0026 std::string tempfname=nullstring);
0027
0028 template <class Write_Type >
0029 bool WriteToFile(const Write_Type &value,
0030 std::string tag=nullstring,bool endline=true,
0031 std::string tempfname=nullstring,int precision=6);
0032
0033 template <class Write_Type >
0034 bool VectorToFile(const std::vector<Write_Type> &values,
0035 std::string tag=nullstring,bool endline=true,
0036 std::string tempfname=nullstring,
0037 vtc::code=vtc::unknown,int precision=6);
0038
0039 template <class Write_Type >
0040 bool MatrixToFile(const std::vector<std::vector<Write_Type> > &values,
0041 std::string tag=nullstring,bool endline=true,
0042 std::string tempfname=nullstring,
0043 mtc::code=mtc::unknown,int precision=6);
0044
0045 };
0046
0047 }
0048
0049 #endif