36 #ifndef MADNESS_WORLD_BINFSAR_H__INCLUDED
37 #define MADNESS_WORLD_BINFSAR_H__INCLUDED
52 static const std::size_t IOBUFSIZE = 4*1024*1024;
54 mutable std::ofstream os;
57 std::ios_base::openmode mode = std::ios_base::binary | \
64 os.write((
const char *) t, n*
sizeof(
T));
67 void open(
const char* filename,
68 std::ios_base::openmode mode = std::ios_base::binary | \
79 static const std::size_t IOBUFSIZE = 4*1024*1024;
81 mutable std::ifstream is;
83 BinaryFstreamInputArchive(
const char* filename = 0, std::ios_base::openmode mode = std::ios_base::binary | std::ios_base::in);
89 is.read((
char *) t, n*
sizeof(
T));
92 void open(
const char* filename, std::ios_base::openmode mode = std::ios_base::binary | std::ios_base::in);
98 #endif // MADNESS_WORLD_BINFSAR_H__INCLUDED
void close()
Definition: binfsar.cc:58
void flush()
Definition: binfsar.cc:65
Interface templates for the archives (serialization)
const T1 &f1 return GTEST_2_TUPLE_() T(f0, f1)
BinaryFstreamOutputArchive(const char *filename=0, std::ios_base::openmode mode=std::ios_base::binary|std::ios_base::out|std::ios_base::trunc)
Definition: binfsar.cc:42
Base class for output archives classes.
Definition: archive.h:583
void open(const char *filename, std::ios_base::openmode mode=std::ios_base::binary|std::ios_base::out|std::ios_base::trunc)
Definition: binfsar.cc:48
const mpreal trunc(const mpreal &v)
Definition: mpreal.h:2618
madness::enable_if< madness::is_serializable< T >, void >::type store(const T *t, long n) const
Definition: binfsar.h:63
Wraps an archive around a binary file stream for output.
Definition: binfsar.h:51
enable_if from Boost for conditionally instantiating templates based on type
Definition: enable_if.h:60
Holds machinery to set up Functions/FuncImpls using various Factories and Interfaces.
Definition: chem/atomutil.cc:45