8 #include "XdrFileIArchive.h" 33 filePtr_ = fopen(filename.c_str(),
"rb");
34 if (filePtr_ == NULL) {
35 std::string msg =
"Failure to open C file: ";
36 msg += filename.c_str();
39 xdrstdio_create(&xdr_, filePtr_, XDR_DECODE);
54 xdrstdio_create(&xdr_, filePtr_, XDR_DECODE);
62 const unsigned int version)
64 static char* temp = 0;
65 static unsigned int tempsize = 0;
68 xdr_u_int(ar.
xdrPtr(), &size);
71 if (size > tempsize) {
74 temp =
new char[tempsize];
78 if (size > tempsize) {
81 temp =
new char[tempsize];
83 xdr_string(ar.
xdrPtr(), &temp, size);
XDR * xdrPtr()
Get a pointer to the enclosed XDR object.
FILE * file()
Get the underlying file handle.
virtual ~XdrFileIArchive()
Destructor.
#define UTIL_THROW(msg)
Macro for throwing an Exception, reporting function, file and line number.
Utility classes for scientific computation.
Loading / input archive for binary XDR file.
XdrFileIArchive()
Constructor.
void init(FILE *file)
Initialize by associating with an open file.