#include <assert.h>
#include "PndFTSCADef.h"
#include <cstdio>
Go to the source code of this file.
|
template<typename T > |
static void | BinaryStoreWrite (const T *mem, int count, FILE *f) |
|
template<typename T > |
static void | BinaryStoreWrite (const T &mem, FILE *f) |
|
static void | BinaryStoreWrite (const void *offsetPtr, const void *mem, FILE *f) |
|
template<typename T > |
static void | BinaryStoreRead (T *mem, int count, FILE *f) |
|
template<typename T > |
static void | BinaryStoreRead (T &mem, FILE *f) |
|
template<typename T > |
static void | BinaryStoreRead (T *&offsetPtr, char *mem, FILE *f) |
|
◆ BinaryStoreRead() [1/3]
template<typename T >
static void BinaryStoreRead |
( |
T * |
mem, |
|
|
int |
count, |
|
|
FILE * |
f |
|
) |
| |
|
inlinestatic |
Definition at line 57 of file BinaryStoreHelper.h.
59 const int read = std::fread(mem,
sizeof(T), count,
f);
60 assert(read == count);
◆ BinaryStoreRead() [2/3]
template<typename T >
static void BinaryStoreRead |
( |
T & |
mem, |
|
|
FILE * |
f |
|
) |
| |
|
inlinestatic |
◆ BinaryStoreRead() [3/3]
template<typename T >
static void BinaryStoreRead |
( |
T *& |
offsetPtr, |
|
|
char * |
mem, |
|
|
FILE * |
f |
|
) |
| |
|
inlinestatic |
Definition at line 73 of file BinaryStoreHelper.h.
76 const size_t read = std::fread(&offset,
sizeof(
int), 1,
f);
79 offsetPtr =
reinterpret_cast<T *
>(mem + offset);
◆ BinaryStoreWrite() [1/3]
template<typename T >
static void BinaryStoreWrite |
( |
const T * |
mem, |
|
|
int |
count, |
|
|
FILE * |
f |
|
) |
| |
|
inlinestatic |
Definition at line 31 of file BinaryStoreHelper.h.
33 const int written = std::fwrite(mem,
sizeof(T), count,
f);
34 assert(written == count);
35 UNUSED_PARAM1(written);
◆ BinaryStoreWrite() [2/3]
template<typename T >
static void BinaryStoreWrite |
( |
const T & |
mem, |
|
|
FILE * |
f |
|
) |
| |
|
inlinestatic |
Definition at line 39 of file BinaryStoreHelper.h.
41 const size_t written = std::fwrite(&mem,
sizeof(T), 1,
f);
43 UNUSED_PARAM1(written);
◆ BinaryStoreWrite() [3/3]
static void BinaryStoreWrite |
( |
const void * |
offsetPtr, |
|
|
const void * |
mem, |
|
|
FILE * |
f |
|
) |
| |
|
inlinestatic |
Definition at line 46 of file BinaryStoreHelper.h.
48 const int offset =
static_cast<const char *
>(offsetPtr) - static_cast<const char *>(mem);
49 const size_t written = std::fwrite(&offset,
sizeof(
int), 1,
f);
51 UNUSED_PARAM1(written);