NeoPZ
pzcheckconsistency.h
Go to the documentation of this file.
1 /*
2  * @file
3  * @brief Interface to check the consistency of two implementations. To parallelism using.
4  */
5 #ifndef PZCHECKCONSISTENCY
6 #define PZCHECKCONSISTENCY
7 #include "TPZSavable.h"
8 
9 #include <string>
10 
18 {
20  int fCounter;
25  std::string fPath;
27  std::string fFileName;
30  bool fOverWrite;
31 
36  bool fWriteFlag;
37 
38 public:
40  TPZCheckConsistency(const std::string &filename);
41 
43  void SetOverWrite(bool flag = true);
44 
46  void SetReadMode()
47  {
48  fWriteFlag = false;
49  }
51  void SetWriteMode()
52  {
53  fWriteFlag = true;
54  }
60  bool CheckObject(TPZSavable &obj);
61 };
62 
63 #endif
Contains declaration of the TPZSavable class which defines the interface to save and restore objects ...
filename
Definition: stats.py:82
std::string fPath
Path where the file will be stored. If CHECKPATH is defined then this will be used as the file path...
bool fOverWrite
Boolean indicating whether the objects should be overwritten or not.
void SetReadMode()
Set the read mode. No write.
void SetWriteMode()
Set the write mode.
int fCounter
A counter which will be used to compose the file name.
TPZCheckConsistency(const std::string &filename)
Constructor indicating the root filename.
void SetOverWrite(bool flag=true)
Set the overwrite flag.
Implements an interface to check the consistency of two implementations. Utility. ...
bool CheckObject(TPZSavable &obj)
Reads or writes depending on the compiler directive.
bool fWriteFlag
Boolean indicating whether the object will write the objects to disk or read them.
std::string fFileName
base file name. This name has to be unique to avoid overwrites
This class defines the interface to save and restore objects from TPZStream objects. Persistency.
Definition: TPZSavable.h:67
obj
Definition: test.py:225