Classes | |
struct | t_trnheader |
struct | XDR |
struct | XDRFILE |
Contents of the abstract XDRFILE data structure. More... | |
Typedefs | |
typedef float | matrix[DIM][DIM] |
typedef int | mybool |
typedef float | rvec[DIM] |
typedef struct XDR | XDR |
typedef struct XDRFILE | XDRFILE |
Abstract datatype for an portable binary file handle. More... | |
typedef int(* | xdrproc_t) (XDR *, void *,...) |
Enumerations | |
enum | { exdrOK, exdrHEADER, exdrSTRING, exdrDOUBLE, exdrINT, exdrFLOAT, exdrUINT, exdr3DX, exdrCLOSE, exdrMAGIC, exdrNOMEM, exdrENDOFFILE, exdrFILENOTFOUND, exdrNR } |
enum | { FALSE, TRUE } |
enum | xdr_op { XDR_ENCODE = 0, XDR_DECODE = 1, XDR_FREE = 2 } |
Functions | |
static int | ctofstr (char *dest, int dest_len, char *src) |
ctofstr (str, len, cstr) | |
static int | decodebits (int buf[], int num_of_bits) |
static void | decodeints (int buf[], int num_of_ints, int num_of_bits, unsigned int sizes[], int nums[]) |
static int | do_htrn (XDRFILE *xd, mybool bRead, t_trnheader *sh, matrix box, rvec *x, rvec *v, rvec *f) |
static int | do_trn (XDRFILE *xd, mybool bRead, int *step, float *t, float *lambda, matrix box, int *natoms, rvec *x, rvec *v, rvec *f) |
static int | do_trnheader (XDRFILE *xd, mybool bRead, t_trnheader *sh) |
static void | encodebits (int buf[], int num_of_bits, int num) |
static void | encodeints (int buf[], int num_of_ints, int num_of_bits, unsigned int sizes[], unsigned int nums[]) |
void | F77_FUNC (xddcd, XDRDCD)(int *fid |
void | F77_FUNC (xdrccd, XDRCCD)(int *fid |
void | F77_FUNC (xdrccs, XDRCCS)(int *fid |
void | F77_FUNC (xdrclose, XDRCLOSE)(int *fid) |
void | F77_FUNC (xdrdcs, XDRDCS)(int *fid |
void | F77_FUNC (xdropen, XDROPEN)(int *fid |
void | F77_FUNC (xdrrchar, XDRRCHAR)(int *fid |
void | F77_FUNC (xdrrdouble, XDRRDOUBLE)(int *fid |
void | F77_FUNC (xdrrint, XDRRINT)(int *fid |
void | F77_FUNC (xdrropaque, XDRROPAQUE)(int *fid |
void | F77_FUNC (xdrrshort, XDRRSHORT)(int *fid |
void | F77_FUNC (xdrrsingle, XDRRSINGLE)(int *fid |
void | F77_FUNC (xdrrstring, XDRRSTRING)(int *fid |
void | F77_FUNC (xdrruchar, XDRRUCHAR)(int *fid |
void | F77_FUNC (xdrruint, XDRRUINT)(int *fid |
void | F77_FUNC (xdrrushort, XDRRUSHORT)(int *fid |
void | F77_FUNC (xdrwchar, XDRWCHAR)(int *fid |
void | F77_FUNC (xdrwdouble, XDRWDOUBLE)(int *fid |
void | F77_FUNC (xdrwint, XDRWINT)(int *fid |
void | F77_FUNC (xdrwopaque, XDRWOPAQUE)(int *fid |
void | F77_FUNC (xdrwshort, XDRWSHORT)(int *fid |
void | F77_FUNC (xdrwsingle, XDRWSINGLE)(int *fid |
void | F77_FUNC (xdrwstring, XDRWSTRING)(int *fid |
void | F77_FUNC (xdrwuchar, XDRWUCHAR)(int *fid |
void | F77_FUNC (xdrwuint, XDRWUINT)(int *fid |
void | F77_FUNC (xdrwushort, XDRWUSHORT)(int *fid |
free (cstr) | |
static int | ftocstr (char *dest, int dest_len, char *src, int src_len) |
if ((cstr=(char *) malloc((len+1) *sizeof(char)))==NULL) | |
if (f77init) | |
else | if (ftocstr(cfilename, sizeof(cfilename), filename, fn_len)) |
else | if (ftocstr(cmode, sizeof(cmode), mode, mode_len)) |
if (ftocstr(cstr, len+1, str, len)) | |
if (i==MAX_FORTRAN_XDR) | |
static int | nFloatSize (t_trnheader *sh, int *nflsz) |
int | read_trr (XDRFILE *xd, int natoms, int *step, float *t, float *lambda, matrix box, rvec *x, rvec *v, rvec *f) |
int | read_trr_natoms (char *fn, int *natoms) |
int | read_xtc (XDRFILE *xd, int natoms, int *step, float *time, matrix box, rvec *x, float *prec) |
int | read_xtc_natoms (char *fn, int *natoms) |
static int | sizeofint (int size) |
static int | sizeofints (int num_of_ints, unsigned int sizes[]) |
while (i< MAX_FORTRAN_XDR &&f77xdr[i]!=NULL) i++ | |
int | write_trr (XDRFILE *xd, int natoms, int step, float t, float lambda, matrix box, rvec *x, rvec *v, rvec *f) |
int | write_xtc (XDRFILE *xd, int natoms, int step, float time, matrix box, rvec *x, float prec) |
static int | xdr_char (XDR *xdrs, char *ip) |
static int | xdr_double (XDR *xdrs, double *ip) |
static int | xdr_float (XDR *xdrs, float *ip) |
static int32_t | xdr_htonl (int32_t x) |
static int | xdr_int (XDR *xdrs, int *ip) |
static int32_t | xdr_ntohl (int x) |
static int | xdr_opaque (XDR *xdrs, char *cp, unsigned int cnt) |
static int | xdr_short (XDR *xdrs, short *ip) |
static int | xdr_string (XDR *xdrs, char **ip, unsigned int maxsize) |
static int32_t | xdr_swapbytes (int32_t x) |
static int | xdr_u_char (XDR *xdrs, unsigned char *ip) |
static int | xdr_u_int (XDR *xdrs, unsigned int *ip) |
static int | xdr_u_short (XDR *xdrs, unsigned short *ip) |
int | xdrfile_close (XDRFILE *xfp) |
Close a previously opened portable binary file, just like fclose() More... | |
int | xdrfile_compress_coord_double (double *ptr, int ncoord, double precision, XDRFILE *xfp) |
Compress coordiates in a double array to XDR file. More... | |
int | xdrfile_compress_coord_float (float *ptr, int ncoord, float precision, XDRFILE *xfp) |
Compress coordiates in a float array to XDR file. More... | |
int | xdrfile_decompress_coord_double (double *ptr, int *ncoord, double *precision, XDRFILE *xfp) |
Decompress coordiates from XDR file to array of doubles. More... | |
int | xdrfile_decompress_coord_float (float *ptr, int *ncoord, float *precision, XDRFILE *xfp) |
Decompress coordiates from XDR file to array of floats. More... | |
XDRFILE * | xdrfile_open (const char *path, const char *mode) |
Open a portable binary file, just like fopen() More... | |
int | xdrfile_read_char (char *ptr, int ndata, XDRFILE *xfp) |
Read one or more char type variable(s) More... | |
int | xdrfile_read_double (double *ptr, int ndata, XDRFILE *xfp) |
Read one or more double type variable(s) More... | |
int | xdrfile_read_float (float *ptr, int ndata, XDRFILE *xfp) |
Read one or more float type variable(s) More... | |
int | xdrfile_read_int (int *ptr, int ndata, XDRFILE *xfp) |
Read one or more integer type variable(s) More... | |
int | xdrfile_read_opaque (char *ptr, int nbytes, XDRFILE *xfp) |
Read raw bytes from file (unknown datatype) More... | |
int | xdrfile_read_short (short *ptr, int ndata, XDRFILE *xfp) |
Read one or more short type variable(s) More... | |
int | xdrfile_read_string (char *ptr, int maxlen, XDRFILE *xfp) |
Read a string (array of characters) More... | |
int | xdrfile_read_uchar (unsigned char *ptr, int ndata, XDRFILE *xfp) |
Read one or more unsigned char type variable(s) More... | |
int | xdrfile_read_uint (unsigned int *ptr, int ndata, XDRFILE *xfp) |
Read one or more unsigned integers type variable(s) More... | |
int | xdrfile_read_ushort (unsigned short *ptr, int ndata, XDRFILE *xfp) |
Read one or more unsigned short type variable(s) More... | |
int | xdrfile_write_char (char *ptr, int ndata, XDRFILE *xfp) |
Write one or more characters type variable(s) More... | |
int | xdrfile_write_double (double *ptr, int ndata, XDRFILE *xfp) |
Write one or more double type variable(s) More... | |
int | xdrfile_write_float (float *ptr, int ndata, XDRFILE *xfp) |
Write one or more float type variable(s) More... | |
int | xdrfile_write_int (int *ptr, int ndata, XDRFILE *xfp) |
Write one or more integer type variable(s) More... | |
int | xdrfile_write_opaque (char *ptr, int nbytes, XDRFILE *xfp) |
Write raw bytes to file (unknown datatype) More... | |
int | xdrfile_write_short (short *ptr, int ndata, XDRFILE *xfp) |
Write one or more short type variable(s) More... | |
int | xdrfile_write_string (char *ptr, XDRFILE *xfp) |
Write a string (array of characters) More... | |
int | xdrfile_write_uchar (unsigned char *ptr, int ndata, XDRFILE *xfp) |
Write one or more unsigned characters type variable(s) More... | |
int | xdrfile_write_uint (unsigned int *ptr, int ndata, XDRFILE *xfp) |
Write one or more unsigned integer type variable(s) More... | |
int | xdrfile_write_ushort (unsigned short *ptr, int ndata, XDRFILE *xfp) |
Write one or more unsigned short type variable(s) More... | |
static void | xdrstdio_create (XDR *xdrs, FILE *fp, enum xdr_op xop) |
static void | xdrstdio_destroy (XDR *) |
static int | xdrstdio_getbytes (XDR *, char *, unsigned int) |
static int | xdrstdio_getlong (XDR *, int32_t *) |
static unsigned int | xdrstdio_getpos (XDR *) |
static int | xdrstdio_putbytes (XDR *, char *, unsigned int) |
static int | xdrstdio_putlong (XDR *, int32_t *) |
static int | xdrstdio_setpos (XDR *, unsigned int) |
static int | xtc_coord (XDRFILE *xd, int *natoms, matrix box, rvec *x, float *prec, mybool bRead) |
static int | xtc_header (XDRFILE *xd, int *natoms, int *step, float *time, mybool bRead) |
Variables | |
char | cmode [5] |
void int * | data |
else | |
const char * | exdr_message [exdrNR] |
static int | f77init = 1 |
static XDRFILE * | f77xdr [MAX_FORTRAN_XDR] |
* | fid =i |
void char * | filename |
void char char int | fn_len |
int | i =0 |
void char * | ip |
void char int int | len |
static const int | magicints [] |
void char char * | mode |
void char char int int | mode_len |
void float int * | ncoord |
void int int * | ndata |
void float int float * | precision |
void int int int * | ret |
void char * | str |
static char | xdr_zero [BYTES_PER_XDR_UNIT] = {0, 0, 0, 0} |
static const XDR::xdr_ops | xdrstdio_ops |
typedef int PLMD::xdrfile::mybool |
typedef float PLMD::xdrfile::rvec[DIM] |
typedef struct XDR PLMD::xdrfile::XDR |
typedef struct XDRFILE PLMD::xdrfile::XDRFILE |
Abstract datatype for an portable binary file handle.
This datatype essentially works just like the standard FILE type in C. The actual contents is hidden in the implementation, so you can only define pointers to it, for use with the xdrfile routines.
If you really need to see the definition it is in xdrfile.c, but you cannot access elements of the structure outside that file.
typedef int(* PLMD::xdrfile::xdrproc_t) (XDR *, void *,...) |
anonymous enum |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
void PLMD::xdrfile::F77_FUNC | ( | xddcd | , |
XDRDCD | |||
) |
void PLMD::xdrfile::F77_FUNC | ( | xdrccd | , |
XDRCCD | |||
) |
void PLMD::xdrfile::F77_FUNC | ( | xdrccs | , |
XDRCCS | |||
) |
void PLMD::xdrfile::F77_FUNC | ( | xdrclose | , |
XDRCLOSE | |||
) |
void PLMD::xdrfile::F77_FUNC | ( | xdrdcs | , |
XDRDCS | |||
) |
void PLMD::xdrfile::F77_FUNC | ( | xdropen | , |
XDROPEN | |||
) |
void PLMD::xdrfile::F77_FUNC | ( | xdrrchar | , |
XDRRCHAR | |||
) |
void PLMD::xdrfile::F77_FUNC | ( | xdrrdouble | , |
XDRRDOUBLE | |||
) |
void PLMD::xdrfile::F77_FUNC | ( | xdrrint | , |
XDRRINT | |||
) |
void PLMD::xdrfile::F77_FUNC | ( | xdrropaque | , |
XDRROPAQUE | |||
) |
void PLMD::xdrfile::F77_FUNC | ( | xdrrshort | , |
XDRRSHORT | |||
) |
void PLMD::xdrfile::F77_FUNC | ( | xdrrsingle | , |
XDRRSINGLE | |||
) |
void PLMD::xdrfile::F77_FUNC | ( | xdrrstring | , |
XDRRSTRING | |||
) |
void PLMD::xdrfile::F77_FUNC | ( | xdrruchar | , |
XDRRUCHAR | |||
) |
void PLMD::xdrfile::F77_FUNC | ( | xdrruint | , |
XDRRUINT | |||
) |
void PLMD::xdrfile::F77_FUNC | ( | xdrrushort | , |
XDRRUSHORT | |||
) |
void PLMD::xdrfile::F77_FUNC | ( | xdrwchar | , |
XDRWCHAR | |||
) |
void PLMD::xdrfile::F77_FUNC | ( | xdrwdouble | , |
XDRWDOUBLE | |||
) |
void PLMD::xdrfile::F77_FUNC | ( | xdrwint | , |
XDRWINT | |||
) |
void PLMD::xdrfile::F77_FUNC | ( | xdrwopaque | , |
XDRWOPAQUE | |||
) |
void PLMD::xdrfile::F77_FUNC | ( | xdrwshort | , |
XDRWSHORT | |||
) |
void PLMD::xdrfile::F77_FUNC | ( | xdrwsingle | , |
XDRWSINGLE | |||
) |
void PLMD::xdrfile::F77_FUNC | ( | xdrwstring | , |
XDRWSTRING | |||
) |
void PLMD::xdrfile::F77_FUNC | ( | xdrwuchar | , |
XDRWUCHAR | |||
) |
void PLMD::xdrfile::F77_FUNC | ( | xdrwuint | , |
XDRWUINT | |||
) |
void PLMD::xdrfile::F77_FUNC | ( | xdrwushort | , |
XDRWUSHORT | |||
) |
PLMD::xdrfile::free | ( | cstr | ) |
|
static |
PLMD::xdrfile::if | ( | (cstr=(char *) malloc((len+1) *sizeof(char))) | = =NULL | ) |
PLMD::xdrfile::if | ( | f77init | ) |
PLMD::xdrfile::if | ( | i | = =MAX_FORTRAN_XDR | ) |
|
static |
int PLMD::xdrfile::read_trr | ( | XDRFILE * | xd, |
int | natoms, | ||
int * | step, | ||
float * | t, | ||
float * | lambda, | ||
matrix | box, | ||
rvec * | x, | ||
rvec * | v, | ||
rvec * | f | ||
) |
int PLMD::xdrfile::read_trr_natoms | ( | char * | fn, |
int * | natoms | ||
) |
int PLMD::xdrfile::read_xtc | ( | XDRFILE * | xd, |
int | natoms, | ||
int * | step, | ||
float * | time, | ||
matrix | box, | ||
rvec * | x, | ||
float * | prec | ||
) |
int PLMD::xdrfile::read_xtc_natoms | ( | char * | fn, |
int * | natoms | ||
) |
|
static |
|
static |
PLMD::xdrfile::while | ( | ) |
int PLMD::xdrfile::write_trr | ( | XDRFILE * | xd, |
int | natoms, | ||
int | step, | ||
float | t, | ||
float | lambda, | ||
matrix | box, | ||
rvec * | x, | ||
rvec * | v, | ||
rvec * | f | ||
) |
int PLMD::xdrfile::write_xtc | ( | XDRFILE * | xd, |
int | natoms, | ||
int | step, | ||
float | time, | ||
matrix | box, | ||
rvec * | x, | ||
float | prec | ||
) |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
int PLMD::xdrfile::xdrfile_close | ( | XDRFILE * | xfp | ) |
Close a previously opened portable binary file, just like fclose()
Use this routine much like calls to the standard library function fopen(). The only difference is that it is used for an XDRFILE handle instead of a FILE handle.
xfp | Pointer to an abstract XDRFILE datatype |
int PLMD::xdrfile::xdrfile_compress_coord_double | ( | double * | ptr, |
int | ncoord, | ||
double | precision, | ||
XDRFILE * | xfp | ||
) |
Compress coordiates in a double array to XDR file.
This routine will perform lossy compression on the three-dimensional coordinate data data specified and store it in the XDR file. Double will NOT give you any extra precision since the coordinates are compressed. This routine just avoids allocating a temporary array of floats.
The lossy part of the compression consists of multiplying each coordinate with the precision argument and then rounding to integers. We suggest a default value of 1000.0, which means you are guaranteed three decimals of accuracy. The only limitation is that scaled coordinates must still fit in an integer variable, so if the precision is 1000.0 the coordinate magnitudes must be less than +-2e6.
ptr | Pointer to coordinates to compress (length 3*ncoord) |
ncoord | Number of coordinate triplets in data |
precision | Scaling factor for lossy compression. If it is <=0, the default value of 1000.0 is used. |
xfp | Handle to portably binary file |
int PLMD::xdrfile::xdrfile_compress_coord_float | ( | float * | ptr, |
int | ncoord, | ||
float | precision, | ||
XDRFILE * | xfp | ||
) |
Compress coordiates in a float array to XDR file.
This routine will perform lossy compression on the three-dimensional coordinate data data specified and store it in the XDR file.
The lossy part of the compression consists of multiplying each coordinate with the precision argument and then rounding to integers. We suggest a default value of 1000.0, which means you are guaranteed three decimals of accuracy. The only limitation is that scaled coordinates must still fit in an integer variable, so if the precision is 1000.0 the coordinate magnitudes must be less than +-2e6.
ptr | Pointer to coordinates to compress (length 3*ncoord) |
ncoord | Number of coordinate triplets in data |
precision | Scaling factor for lossy compression. If it is <=0, the default value of 1000.0 is used. |
xfp | Handle to portably binary file |
int PLMD::xdrfile::xdrfile_decompress_coord_double | ( | double * | ptr, |
int * | ncoord, | ||
double * | precision, | ||
XDRFILE * | xfp | ||
) |
Decompress coordiates from XDR file to array of doubles.
This routine will decompress three-dimensional coordinate data previously stored in an XDR file and store it in the specified array of doubles. Double will NOT give you any extra precision since the coordinates are compressed. This routine just avoids allocating a temporary array of floats.
The precision used during the earlier compression is read from the file and returned - you cannot adjust the accuracy at this stage.
ptr | Pointer to coordinates to compress (length>= 3*ncoord) |
ncoord | Max number of coordinate triplets to read on input, actual number of coordinate triplets read on return. If this is smaller than the number of coordinates in the frame an error will occur. |
precision | The precision used in the previous compression will be written to this variable on return. |
xfp | Handle to portably binary file |
int PLMD::xdrfile::xdrfile_decompress_coord_float | ( | float * | ptr, |
int * | ncoord, | ||
float * | precision, | ||
XDRFILE * | xfp | ||
) |
Decompress coordiates from XDR file to array of floats.
This routine will decompress three-dimensional coordinate data previously stored in an XDR file and store it in the specified array of floats.
The precision used during the earlier compression is read from the file and returned - you cannot adjust the accuracy at this stage.
ptr | Pointer to coordinates to compress (length>= 3*ncoord) |
ncoord | Max number of coordinate triplets to read on input, actual number of coordinate triplets read on return. If this is smaller than the number of coordinates in the frame an error will occur. |
precision | The precision used in the previous compression will be written to this variable on return. |
xfp | Handle to portably binary file |
XDRFILE * PLMD::xdrfile::xdrfile_open | ( | const char * | path, |
const char * | mode | ||
) |
Open a portable binary file, just like fopen()
Use this routine much like calls to the standard library function fopen(). The only difference is that the returned pointer should only be used with routines defined in this header.
path | Full or relative path (including name) of the file |
mode | "r" for reading, "w" for writing, "a" for append. |
int PLMD::xdrfile::xdrfile_read_char | ( | char * | ptr, |
int | ndata, | ||
XDRFILE * | xfp | ||
) |
Read one or more char type variable(s)
ptr | Pointer to memory where data should be written |
ndata | Number of characters to read |
xfp | Handle to portable binary file, created with xdrfile_open() |
int PLMD::xdrfile::xdrfile_read_double | ( | double * | ptr, |
int | ndata, | ||
XDRFILE * | xfp | ||
) |
Read one or more double type variable(s)
ptr | Pointer to memory where data should be written |
ndata | Number of doubles to read |
xfp | Handle to portable binary file, created with xdrfile_open() |
int PLMD::xdrfile::xdrfile_read_float | ( | float * | ptr, |
int | ndata, | ||
XDRFILE * | xfp | ||
) |
Read one or more float type variable(s)
ptr | Pointer to memory where data should be written |
ndata | Number of floats to read |
xfp | Handle to portable binary file, created with xdrfile_open() |
int PLMD::xdrfile::xdrfile_read_int | ( | int * | ptr, |
int | ndata, | ||
XDRFILE * | xfp | ||
) |
Read one or more integer type variable(s)
ptr | Pointer to memory where data should be written |
ndata | Number of integers to read |
xfp | Handle to portable binary file, created with xdrfile_open() |
The integer data type is assumed to be less than or equal to 32 bits.
We do not provide any routines for reading/writing 64-bit integers, since
Split your 64-bit data into two 32-bit integers for portability!
int PLMD::xdrfile::xdrfile_read_opaque | ( | char * | ptr, |
int | nbytes, | ||
XDRFILE * | xfp | ||
) |
Read raw bytes from file (unknown datatype)
ptr | Pointer to memory where data should be written |
nbytes | Number of bytes to read. No conversion whatsoever is done. |
xfp | Handle to portable binary file, created with xdrfile_open() |
int PLMD::xdrfile::xdrfile_read_short | ( | short * | ptr, |
int | ndata, | ||
XDRFILE * | xfp | ||
) |
Read one or more short type variable(s)
ptr | Pointer to memory where data should be written |
ndata | Number of shorts to read |
xfp | Handle to portable binary file, created with xdrfile_open() |
int PLMD::xdrfile::xdrfile_read_string | ( | char * | ptr, |
int | maxlen, | ||
XDRFILE * | xfp | ||
) |
Read a string (array of characters)
ptr | Pointer to memory where data should be written |
maxlen | Maximum length of string. If no end-of-string is encountered, one byte less than this is read and end-of-string appended. |
xfp | Handle to portable binary file, created with xdrfile_open() |
int PLMD::xdrfile::xdrfile_read_uchar | ( | unsigned char * | ptr, |
int | ndata, | ||
XDRFILE * | xfp | ||
) |
Read one or more unsigned char type variable(s)
ptr | Pointer to memory where data should be written |
ndata | Number of unsigned characters to read |
xfp | Handle to portable binary file, created with xdrfile_open() |
int PLMD::xdrfile::xdrfile_read_uint | ( | unsigned int * | ptr, |
int | ndata, | ||
XDRFILE * | xfp | ||
) |
Read one or more unsigned integers type variable(s)
ptr | Pointer to memory where data should be written |
ndata | Number of unsigned integers to read |
xfp | Handle to portable binary file, created with xdrfile_open() |
The integer data type is assumed to be less than or equal to 32 bits.
We do not provide any routines for reading/writing 64-bit integers, since
Split your 64-bit data into two 32-bit integers for portability!
int PLMD::xdrfile::xdrfile_read_ushort | ( | unsigned short * | ptr, |
int | ndata, | ||
XDRFILE * | xfp | ||
) |
Read one or more unsigned short type variable(s)
ptr | Pointer to memory where data should be written |
ndata | Number of unsigned shorts to read |
xfp | Handle to portable binary file, created with xdrfile_open() |
int PLMD::xdrfile::xdrfile_write_char | ( | char * | ptr, |
int | ndata, | ||
XDRFILE * | xfp | ||
) |
Write one or more characters type variable(s)
ptr | Pointer to memory where data should be read |
ndata | Number of characters to write. |
xfp | Handle to portable binary file, created with xdrfile_open() |
int PLMD::xdrfile::xdrfile_write_double | ( | double * | ptr, |
int | ndata, | ||
XDRFILE * | xfp | ||
) |
Write one or more double type variable(s)
ptr | Pointer to memory where data should be read |
ndata | Number of double to write. |
xfp | Handle to portable binary file, created with xdrfile_open() |
int PLMD::xdrfile::xdrfile_write_float | ( | float * | ptr, |
int | ndata, | ||
XDRFILE * | xfp | ||
) |
Write one or more float type variable(s)
ptr | Pointer to memory where data should be read |
ndata | Number of floats to write. |
xfp | Handle to portable binary file, created with xdrfile_open() |
int PLMD::xdrfile::xdrfile_write_int | ( | int * | ptr, |
int | ndata, | ||
XDRFILE * | xfp | ||
) |
Write one or more integer type variable(s)
ptr | Pointer to memory where data should be read |
ndata | Number of integers to write. |
xfp | Handle to portable binary file, created with xdrfile_open() |
The integer data type is assumed to be less than or equal to 32 bits.
We do not provide any routines for reading/writing 64-bit integers, since
Split your 64-bit data into two 32-bit integers for portability!
int PLMD::xdrfile::xdrfile_write_opaque | ( | char * | ptr, |
int | nbytes, | ||
XDRFILE * | xfp | ||
) |
Write raw bytes to file (unknown datatype)
ptr | Pointer to memory where data should be read |
nbytes | Number of bytes to write. No conversion whatsoever is done. |
xfp | Handle to portable binary file, created with xdrfile_open() |
int PLMD::xdrfile::xdrfile_write_short | ( | short * | ptr, |
int | ndata, | ||
XDRFILE * | xfp | ||
) |
Write one or more short type variable(s)
ptr | Pointer to memory where data should be read |
ndata | Number of shorts to write. |
xfp | Handle to portable binary file, created with xdrfile_open() |
int PLMD::xdrfile::xdrfile_write_string | ( | char * | ptr, |
XDRFILE * | xfp | ||
) |
Write a string (array of characters)
ptr | Pointer to memory where data should be read |
xfp | Handle to portable binary file, created with xdrfile_open() |
int PLMD::xdrfile::xdrfile_write_uchar | ( | unsigned char * | ptr, |
int | ndata, | ||
XDRFILE * | xfp | ||
) |
Write one or more unsigned characters type variable(s)
ptr | Pointer to memory where data should be read |
ndata | Number of unsigned characters to write. |
xfp | Handle to portable binary file, created with xdrfile_open() |
int PLMD::xdrfile::xdrfile_write_uint | ( | unsigned int * | ptr, |
int | ndata, | ||
XDRFILE * | xfp | ||
) |
Write one or more unsigned integer type variable(s)
ptr | Pointer to memory where data should be read |
ndata | Number of unsigned integers to write. |
xfp | Handle to portable binary file, created with xdrfile_open() |
The integer data type is assumed to be less than or equal to 32 bits.
We do not provide any routines for reading/writing 64-bit integers, since
Split your 64-bit data into two 32-bit integers for portability!
int PLMD::xdrfile::xdrfile_write_ushort | ( | unsigned short * | ptr, |
int | ndata, | ||
XDRFILE * | xfp | ||
) |
Write one or more unsigned short type variable(s)
ptr | Pointer to memory where data should be read |
ndata | Number of unsigned shorts to write. |
xfp | Handle to portable binary file, created with xdrfile_open() |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
char PLMD::xdrfile::cmode[5] |
void double * PLMD::xdrfile::data |
PLMD::xdrfile::else |
const char * PLMD::xdrfile::exdr_message |
|
static |
|
static |
* PLMD::xdrfile::fid =i |
void char* PLMD::xdrfile::filename |
void char char int PLMD::xdrfile::fn_len |
PLMD::xdrfile::i =0 |
void unsigned short * PLMD::xdrfile::ip |
void char int int PLMD::xdrfile::len |
|
static |
void char char* PLMD::xdrfile::mode |
void char char int int PLMD::xdrfile::mode_len |
void double int * PLMD::xdrfile::ncoord |
void char int * PLMD::xdrfile::ndata |
void double int double * PLMD::xdrfile::precision |
void double int double int * PLMD::xdrfile::ret |
void char * PLMD::xdrfile::str |
|
static |
|
static |
Hosted by GitHub | 1.8.17 |