1 #ifndef _EXTERNAL_FILE_H_
2 #define _EXTERNAL_FILE_H_
9 #include "stream_tools.h"
11 #include "stream_tools.h"
35 template <
class External_data>
57 void open(
const char *,
const std::ios_base::openmode &);
External_file & read(External_data &)
Reads a row from the file and advances one row.
virtual void write_text(const External_data &)
Read file in text mode.
Definition: external-file.h:43
External_file & write(const External_data &)
Writes a row to the file and advances one row.
void read_binary(External_data &)
Read file in binary mode.
bool binary_
Binary mode flag.
Definition: map_file.h:81
void open(const char *, const std::ios_base::openmode &)
! The function that opens a External_file (if file).
Definition: external-file.cc:4
An interface for reading and writing data specified outside of mapgd.
Definition: external-file.h:36
void write_binary(const External_data &)
Write in binary mode.
bool read_
File is open for reading.
Definition: map_file.h:79
std::istream * in_
All data is read from in.
Definition: map_file.h:85
An interface used to read/write data from outside of mapgd.
Definition: external-data.h:17
bool write_
File is open for writing.
Definition: map_file.h:80
std::ostream * out_
All data is written is written to out.
Definition: map_file.h:86
void open(const std::ios::openmode &)
Opens a Base_file to the cin/cout.
bool open_
indicates whether the iostream opened succesfully
Definition: map_file.h:60
std::string filename_
The name of the file if opened.
Definition: map_file.h:97
A templet which stores data associated with specific locations in a genome.
Definition: map_file.h:50