NeoPZ
|
Implements the interface to write and check MD5 files. Persistency. More...
#include <pzmd5stream.h>
Public Member Functions | |
TPZMD5Stream () | |
Default constructor. More... | |
virtual | ~TPZMD5Stream () |
Default destructor. More... | |
int | CheckMD5 (const std::string &filename) |
Check Stream MD5 signature against MD5 signature store on file. More... | |
int | CheckMD5 (FILE *fh) |
Check Stream MD5 signature against MD5 signature store on file. More... | |
int | WriteMD5 (const std::string &filename) |
Write computed MD5 signature to file. More... | |
int | WriteMD5 (FILE *fh) |
Write computed MD5 signature to file. More... | |
int | ResetMD5 () |
Reset the MD5 signature. More... | |
virtual void | Write (const int *p, int size) |
Writes size integers at pointer location p. More... | |
virtual void | Write (const int64_t *p, int size) |
Writes size longs at pointer location p. More... | |
virtual void | Write (const unsigned int *p, int size) |
Writes size integers at pointer location p. More... | |
virtual void | Write (const float *p, int size) |
Writes size floating points at pointer location p. More... | |
virtual void | Write (const double *p, int size) |
Writes size floating points at pointer location p. More... | |
virtual void | Write (const long double *p, int size) |
Writes size floating points at pointer location p. More... | |
virtual void | Write (const char *p, int size) |
Writes size chars at pointer location p. More... | |
virtual void | Write (const std::string *p, int size) |
Writes size strings at pointer location p. More... | |
virtual void | Write (const std::complex< float > *p, int size) |
Writes size complex-float at pointer location p. More... | |
virtual void | Write (const std::complex< double > *p, int size) |
Writes size complex-double at pointer location p. More... | |
virtual void | Write (const std::complex< long double > *p, int size) |
Writes size complex-long double at pointer location p. More... | |
template<class T > | |
void | Writes (const T *p, int size) |
Writes size objects of the class T at pointer location p. More... | |
virtual void | Read (int *p, int size) |
Reads size integers from pointer location p. More... | |
virtual void | Read (int64_t *p, int size) |
Reads size longs from pointer location p. More... | |
virtual void | Read (unsigned int *p, int size) |
Reads size integers from pointer location p. More... | |
virtual void | Read (float *p, int size) |
Reads size floating points from pointer location p. More... | |
virtual void | Read (double *p, int size) |
Reads size floating points from pointer location p. More... | |
virtual void | Read (long double *p, int size) |
Reads size floating points from pointer location p. More... | |
virtual void | Read (char *p, int size) |
Reads size chars from pointer location p. More... | |
virtual void | Read (std::string *p, int size) |
Reads size strings from pointer location p. More... | |
virtual void | Read (std::complex< float > *p, int size) |
Reads size complex-float from pointer location p. More... | |
virtual void | Read (std::complex< double > *p, int size) |
Reads size complex-double from pointer location p. More... | |
virtual void | Read (std::complex< long double > *p, int size) |
Reads size complex-long double from pointer location p. More... | |
void | ReadError () |
Public Member Functions inherited from TPZStream | |
TPZStream () | |
virtual | ~TPZStream () |
virtual void | Write (const bool val) |
virtual void | Write (const uint64_t *p, int howMany=1)=0 |
virtual void | Write (const unsigned char *p, int howMany=1)=0 |
void | Write (const TPZFlopCounter *p, int howMany=1) |
virtual void | Read (bool &val) |
virtual void | Read (uint64_t *p, int howMany=1)=0 |
virtual void | Read (unsigned char *p, int howMany=1)=0 |
void | Read (TPZFlopCounter *p, int howMany=1) |
template<class T , typename std::enable_if<(std::is_same< std::string, T >::value||is_arithmetic_pz< T >::value), int >::type * = nullptr> | |
void | Write (const TPZVec< T > &vec) |
template<class T , typename std::enable_if<!(std::is_same< std::string, T >::value||is_arithmetic_pz< T >::value), int >::type * = nullptr> | |
void | Write (const TPZVec< T > &vec) |
template<class T > | |
void | WritePointers (const TPZVec< TPZAutoPointer< T >> &vec) |
template<class T , typename std::enable_if<(std::is_same< std::string, T >::value||is_arithmetic_pz< T >::value), int >::type * = nullptr> | |
void | Write (const std::vector< T > &vec) |
template<class T , typename std::enable_if<!(std::is_same< std::string, T >::value||is_arithmetic_pz< T >::value), int >::type * = nullptr> | |
void | Write (const std::vector< T > &vec) |
void | Write (const TPZVec< TPZFlopCounter > &vec) |
template<class T , class U > | |
void | Write (const std::map< T, U > &vec) |
template<class T , typename std::enable_if<(std::is_same< std::string, T >::value||is_arithmetic_pz< T >::value), int >::type * = nullptr> | |
void | Write (const std::set< T > &vec) |
template<class T > | |
void | Read (TPZVec< T > &vec) |
template<class T , typename std::enable_if<!(std::is_same< std::string, T >::value||is_arithmetic_pz< T >::value), int >::type * = nullptr> | |
void | Read (TPZVec< T > &vec, void *context) |
template<class T , typename std::enable_if<(std::is_same< std::string, T >::value||is_arithmetic_pz< T >::value), int >::type * = nullptr> | |
void | Read (TPZVec< T > &vec, void *context) |
template<class T > | |
void | ReadPointers (TPZVec< TPZAutoPointer< T >> &vec) |
void | Read (TPZVec< TPZFlopCounter > &vec) |
template<class T , typename std::enable_if<!(std::is_same< std::string, T >::value||is_arithmetic_pz< T >::value), int >::type * = nullptr> | |
void | Read (std::vector< T > &vec, void *context) |
template<class T , typename std::enable_if<(std::is_same< std::string, T >::value||is_arithmetic_pz< T >::value), int >::type * = nullptr> | |
void | Read (std::vector< T > &vec, void *context) |
template<int N> | |
void | Read (TPZManVector< REAL, N > &vec) |
template<int N> | |
void | Read (TPZManVector< int64_t, N > &vec) |
template<class T , class U > | |
void | Read (std::map< T, U > &vec) |
template<class T , typename std::enable_if<(std::is_same< std::string, T >::value||is_arithmetic_pz< T >::value), int >::type * = nullptr> | |
void | Read (std::set< T > &vec) |
template<class T > | |
void | WritePointers (const TPZVec< T *> &vec) |
template<class T > | |
void | ReadPointers (TPZVec< T *> &vec) |
template<class T > | |
void | WritePointers (const std::map< int, TPZAutoPointer< T >> &vec) |
template<class T > | |
void | ReadPointers (std::map< int, TPZAutoPointer< T > > &vec) |
template<class T > | |
void | WritePointers (const std::map< int, T *> &vec) |
template<class T > | |
void | ReadPointers (std::map< int, T *> &vec) |
template<class T > | |
void | WritePointers (const std::set< T *> &vec) |
template<class T > | |
void | ReadPointers (std::set< T *> &vec) |
template<class T , int EXP> | |
void | WritePointers (const TPZChunkVector< T *, EXP > &vec) |
template<class T , int EXP> | |
void | ReadPointers (TPZChunkVector< T *, EXP > &vec) |
template<class T , int EXP> | |
void | WritePointers (const TPZAdmChunkVector< T *, EXP > &vec) |
template<class T , int EXP> | |
void | ReadPointers (TPZAdmChunkVector< T *, EXP > &vec) |
template<class T > | |
void | ReadPointers (std::map< int, TPZAutoPointer< T >> &map) |
Private Member Functions | |
int | compare_digests (unsigned char *d1, unsigned char *d2, unsigned int dsz) |
Return 0 if digests are equal. -2 otherwise. More... | |
Private Attributes | |
int | last_status |
Implements the interface to write and check MD5 files. Persistency.
Definition at line 22 of file pzmd5stream.h.
|
inline |
|
inlinevirtual |
Default destructor.
Definition at line 53 of file pzmd5stream.h.
|
inline |
Check Stream MD5 signature against MD5 signature store on file.
Definition at line 65 of file pzmd5stream.h.
Referenced by main().
|
inline |
Check Stream MD5 signature against MD5 signature store on file.
Definition at line 82 of file pzmd5stream.h.
References compare_digests().
|
inlineprivate |
Return 0 if digests are equal. -2 otherwise.
Definition at line 35 of file pzmd5stream.h.
Referenced by CheckMD5().
|
inlinevirtual |
Reads size integers from pointer location p.
Implements TPZStream.
Definition at line 266 of file pzmd5stream.h.
References ReadError().
Referenced by Writes().
|
inlinevirtual |
Reads size longs from pointer location p.
Implements TPZStream.
Definition at line 270 of file pzmd5stream.h.
References ReadError().
|
inlinevirtual |
Reads size integers from pointer location p.
Implements TPZStream.
Definition at line 274 of file pzmd5stream.h.
References ReadError().
|
inlinevirtual |
Reads size floating points from pointer location p.
Implements TPZStream.
Definition at line 278 of file pzmd5stream.h.
References ReadError().
|
inlinevirtual |
Reads size floating points from pointer location p.
Implements TPZStream.
Definition at line 282 of file pzmd5stream.h.
References ReadError().
|
inlinevirtual |
Reads size floating points from pointer location p.
Reimplemented from TPZStream.
Definition at line 286 of file pzmd5stream.h.
References ReadError().
|
inlinevirtual |
Reads size chars from pointer location p.
Implements TPZStream.
Definition at line 290 of file pzmd5stream.h.
References ReadError().
|
inlinevirtual |
Reads size strings from pointer location p.
Reimplemented from TPZStream.
Definition at line 294 of file pzmd5stream.h.
References ReadError().
|
inlinevirtual |
Reads size complex-float from pointer location p.
Implements TPZStream.
Definition at line 299 of file pzmd5stream.h.
References ReadError().
|
inlinevirtual |
Reads size complex-double from pointer location p.
Implements TPZStream.
Definition at line 303 of file pzmd5stream.h.
References ReadError().
|
inlinevirtual |
Reads size complex-long double from pointer location p.
Reimplemented from TPZStream.
Definition at line 307 of file pzmd5stream.h.
References ReadError().
|
inline |
Definition at line 311 of file pzmd5stream.h.
|
inline |
Reset the MD5 signature.
Definition at line 163 of file pzmd5stream.h.
Referenced by TPZMD5Stream().
|
inlinevirtual |
Writes size integers at pointer location p.
Implements TPZStream.
Definition at line 174 of file pzmd5stream.h.
Referenced by Write().
|
inlinevirtual |
Writes size longs at pointer location p.
Implements TPZStream.
Definition at line 178 of file pzmd5stream.h.
|
inlinevirtual |
Writes size integers at pointer location p.
Implements TPZStream.
Definition at line 182 of file pzmd5stream.h.
|
inlinevirtual |
Writes size floating points at pointer location p.
Implements TPZStream.
Definition at line 186 of file pzmd5stream.h.
|
inlinevirtual |
Writes size floating points at pointer location p.
Implements TPZStream.
Definition at line 190 of file pzmd5stream.h.
|
inlinevirtual |
Writes size floating points at pointer location p.
Reimplemented from TPZStream.
Definition at line 194 of file pzmd5stream.h.
|
inlinevirtual |
Writes size chars at pointer location p.
Implements TPZStream.
Definition at line 198 of file pzmd5stream.h.
|
inlinevirtual |
Writes size strings at pointer location p.
Reimplemented from TPZStream.
Definition at line 202 of file pzmd5stream.h.
References Write().
|
inlinevirtual |
Writes size complex-float at pointer location p.
Implements TPZStream.
Definition at line 212 of file pzmd5stream.h.
|
inlinevirtual |
Writes size complex-double at pointer location p.
Implements TPZStream.
Definition at line 216 of file pzmd5stream.h.
|
inlinevirtual |
Writes size complex-long double at pointer location p.
Reimplemented from TPZStream.
Definition at line 220 of file pzmd5stream.h.
References Write().
|
inline |
Write computed MD5 signature to file.
Definition at line 121 of file pzmd5stream.h.
Referenced by main().
|
inline |
Write computed MD5 signature to file.
Definition at line 137 of file pzmd5stream.h.
|
inline |
Writes size objects of the class T at pointer location p.
Definition at line 242 of file pzmd5stream.h.
References Read(), and ReadError().
|
private |
Definition at line 32 of file pzmd5stream.h.