#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 69 of file BinaryStoreHelper.h.
71 const int read = std::fread(mem,
sizeof(T), count,
f);
72 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 85 of file BinaryStoreHelper.h.
88 const size_t read = std::fread(&offset,
sizeof(
int), 1,
f);
91 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 43 of file BinaryStoreHelper.h.
45 const int written = std::fwrite(mem,
sizeof(T), count,
f);
46 assert(written == count);
47 UNUSED_PARAM1(written);
◆ BinaryStoreWrite() [2/3]
template<typename T >
static void BinaryStoreWrite |
( |
const T & |
mem, |
|
|
FILE * |
f |
|
) |
| |
|
inlinestatic |
Definition at line 51 of file BinaryStoreHelper.h.
53 const size_t written = std::fwrite(&mem,
sizeof(T), 1,
f);
55 UNUSED_PARAM1(written);
◆ BinaryStoreWrite() [3/3]
static void BinaryStoreWrite |
( |
const void * |
offsetPtr, |
|
|
const void * |
mem, |
|
|
FILE * |
f |
|
) |
| |
|
inlinestatic |
Definition at line 58 of file BinaryStoreHelper.h.
60 const int offset =
static_cast<const char *
>(offsetPtr) - static_cast<const char *>(mem);
61 const size_t written = std::fwrite(&offset,
sizeof(
int), 1,
f);
63 UNUSED_PARAM1(written);