4 #ifndef __u3d_migr_io_hpp
5 #define __u3d_migr_io_hpp
7 #include "u3d_migr_defines.hpp"
17 bool saveCube(
bool is_SP,
int num,
MigrCell *grid,
int size,
int prog_id,
bool local=
false);
20 bool loadCube(
bool is_SP,
int num,
MigrCell *&grid,
int &size,
int prog_id,
bool local=
false);
23 char* getTmpFilePath(
const char* name,
int prog_id,
bool local=
false);
27 char* getTmpFilePathLocal(
const char* name,
int prog_id);
31 void deleteTmpFiles(
int spN,
int recN,
int prog_id);
35 void deleteTmpFilesLocal(
int recN,
int prog_id);
40 bool saveC(
bool is_SP,
int num,
MigrCell *grid,
int size,
int prog_id);
41 bool loadC(
bool is_SP,
int num,
MigrCell *&grid,
int &size,
int prog_id);
42 bool getTmpFileName(
const char* name,
int prog_id,
char *&result_name);
54 IPFile(
const char* name,
bool createFile)
throw (std::ios_base::failure);
55 void write(
IPCell* ipcells,
int size);
56 void reduce(
int size);
57 void read(
long pos,
int size,
IPCell** ipcells);
58 long size() {
return fsize - curpos; };
59 long tellpos() {
return curpos; };
62 bool compare(
const IPFile& other, FILE* result_file);
72 int size() {
return m_sp_num; };
74 const std::vector<int>& getBadSPs() {
return errspnums; };
75 const std::vector<std::string>& getErrmessages() {
return errmessages; };
78 IPFile& operator[](
int n) {
return ipfiles[n]; };
81 bool compare(
const IPDataStorage& other,
const char* result_file);
84 void recalculateSize();
87 void recalculateSize(
int n);
101 std::vector<std::string> errmessages;
102 std::vector<int> errspnums;
113 void saveIPCube(
MigrDataCube migr_cube, ushort i_max, ushort j_max, ushort k_max,
int prog_id,
int sp_num);
Definition: u3d_migr_io.hpp:49
migration-cell structure
Definition: u3d_migr_defines.hpp:47
incident-point-cell structure
Definition: u3d_migr_defines.hpp:63
migration-cell structure
Definition: u3d_migr_defines.hpp:31