#include <itpp/base/itfile.h>
Inheritance diagram for itpp::it_ifile:
Public Member Functions | |
it_ifile () | |
Constructor. | |
it_ifile (const std::string &name) | |
Constructor. Calls open(). | |
virtual | ~it_ifile () |
Destructor. | |
void | open (const std::string &name) |
Open a file. The file must exist. | |
virtual void | close () |
Close a file. | |
bfstream & | low_level () |
Returns pointer to the underlying bfstream used. | |
bool | read_check_file_header () |
Reads and checks the file data header. Returns true if the header is valid and false otherwise. | |
void | read_data_header (data_header &h) |
Read the data header and return the result in the variable h . | |
void | low_level_read (bin &x) |
Read a binary value at the current file pointer position. | |
void | low_level_read (short &x) |
Read a short value at the current file pointer position. | |
void | low_level_read (int &x) |
Read an integer value at the current file pointer position. | |
void | low_level_read (float &x) |
Read a float value at the current file pointer position. | |
void | low_level_read (double &x) |
Read a double value at the current file pointer position. | |
void | low_level_read (std::complex< float > &x) |
Read a float complex value at the current file pointer position. | |
void | low_level_read (std::complex< double > &x) |
Read a double complex value at the current file pointer position. | |
void | low_level_read_lo (vec &v) |
Read a vector of float values at the current file pointer position. | |
void | low_level_read_hi (vec &v) |
Read a vector of double values at the current file pointer position. | |
void | low_level_read (ivec &v) |
Read a vector of integer values at the current file pointer position. | |
void | low_level_read (bvec &v) |
Read a vector of binary values at the current file pointer position. | |
void | low_level_read_lo (cvec &v) |
Read a vector of float complex values at the current file pointer position. | |
void | low_level_read_hi (cvec &v) |
Read a vector of double complex values at the current file pointer position. | |
void | low_level_read (std::string &str) |
Read a string at the current file pointer position. | |
void | low_level_read_lo (mat &m) |
Read a matrix of float values at the current file pointer position. | |
void | low_level_read_hi (mat &m) |
Read a matrix of double values at the current file pointer position. | |
void | low_level_read (imat &m) |
Read a matrix of integer values at the current file pointer position. | |
void | low_level_read (bmat &m) |
Read a matrix of binary values at the current file pointer position. | |
void | low_level_read_lo (cmat &m) |
Read a matrix of float complex values at the current file pointer position. | |
void | low_level_read_hi (cmat &m) |
Read a matrix of double complex values at the current file pointer position. | |
void | low_level_read_lo (Array< float > &v) |
Read an Array of float values at the current file pointer position. | |
void | low_level_read_lo (Array< double > &v) |
Read an Array of float values at the current file pointer position. | |
void | low_level_read_hi (Array< double > &v) |
Read an Array of double values at the current file pointer position. | |
void | low_level_read (Array< int > &v) |
Read an Array of integer values at the current file pointer position. | |
void | low_level_read (Array< bin > &v) |
Read an Array of binary values at the current file pointer position. | |
void | low_level_read_lo (Array< std::complex< float > > &v) |
Read an Array of float complex values at the current file pointer position. | |
void | low_level_read_lo (Array< std::complex< double > > &v) |
Read an Array of float complex values at the current file pointer position. | |
void | low_level_read_hi (Array< std::complex< double > > &v) |
Read an Array of double complex values at the current file pointer position. | |
bool | seek (const std::string &name) |
Find the variable name . | |
bool | seek (int n) |
Find the variable number n . | |
void | info (std::string &name, std::string &type, int &bytes) |
Get information about the current variable. | |
Protected Attributes | |
bfstream | s |
Protected binary file stream. | |
Static Protected Attributes | |
static char | file_magic [4] = { 'I', 'T', '+', '+' } |
ACTION: Add documentation. | |
static char | file_version = 2 |
ACTION: Add documentation. |
Definition at line 115 of file itfile.h.
itpp::it_ifile::it_ifile | ( | ) |
itpp::it_ifile::it_ifile | ( | const std::string & | name | ) | [explicit] |
virtual itpp::it_ifile::~it_ifile | ( | ) | [inline, virtual] |
void itpp::it_ifile::open | ( | const std::string & | name | ) |
Open a file. The file must exist.
Definition at line 51 of file itfile.cpp.
References itpp::exist(), it_error, itpp::bfstream::open_readonly(), read_check_file_header(), and s.
Referenced by it_ifile().
void itpp::it_ifile::close | ( | ) | [virtual] |
Close a file.
Reimplemented in itpp::it_file.
Definition at line 65 of file itfile.cpp.
References s.
Referenced by itpp::it_load_var_as().
bfstream& itpp::it_ifile::low_level | ( | ) | [inline] |
Returns pointer to the underlying bfstream
used.
Reimplemented in itpp::it_file.
Definition at line 128 of file itfile.h.
References s.
bool itpp::it_ifile::read_check_file_header | ( | ) |
Reads and checks the file data header. Returns true if the header is valid and false otherwise.
Definition at line 129 of file itfile.cpp.
References itpp::it_file_base::file_magic, itpp::it_file_base::file_version, and s.
Referenced by itpp::it_file::open(), and open().
void itpp::it_ifile::read_data_header | ( | data_header & | h | ) |
Read the data header and return the result in the variable h
.
Definition at line 139 of file itfile.cpp.
References itpp::bfstream_base::endianity, s, and itpp::bfstream_base::set_endianity().
Referenced by info(), itpp::operator>>(), itpp::it_file::remove(), seek(), and itpp::it_file::write_data_header().
void itpp::it_ifile::low_level_read | ( | bin & | x | ) |
Read a binary value at the current file pointer position.
Definition at line 157 of file itfile.cpp.
References s.
Referenced by itpp::operator>>().
void itpp::it_ifile::low_level_read | ( | short & | x | ) |
Read a short value at the current file pointer position.
Definition at line 162 of file itfile.cpp.
References s.
void itpp::it_ifile::low_level_read | ( | int & | x | ) |
Read an integer value at the current file pointer position.
Definition at line 167 of file itfile.cpp.
References s.
void itpp::it_ifile::low_level_read | ( | float & | x | ) |
Read a float value at the current file pointer position.
Definition at line 179 of file itfile.cpp.
References s.
void itpp::it_ifile::low_level_read | ( | double & | x | ) |
Read a double value at the current file pointer position.
Definition at line 184 of file itfile.cpp.
References s.
void itpp::it_ifile::low_level_read | ( | std::complex< float > & | x | ) |
Read a float complex value at the current file pointer position.
Definition at line 189 of file itfile.cpp.
References s.
void itpp::it_ifile::low_level_read | ( | std::complex< double > & | x | ) |
Read a double complex value at the current file pointer position.
Definition at line 197 of file itfile.cpp.
References s.
void itpp::it_ifile::low_level_read_lo | ( | vec & | v | ) |
Read a vector of float values at the current file pointer position.
Definition at line 205 of file itfile.cpp.
References s.
Referenced by itpp::operator>>().
void itpp::it_ifile::low_level_read_hi | ( | vec & | v | ) |
Read a vector of double values at the current file pointer position.
Definition at line 218 of file itfile.cpp.
References s.
Referenced by itpp::operator>>().
void itpp::it_ifile::low_level_read | ( | ivec & | v | ) |
Read a vector of integer values at the current file pointer position.
Definition at line 231 of file itfile.cpp.
References s.
void itpp::it_ifile::low_level_read | ( | bvec & | v | ) |
Read a vector of binary values at the current file pointer position.
Definition at line 241 of file itfile.cpp.
References s.
void itpp::it_ifile::low_level_read_lo | ( | cvec & | v | ) |
Read a vector of float complex values at the current file pointer position.
Definition at line 251 of file itfile.cpp.
References s.
void itpp::it_ifile::low_level_read_hi | ( | cvec & | v | ) |
Read a vector of double complex values at the current file pointer position.
Definition at line 265 of file itfile.cpp.
References s.
void itpp::it_ifile::low_level_read | ( | std::string & | str | ) |
Read a string at the current file pointer position.
Definition at line 279 of file itfile.cpp.
References s.
void itpp::it_ifile::low_level_read_lo | ( | mat & | m | ) |
Read a matrix of float values at the current file pointer position.
Definition at line 293 of file itfile.cpp.
References s.
void itpp::it_ifile::low_level_read_hi | ( | mat & | m | ) |
Read a matrix of double values at the current file pointer position.
Definition at line 307 of file itfile.cpp.
References s.
void itpp::it_ifile::low_level_read | ( | imat & | m | ) |
Read a matrix of integer values at the current file pointer position.
Definition at line 321 of file itfile.cpp.
References s.
void itpp::it_ifile::low_level_read | ( | bmat & | m | ) |
Read a matrix of binary values at the current file pointer position.
Definition at line 332 of file itfile.cpp.
References s.
void itpp::it_ifile::low_level_read_lo | ( | cmat & | m | ) |
Read a matrix of float complex values at the current file pointer position.
Definition at line 343 of file itfile.cpp.
References s.
void itpp::it_ifile::low_level_read_hi | ( | cmat & | m | ) |
Read a matrix of double complex values at the current file pointer position.
Definition at line 358 of file itfile.cpp.
References s.
void itpp::it_ifile::low_level_read_lo | ( | Array< float > & | v | ) |
Read an Array of float values at the current file pointer position.
Definition at line 374 of file itfile.cpp.
References s, itpp::Array< T >::set_size(), and itpp::Array< T >::size().
void itpp::it_ifile::low_level_read_lo | ( | Array< double > & | v | ) |
Read an Array of float values at the current file pointer position.
Definition at line 387 of file itfile.cpp.
References s, itpp::Array< T >::set_size(), and itpp::Array< T >::size().
void itpp::it_ifile::low_level_read_hi | ( | Array< double > & | v | ) |
Read an Array of double values at the current file pointer position.
Definition at line 400 of file itfile.cpp.
References s, itpp::Array< T >::set_size(), and itpp::Array< T >::size().
void itpp::it_ifile::low_level_read | ( | Array< int > & | v | ) |
Read an Array of integer values at the current file pointer position.
Definition at line 413 of file itfile.cpp.
References s, itpp::Array< T >::set_size(), and itpp::Array< T >::size().
Read an Array of binary values at the current file pointer position.
Definition at line 423 of file itfile.cpp.
References s, itpp::Array< T >::set_size(), and itpp::Array< T >::size().
void itpp::it_ifile::low_level_read_lo | ( | Array< std::complex< float > > & | v | ) |
Read an Array of float complex values at the current file pointer position.
Definition at line 433 of file itfile.cpp.
References s.
void itpp::it_ifile::low_level_read_lo | ( | Array< std::complex< double > > & | v | ) |
Read an Array of float complex values at the current file pointer position.
Definition at line 447 of file itfile.cpp.
References s.
void itpp::it_ifile::low_level_read_hi | ( | Array< std::complex< double > > & | v | ) |
Read an Array of double complex values at the current file pointer position.
Definition at line 461 of file itfile.cpp.
References s.
bool itpp::it_ifile::seek | ( | const std::string & | name | ) |
Find the variable name
.
Definition at line 70 of file itfile.cpp.
References read_data_header(), and s.
Referenced by itpp::it_file::exists(), itpp::it_load_var_as(), itpp::operator>>(), and itpp::it_file::remove().
bool itpp::it_ifile::seek | ( | int | n | ) |
Find the variable number n
.
Definition at line 95 of file itfile.cpp.
References read_data_header(), and s.
void itpp::it_ifile::info | ( | std::string & | name, | |
std::string & | type, | |||
int & | bytes | |||
) |
Get information about the current variable.
Definition at line 116 of file itfile.cpp.
References read_data_header(), and s.
bfstream itpp::it_ifile::s [protected] |
Protected binary file stream.
Definition at line 210 of file itfile.h.
Referenced by itpp::it_file::close(), close(), itpp::it_file::flush(), info(), itpp::it_file::low_level(), low_level(), low_level_read(), low_level_read_hi(), low_level_read_lo(), itpp::it_file::low_level_write(), itpp::it_file::open(), open(), read_check_file_header(), read_data_header(), itpp::it_file::remove(), seek(), itpp::it_file::write_data_header(), itpp::it_file::write_data_header_here(), and itpp::it_file::write_file_header().
char itpp::it_file_base::file_magic = { 'I', 'T', '+', '+' } [static, protected, inherited] |
ACTION: Add documentation.
Definition at line 105 of file itfile.h.
Referenced by read_check_file_header(), and itpp::it_file::write_file_header().
char itpp::it_file_base::file_version = 2 [static, protected, inherited] |
ACTION: Add documentation.
Definition at line 107 of file itfile.h.
Referenced by read_check_file_header(), and itpp::it_file::write_file_header().
Generated on Fri Jun 8 01:07:22 2007 for IT++ by Doxygen 1.5.2