stream

stream

Synopsis

typedef             Stream;
#define             CHUNK_END_MARKER
#define             CHUNK_START_MARKER
#define             CRYSTAL_END_MARKER
#define             CRYSTAL_START_MARKER
#define             PEAK_LIST_END_MARKER
#define             PEAK_LIST_START_MARKER
#define             REFLECTION_END_MARKER
#define             REFLECTION_START_MARKER
Stream *            open_stream_fd_for_write            (int fd);
Stream *            open_stream_for_read                (const char *filename);
Stream *            open_stream_for_write               (const char *filename);
void                close_stream                        (Stream *st);
int                 read_chunk                          (Stream *st,
                                                         struct image *image);
void                write_chunk                         (Stream *st,
                                                         struct image *image,
                                                         struct hdfile *hdfile,
                                                         int include_peaks,
                                                         int include_reflections);
int                 rewind_stream                       (Stream *st);
int                 is_stream                           (const char *filename);
void                write_command                       (Stream *st,
                                                         int argc,
                                                         char *argv[]);
void                write_line                          (Stream *st,
                                                         const char *line);

Description

Details

Stream

typedef struct _stream Stream;

CHUNK_END_MARKER

#define CHUNK_END_MARKER "----- End chunk -----"

CHUNK_START_MARKER

#define CHUNK_START_MARKER "----- Begin chunk -----"

CRYSTAL_END_MARKER

#define CRYSTAL_END_MARKER "--- End crystal"

CRYSTAL_START_MARKER

#define CRYSTAL_START_MARKER "--- Begin crystal"

PEAK_LIST_END_MARKER

#define PEAK_LIST_END_MARKER "End of peak list"

PEAK_LIST_START_MARKER

#define PEAK_LIST_START_MARKER "Peaks from peak search"

REFLECTION_END_MARKER

#define REFLECTION_END_MARKER "End of reflections"

REFLECTION_START_MARKER

#define REFLECTION_START_MARKER "Reflections measured after indexing"

open_stream_fd_for_write ()

Stream *            open_stream_fd_for_write            (int fd);

open_stream_for_read ()

Stream *            open_stream_for_read                (const char *filename);

open_stream_for_write ()

Stream *            open_stream_for_write               (const char *filename);

close_stream ()

void                close_stream                        (Stream *st);

read_chunk ()

int                 read_chunk                          (Stream *st,
                                                         struct image *image);

write_chunk ()

void                write_chunk                         (Stream *st,
                                                         struct image *image,
                                                         struct hdfile *hdfile,
                                                         int include_peaks,
                                                         int include_reflections);

rewind_stream ()

int                 rewind_stream                       (Stream *st);

Attempts to set the file pointer for st to the start of the stream, so that later calls to read_chunk() will repeat the sequence of chunks from the start.

Programs must not assume that this operation always succeeds!

st :

A Stream

Returns :

non-zero if the stream could not be rewound.

is_stream ()

int                 is_stream                           (const char *filename);

write_command ()

void                write_command                       (Stream *st,
                                                         int argc,
                                                         char *argv[]);

write_line ()

void                write_line                          (Stream *st,
                                                         const char *line);