itpp::it_file Class Reference
Base Module » IT++ File Format

The IT++ file format reading and writing class. More...

`#include <itpp/base/itfile.h>`

Inheritance diagram for itpp::it_file:

## Public Types

typedef it_file &(* | it_manip) (it_file &)
| ACTION: Add documentation for this typedef.

## Public Member Functions

| it_file ()
| Default constructor.
| it_file (const std::string &filename, bool trunc=false)
| Constructor that calls open().
virtual | ~it_file ()
| Destructor.
void | open (const std::string &filename, bool trunc=false)
| Open a file for reading and writing.
void | close ()
| Close the file.
void | flush ()
| Flush the data to disk.
bfstream & | low_level ()
| Returns pointer to the underlying `bfstream` used.
void | set_low_precision (bool p=true)
| Set the precision. Low precision means floats, high means doubles.
bool | get_low_precision () const
| Get the precision.
void | set_next_name (const std::string &name, const std::string &description="")
| Set the name and optionally description of the next variable to be saved.
void | write_file_header ()
| Write the header for the `it_file`.
void | write_data_header (const std::string &type, uint64_t size)
| Write the data header for a variable, specifying the type and size of the data to follow.
void | write_data_header (const std::string &type, const std::string &name, uint64_t size, const std::string &description="")
| Write the data header for a variable, specifying the type, name, size and optionally description of the data to follow.
void | low_level_write (char x)
| Write a char value at the current file pointer position.
void | low_level_write (uint64_t x)
| Write an unsigned integer 64-bit value at the current file pointer position.
void | low_level_write (bool x)
| Write a bool value at the current file pointer position.
void | low_level_write (bin x)
| Write a binary value at the current file pointer position.
void | low_level_write (short x)
| Write a short value at the current file pointer position.
void | low_level_write (int x)
| Write an integer value at the current file pointer position.
void | low_level_write (float x)
| Write a float value at the current file pointer position.
void | low_level_write (double x)
| Write a double value at the current file pointer position.
void | low_level_write (const std::complex< float > &x)
| Write a float complex value at the current file pointer position.
void | low_level_write (const std::complex< double > &x)
| Write a double complex value at the current file pointer position.
void | low_level_write (const bvec &v)
| Write a bvec at the current file pointer position.
void | low_level_write (const svec &v)
| Write an svec at the current file pointer position.
void | low_level_write (const ivec &v)
| Write an ivec at the current file pointer position.
void | low_level_write (const vec &v)
| Write a vec at the current file pointer position.
void | low_level_write (const cvec &v)
| Write a cvec at the current file pointer position.
void | low_level_write (const std::string &str)
| Write a string at the current file pointer position.
void | low_level_write (const bmat &m)
| Write a bmat at the current file pointer position.
void | low_level_write (const smat &m)
| Write an smat at the current file pointer position.
void | low_level_write (const imat &m)
| Write an imat at the current file pointer position.
void | low_level_write (const mat &m)
| Write a mat at the current file pointer position.
void | low_level_write (const cmat &m)
| Write a cmat at the current file pointer position.
void | low_level_write (const Array< bin > &v)
| Write a bin Array at the current file pointer position.
void | low_level_write (const Array< short > &v)
| Write a short Array at the current file pointer position.
void | low_level_write (const Array< int > &v)
| Write an integer Array at the current file pointer position.
void | low_level_write (const Array< float > &v)
| Write a float Array at the current file pointer position.
void | low_level_write (const Array< double > &v)
| Write a double Array at the current file pointer position.
void | low_level_write (const Array< std::complex< float > > &v)
| Write a float complex Array at the current file pointer position.
void | low_level_write (const Array< std::complex< double > > &v)
| Write a double complex Array at the current file pointer position.
it_file & | operator<< (it_manip func)
| ACTION: ADD DOCUMENTATION FOR THIS MEMBER !!!!!!!!
void | remove (const std::string &name)
| Removes the variable `name` from the file.
bool | exists (const std::string &name)
| Returns true if the variable `name` exists in the file.
void | pack ()
| Remove slack space from the file.
void | open (const std::string &filename)
| Open an existing file in read-only mode.
bool | read_check_file_header ()
| Read and check the file header. Return true if the header is valid and false otherwise.
void | read_data_header (it_file_base::data_header &h)
| Read data header and return the result in the variable `h`.
void | low_level_read (char &x)
| Read a char value at the current file pointer position.
void | low_level_read (uint64_t &x)
| Read a 64-bit unsigned integer value at the current file pointer position.
void | low_level_read (bool &x)
| Read a bool value at the current file pointer position.
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 (bvec &v)
| Read a vector of binary values at the current file pointer position.
void | low_level_read (svec &v)
| Read a vector of short integer 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 (std::string &str)
| Read a string 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 (smat &m)
| Read a matrix of short integer 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 (Array< bin > &v)
| Read an Array of binary values at the current file pointer position.
void | low_level_read (Array< short > &v)
| Read an Array of short integer 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< float > &v)
| Read an Array of float values at the current file pointer position.
void | low_level_read (Array< std::complex< float > > &v)
| Read an Array of float complex values 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_lo (cvec &v)
| Read a vector of float complex values 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_lo (cmat &m)
| Read a matrix of float complex 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_lo (Array< std::complex< double > > &v)
| Read an Array of float complex 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_hi (cvec &v)
| Read a vector of double complex 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_hi (cmat &m)
| Read a matrix of double complex 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_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, std::string &desc, uint64_t &bytes)
| Get information about the current variable.

## Protected Member Functions

void | remove ()
| Remove the current variable, denoted by `next_name`.
void | write_data_header_here (const data_header &h)
| Write data header `h` at the current file position.
std::string & | next_name ()
| Name to be used for saving the next variable.
std::string & | next_desc ()
| Description to be used for saving the next variable.

## Protected Attributes

bool | low_prec
| Low precision flag. If true, use float type, otherwise double.
bfstream | s
| Protected binary file stream.

## Static Protected Attributes

static char | file_magic [4] = { 'I', 'T', '+', '+' }
| IT++ file marker: "IT++".
static char | file_version = 3
| IT++ file version.

## Detailed Description

The IT++ file format reading and writing class.

Definition at line 245 of file itfile.h.

## Member Typedef Documentation

## it_manip

typedef it_file &(* itpp::it_file::it_manip) (it_file &)

ACTION: Add documentation for this typedef.

Definition at line 249 of file itfile.h.

## Constructor & Destructor Documentation

## it_file() [1/2]

itpp::it_file::it_file | ( |  | ) |

Default constructor.

Definition at line 504 of file itfile.cpp.

References low_prec.

Referenced by operator<<().

## it_file() [2/2]

itpp::it_file::it_file | ( | const std::string & | filename,
|  | bool | trunc = false )

explicit

Constructor that calls open().

If the file does not exist it will be created. If `trunc` is true, the file will be truncated.

Definition at line 506 of file itfile.cpp.

References low_prec, and open().

## ~it_file()

virtual itpp::it_file::~it_file | ( |  | ) |

inline virtual

Destructor.

Definition at line 263 of file itfile.h.

## Member Function Documentation

## open() [1/2]

void itpp::it_file::open | ( | const std::string & | filename,
|  | bool | trunc = false )

Open a file for reading and writing.

If the file does not exist it will be created. If `trunc` is true, the file will be truncated.

Definition at line 512 of file itfile.cpp.

References itpp::exist(), it_assert, it_error, itpp::it_ifile::read_check_file_header(), itpp::it_ifile::s, and write_file_header().

Referenced by it_file(), and itpp::LDPC_Code::save_code().

## close()

void itpp::it_file::close | ( |  | ) |

virtual

Close the file.

Reimplemented from itpp::it_ifile.

Definition at line 530 of file itfile.cpp.

References itpp::it_ifile::s.

Referenced by itpp::it_save_var_as(), itpp::MOG_generic::load(), itpp::BLDPC_Generator::save(), itpp::LDPC_Generator_Systematic::save(), itpp::MOG_generic::save(), and itpp::LDPC_Code::save_code().

## flush()

void itpp::it_file::flush | ( |  | ) |

Flush the data to disk.

Definition at line 535 of file itfile.cpp.

References itpp::it_ifile::s.

Referenced by itpp::flush().

## low_level()

bfstream & itpp::it_file::low_level | ( |  | ) |

inline

Returns pointer to the underlying `bfstream` used.

Definition at line 279 of file itfile.h.

References itpp::it_ifile::s.

## set_low_precision()

void itpp::it_file::set_low_precision | ( | bool | p = true | ) |

inline

Set the precision. Low precision means floats, high means doubles.

Definition at line 282 of file itfile.h.

References low_prec.

## get_low_precision()

bool itpp::it_file::get_low_precision | ( |  | ) | const

inline

Get the precision.

Definition at line 284 of file itfile.h.

References low_prec.

Referenced by low_level_write(), low_level_write(), low_level_write(), low_level_write(), low_level_write(), low_level_write(), itpp::operator<<(), itpp::operator<<(), itpp::operator<<(), itpp::operator<<(), itpp::operator<<(), and itpp::operator<<().

## set_next_name()

void itpp::it_file::set_next_name | ( | const std::string & | name,
|  | const std::string & | description = "" )

inline

Set the name and optionally description of the next variable to be saved.

Definition at line 287 of file itfile.h.

References next_desc(), and next_name().

Referenced by itpp::operator<<().

## write_file_header()

void itpp::it_file::write_file_header | ( |  | ) |

Write the header for the `it_file`.

Definition at line 540 of file itfile.cpp.

References itpp::it_file_base::file_magic, itpp::it_file_base::file_version, and itpp::it_ifile::s.

Referenced by open().

## write_data_header() [1/2]

void itpp::it_file::write_data_header | ( | const std::string & | type,
|  | uint64_t | size )

Write the data header for a variable, specifying the type and size of the data to follow.

Definition at line 546 of file itfile.cpp.

References it_error_if, next_desc(), next_name(), itpp::size(), and write_data_header().

Referenced by itpp::GF2mat::operator<<, itpp::operator<<(), itpp::operator<<(), itpp::operator<<(), itpp::operator<<(), itpp::operator<<(), itpp::operator<<(), itpp::operator<<(), itpp::operator<<(), itpp::operator<<(), itpp::operator<<(), itpp::operator<<(), itpp::operator<<(), itpp::operator<<(), itpp::operator<<(), itpp::operator<<(), itpp::operator<<(), itpp::operator<<(), itpp::operator<<(), itpp::operator<<(), itpp::operator<<(), itpp::operator<<(), itpp::operator<<(), itpp::operator<<(), itpp::operator<<(), itpp::operator<<(), itpp::operator<<(), itpp::operator<<(), itpp::operator<<(), itpp::operator<<(), itpp::operator<<(), itpp::operator<<(), itpp::operator<<(), itpp::operator<<(), itpp::operator<<(), itpp::operator<<(), itpp::operator<<(), itpp::operator<<(), itpp::operator<<(), and write_data_header().

## write_data_header() [2/2]

void itpp::it_file::write_data_header | ( | const std::string & | type,
|  | const std::string & | name,
|  | uint64_t | size,
|  | const std::string & | description = "" )

Write the data header for a variable, specifying the type, name, size and optionally description of the data to follow.

Definition at line 555 of file itfile.cpp.

References itpp::it_file_base::data_header::block_bytes, itpp::it_file_base::data_header::data_bytes, itpp::it_file_base::data_header::desc, exists(), itpp::it_file_base::data_header::hdr_bytes, itpp::it_file_base::data_header::name, itpp::it_ifile::read_data_header(), remove(), itpp::it_ifile::s, itpp::size(), itpp::it_file_base::data_header::type, and write_data_header_here().

## low_level_write() [1/28]

void itpp::it_file::low_level_write | ( | char | x | ) |

Write a char value at the current file pointer position.

Definition at line 716 of file itfile.cpp.

References itpp::it_ifile::s.

Referenced by itpp::GF2mat::operator<<, itpp::operator<<(), itpp::operator<<(), itpp::operator<<(), itpp::operator<<(), itpp::operator<<(), itpp::operator<<(), itpp::operator<<(), itpp::operator<<(), itpp::operator<<(), itpp::operator<<(), itpp::operator<<(), itpp::operator<<(), itpp::operator<<(), itpp::operator<<(), itpp::operator<<(), itpp::operator<<(), itpp::operator<<(), itpp::operator<<(), itpp::operator<<(), itpp::operator<<(), itpp::operator<<(), itpp::operator<<(), itpp::operator<<(), itpp::operator<<(), itpp::operator<<(), itpp::operator<<(), itpp::operator<<(), itpp::operator<<(), itpp::operator<<(), itpp::operator<<(), itpp::operator<<(), itpp::operator<<(), itpp::operator<<(), itpp::operator<<(), itpp::operator<<(), itpp::operator<<(), itpp::operator<<(), and itpp::operator<<().

## low_level_write() [2/28]

void itpp::it_file::low_level_write | ( | uint64_t | x | ) |

Write an unsigned integer 64-bit value at the current file pointer position.

Definition at line 721 of file itfile.cpp.

References itpp::it_ifile::s.

## low_level_write() [3/28]

void itpp::it_file::low_level_write | ( | bool | x | ) |

Write a bool value at the current file pointer position.

Definition at line 726 of file itfile.cpp.

References itpp::it_ifile::s.

## low_level_write() [4/28]

void itpp::it_file::low_level_write | ( | bin | x | ) |

Write a binary value at the current file pointer position.

Definition at line 731 of file itfile.cpp.

References itpp::it_ifile::s, and itpp::bin::value().

## low_level_write() [5/28]

void itpp::it_file::low_level_write | ( | short | x | ) |

Write a short value at the current file pointer position.

Definition at line 736 of file itfile.cpp.

References itpp::it_ifile::s.

## low_level_write() [6/28]

void itpp::it_file::low_level_write | ( | int | x | ) |

Write an integer value at the current file pointer position.

Definition at line 741 of file itfile.cpp.

References itpp::it_ifile::s.

## low_level_write() [7/28]

void itpp::it_file::low_level_write | ( | float | x | ) |

Write a float value at the current file pointer position.

Definition at line 746 of file itfile.cpp.

References itpp::it_ifile::s.

## low_level_write() [8/28]

void itpp::it_file::low_level_write | ( | double | x | ) |

Write a double value at the current file pointer position.

Definition at line 751 of file itfile.cpp.

References itpp::it_ifile::s.

## low_level_write() [9/28]

void itpp::it_file::low_level_write | ( | const std::complex< float > & | x | ) |

Write a float complex value at the current file pointer position.

Definition at line 756 of file itfile.cpp.

References itpp::it_ifile::s.

## low_level_write() [10/28]

void itpp::it_file::low_level_write | ( | const std::complex< double > & | x | ) |

Write a double complex value at the current file pointer position.

Definition at line 762 of file itfile.cpp.

References itpp::it_ifile::s.

## low_level_write() [11/28]

void itpp::it_file::low_level_write | ( | const bvec & | v | ) |

Write a bvec at the current file pointer position.

Definition at line 768 of file itfile.cpp.

References itpp::it_ifile::s.

## low_level_write() [12/28]

void itpp::it_file::low_level_write | ( | const svec & | v | ) |

Write an svec at the current file pointer position.

Definition at line 775 of file itfile.cpp.

References itpp::it_ifile::s.

## low_level_write() [13/28]

void itpp::it_file::low_level_write | ( | const ivec & | v | ) |

Write an ivec at the current file pointer position.

Definition at line 782 of file itfile.cpp.

References itpp::it_ifile::s.

## low_level_write() [14/28]

void itpp::it_file::low_level_write | ( | const vec & | v | ) |

Write a vec at the current file pointer position.

Definition at line 789 of file itfile.cpp.

References get_low_precision(), and itpp::it_ifile::s.

## low_level_write() [15/28]

void itpp::it_file::low_level_write | ( | const cvec & | v | ) |

Write a cvec at the current file pointer position.

Definition at line 802 of file itfile.cpp.

References get_low_precision(), itpp::imag(), itpp::real(), and itpp::it_ifile::s.

## low_level_write() [16/28]

void itpp::it_file::low_level_write | ( | const std::string & | str | ) |

Write a string at the current file pointer position.

Definition at line 819 of file itfile.cpp.

References itpp::it_ifile::s.

## low_level_write() [17/28]

void itpp::it_file::low_level_write | ( | const bmat & | m | ) |

Write a bmat at the current file pointer position.

Definition at line 826 of file itfile.cpp.

References itpp::it_ifile::s.

## low_level_write() [18/28]

void itpp::it_file::low_level_write | ( | const smat & | m | ) |

Write an smat at the current file pointer position.

Definition at line 835 of file itfile.cpp.

References itpp::it_ifile::s.

## low_level_write() [19/28]

void itpp::it_file::low_level_write | ( | const imat & | m | ) |

Write an imat at the current file pointer position.

Definition at line 844 of file itfile.cpp.

References itpp::it_ifile::s.

## low_level_write() [20/28]

void itpp::it_file::low_level_write | ( | const mat & | m | ) |

Write a mat at the current file pointer position.

Definition at line 853 of file itfile.cpp.

References get_low_precision(), and itpp::it_ifile::s.

## low_level_write() [21/28]

void itpp::it_file::low_level_write | ( | const cmat & | m | ) |

Write a cmat at the current file pointer position.

Definition at line 869 of file itfile.cpp.

References get_low_precision(), itpp::imag(), itpp::real(), and itpp::it_ifile::s.

## low_level_write() [22/28]

void itpp::it_file::low_level_write | ( | const Array< bin > & | v | ) |

Write a bin Array at the current file pointer position.

Definition at line 889 of file itfile.cpp.

References itpp::it_ifile::s, and itpp::Array< T >::size().

## low_level_write() [23/28]

void itpp::it_file::low_level_write | ( | const Array< short > & | v | ) |

Write a short Array at the current file pointer position.

Definition at line 896 of file itfile.cpp.

References itpp::it_ifile::s, and itpp::Array< T >::size().

## low_level_write() [24/28]

void itpp::it_file::low_level_write | ( | const Array< int > & | v | ) |

Write an integer Array at the current file pointer position.

Definition at line 903 of file itfile.cpp.

References itpp::it_ifile::s, and itpp::Array< T >::size().

## low_level_write() [25/28]

void itpp::it_file::low_level_write | ( | const Array< float > & | v | ) |

Write a float Array at the current file pointer position.

Definition at line 910 of file itfile.cpp.

References itpp::it_ifile::s, and itpp::Array< T >::size().

## low_level_write() [26/28]

void itpp::it_file::low_level_write | ( | const Array< double > & | v | ) |

Write a double Array at the current file pointer position.

Definition at line 917 of file itfile.cpp.

References get_low_precision(), itpp::it_ifile::s, and itpp::Array< T >::size().

## low_level_write() [27/28]

void itpp::it_file::low_level_write | ( | const Array< std::complex< float > > & | v | ) |

Write a float complex Array at the current file pointer position.

Definition at line 930 of file itfile.cpp.

References itpp::it_ifile::s.

## low_level_write() [28/28]

void itpp::it_file::low_level_write | ( | const Array< std::complex< double > > & | v | ) |

Write a double complex Array at the current file pointer position.

Definition at line 939 of file itfile.cpp.

References get_low_precision(), itpp::imag(), itpp::real(), and itpp::it_ifile::s.

## operator<<()

it_file & itpp::it_file::operator<< | ( | it_manip | func | ) |

inline

ACTION: ADD DOCUMENTATION FOR THIS MEMBER !!!!!!!!

Definition at line 362 of file itfile.h.

References it_file().

## remove() [1/2]

void itpp::it_file::remove | ( | const std::string & | name | ) |

Removes the variable `name` from the file.

Definition at line 621 of file itfile.cpp.

References remove(), and itpp::it_ifile::seek().

## exists()

bool itpp::it_file::exists | ( | const std::string & | name | ) |

Returns true if the variable `name` exists in the file.

Definition at line 644 of file itfile.cpp.

References itpp::it_ifile::seek().

Referenced by itpp::MOG_generic::load(), and write_data_header().

## pack()

void itpp::it_file::pack | ( |  | ) |

Remove slack space from the file.

Definition at line 649 of file itfile.cpp.

References itpp::it_file_base::data_header::block_bytes, itpp::it_file_base::data_header::data_bytes, itpp::it_file_base::data_header::hdr_bytes, it_assert, itpp::it_ifile::read_data_header(), itpp::it_ifile::s, itpp::size(), itpp::it_file_base::data_header::type, and write_data_header_here().

## remove() [2/2]

void itpp::it_file::remove | ( |  | ) |

protected

Remove the current variable, denoted by `next_name`.

Definition at line 627 of file itfile.cpp.

References itpp::it_file_base::data_header::block_bytes, itpp::it_file_base::data_header::data_bytes, itpp::it_file_base::data_header::desc, itpp::it_file_base::data_header::hdr_bytes, itpp::it_file_base::data_header::name, itpp::it_ifile::read_data_header(), itpp::it_ifile::s, itpp::it_file_base::data_header::type, and write_data_header_here().

Referenced by remove(), and write_data_header().

## write_data_header_here()

void itpp::it_file::write_data_header_here | ( | const data_header & | h | ) |

protected

Write data header `h` at the current file position.

Definition at line 615 of file itfile.cpp.

References itpp::it_file_base::data_header::block_bytes, itpp::it_file_base::data_header::data_bytes, itpp::it_file_base::data_header::desc, itpp::it_file_base::data_header::hdr_bytes, itpp::it_file_base::data_header::name, itpp::it_ifile::s, and itpp::it_file_base::data_header::type.

Referenced by pack(), remove(), and write_data_header().

## next_name()

std::string & itpp::it_file::next_name | ( |  | ) |

inline protected

Name to be used for saving the next variable.

Definition at line 380 of file itfile.h.

Referenced by set_next_name(), and write_data_header().

## next_desc()

std::string & itpp::it_file::next_desc | ( |  | ) |

inline protected

Description to be used for saving the next variable.

Definition at line 382 of file itfile.h.

Referenced by set_next_name(), and write_data_header().

## open() [2/2]

void itpp::it_ifile::open | ( | const std::string & | filename | ) |

inherited

Open an existing file in read-only mode.

Definition at line 50 of file itfile.cpp.

References itpp::exist(), it_assert, it_error, read_check_file_header(), and s.

Referenced by it_ifile().

## read_check_file_header()

bool itpp::it_ifile::read_check_file_header | ( |  | ) |

inherited

Read and check the file header. Return true if the header is valid and false otherwise.

Definition at line 126 of file itfile.cpp.

References itpp::it_file_base::file_magic, itpp::it_file_base::file_version, itpp::it_file_base::file_header::magic, s, and itpp::it_file_base::file_header::version.

Referenced by itpp::it_file::open(), and open().

## read_data_header()

void itpp::it_ifile::read_data_header | ( | it_file_base::data_header & | h | ) |

inherited

Read data header and return the result in the variable `h`.

Definition at line 134 of file itfile.cpp.

References itpp::it_file_base::data_header::block_bytes, itpp::it_file_base::data_header::data_bytes, itpp::it_file_base::data_header::desc, itpp::it_file_base::data_header::hdr_bytes, itpp::it_file_base::data_header::name, s, and itpp::it_file_base::data_header::type.

Referenced by info(), itpp::GF2mat::operator>>, itpp::operator>>(), itpp::operator>>(), itpp::operator>>(), itpp::operator>>(), itpp::operator>>(), itpp::operator>>(), itpp::operator>>(), itpp::operator>>(), itpp::operator>>(), itpp::operator>>(), itpp::operator>>(), itpp::operator>>(), itpp::operator>>(), itpp::operator>>(), itpp::operator>>(), itpp::operator>>(), itpp::operator>>(), itpp::operator>>(), itpp::operator>>(), itpp::operator>>(), itpp::operator>>(), itpp::operator>>(), itpp::operator>>(), itpp::operator>>(), itpp::operator>>(), itpp::operator>>(), itpp::operator>>(), itpp::operator>>(), itpp::operator>>(), itpp::operator>>(), itpp::operator>>(), itpp::operator>>(), itpp::operator>>(), itpp::operator>>(), itpp::operator>>(), itpp::operator>>(), itpp::operator>>(), itpp::operator>>(), itpp::it_file::pack(), itpp::it_file::remove(), seek(), seek(), and itpp::it_file::write_data_header().

## low_level_read() [1/22]

void itpp::it_ifile::low_level_read | ( | char & | x | ) |

inherited

Read a char value at the current file pointer position.

Definition at line 145 of file itfile.cpp.

References s.

Referenced by itpp::GF2mat::operator>>, itpp::operator>>(), itpp::operator>>(), itpp::operator>>(), itpp::operator>>(), itpp::operator>>(), itpp::operator>>(), itpp::operator>>(), itpp::operator>>(), itpp::operator>>(), itpp::operator>>(), itpp::operator>>(), itpp::operator>>(), itpp::operator>>(), itpp::operator>>(), itpp::operator>>(), itpp::operator>>(), itpp::operator>>(), itpp::operator>>(), itpp::operator>>(), itpp::operator>>(), itpp::operator>>(), itpp::operator>>(), itpp::operator>>(), itpp::operator>>(), itpp::operator>>(), itpp::operator>>(), itpp::operator>>(), itpp::operator>>(), itpp::operator>>(), itpp::operator>>(), itpp::operator>>(), and itpp::operator>>().

## low_level_read() [2/22]

void itpp::it_ifile::low_level_read | ( | uint64_t & | x | ) |

inherited

Read a 64-bit unsigned integer value at the current file pointer position.

Definition at line 150 of file itfile.cpp.

References s.

## low_level_read() [3/22]

void itpp::it_ifile::low_level_read | ( | bool & | x | ) |

inherited

Read a bool value at the current file pointer position.

Definition at line 155 of file itfile.cpp.

References s.

## low_level_read() [4/22]

void itpp::it_ifile::low_level_read | ( | bin & | x | ) |

inherited

Read a binary value at the current file pointer position.

Definition at line 163 of file itfile.cpp.

References s.

## low_level_read() [5/22]

void itpp::it_ifile::low_level_read | ( | short & | x | ) |

inherited

Read a short value at the current file pointer position.

Definition at line 170 of file itfile.cpp.

References s.

## low_level_read() [6/22]

void itpp::it_ifile::low_level_read | ( | int & | x | ) |

inherited

Read an integer value at the current file pointer position.

Definition at line 177 of file itfile.cpp.

References s.

## low_level_read() [7/22]

void itpp::it_ifile::low_level_read | ( | float & | x | ) |

inherited

Read a float value at the current file pointer position.

Definition at line 184 of file itfile.cpp.

References s.

## low_level_read() [8/22]

void itpp::it_ifile::low_level_read | ( | double & | x | ) |

inherited

Read a double value at the current file pointer position.

Definition at line 189 of file itfile.cpp.

References s.

## low_level_read() [9/22]

void itpp::it_ifile::low_level_read | ( | std::complex< float > & | x | ) |

inherited

Read a float complex value at the current file pointer position.

Definition at line 194 of file itfile.cpp.

References s.

## low_level_read() [10/22]

void itpp::it_ifile::low_level_read | ( | std::complex< double > & | x | ) |

inherited

Read a double complex value at the current file pointer position.

Definition at line 202 of file itfile.cpp.

References s.

## low_level_read() [11/22]

void itpp::it_ifile::low_level_read | ( | bvec & | v | ) |

inherited

Read a vector of binary values at the current file pointer position.

Definition at line 210 of file itfile.cpp.

References s, and itpp::size().

## low_level_read() [12/22]

void itpp::it_ifile::low_level_read | ( | svec & | v | ) |

inherited

Read a vector of short integer values at the current file pointer position.

Definition at line 222 of file itfile.cpp.

References s, and itpp::size().

## low_level_read() [13/22]

void itpp::it_ifile::low_level_read | ( | ivec & | v | ) |

inherited

Read a vector of integer values at the current file pointer position.

Definition at line 234 of file itfile.cpp.

References s, and itpp::size().

## low_level_read() [14/22]

void itpp::it_ifile::low_level_read | ( | std::string & | str | ) |

inherited

Read a string at the current file pointer position.

Definition at line 293 of file itfile.cpp.

References s, and itpp::size().

## low_level_read() [15/22]

void itpp::it_ifile::low_level_read | ( | bmat & | m | ) |

inherited

Read a matrix of binary values at the current file pointer position.

Definition at line 303 of file itfile.cpp.

References s.

## low_level_read() [16/22]

void itpp::it_ifile::low_level_read | ( | smat & | m | ) |

inherited

Read a matrix of short integer values at the current file pointer position.

Definition at line 317 of file itfile.cpp.

References s.

## low_level_read() [17/22]

void itpp::it_ifile::low_level_read | ( | imat & | m | ) |

inherited

Read a matrix of integer values at the current file pointer position.

Definition at line 330 of file itfile.cpp.

References s.

## low_level_read() [18/22]

void itpp::it_ifile::low_level_read | ( | Array< bin > & | v | ) |

inherited

Read an Array of binary values at the current file pointer position.

Definition at line 394 of file itfile.cpp.

References s, itpp::Array< T >::set_size(), itpp::Array< T >::size(), and itpp::size().

## low_level_read() [19/22]

void itpp::it_ifile::low_level_read | ( | Array< short > & | v | ) |

inherited

Read an Array of short integer values at the current file pointer position.

Definition at line 406 of file itfile.cpp.

References s, itpp::Array< T >::set_size(), itpp::Array< T >::size(), and itpp::size().

## low_level_read() [20/22]

void itpp::it_ifile::low_level_read | ( | Array< int > & | v | ) |

inherited

Read an Array of integer values at the current file pointer position.

Definition at line 418 of file itfile.cpp.

References s, itpp::Array< T >::set_size(), itpp::Array< T >::size(), and itpp::size().

## low_level_read() [21/22]

void itpp::it_ifile::low_level_read | ( | Array< float > & | v | ) |

inherited

Read an Array of float values at the current file pointer position.

Definition at line 430 of file itfile.cpp.

References s, itpp::Array< T >::set_size(), itpp::Array< T >::size(), and itpp::size().

## low_level_read() [22/22]

void itpp::it_ifile::low_level_read | ( | Array< std::complex< float > > & | v | ) |

inherited

Read an Array of float complex values at the current file pointer position.

Definition at line 460 of file itfile.cpp.

References s, and itpp::size().

## low_level_read_lo() [1/6]

void itpp::it_ifile::low_level_read_lo | ( | vec & | v | ) |

inherited

Read a vector of float values at the current file pointer position.

Definition at line 246 of file itfile.cpp.

References s, and itpp::size().

Referenced by itpp::operator>>(), itpp::operator>>(), itpp::operator>>(), itpp::operator>>(), itpp::operator>>(), and itpp::operator>>().

## low_level_read_lo() [2/6]

void itpp::it_ifile::low_level_read_lo | ( | cvec & | v | ) |

inherited

Read a vector of float complex values at the current file pointer position.

Definition at line 267 of file itfile.cpp.

References s, and itpp::size().

## low_level_read_lo() [3/6]

void itpp::it_ifile::low_level_read_lo | ( | mat & | m | ) |

inherited

Read a matrix of float values at the current file pointer position.

Definition at line 343 of file itfile.cpp.

References s.

## low_level_read_lo() [4/6]

void itpp::it_ifile::low_level_read_lo | ( | cmat & | m | ) |

inherited

Read a matrix of float complex values at the current file pointer position.

Definition at line 366 of file itfile.cpp.

References s.

## low_level_read_lo() [5/6]

void itpp::it_ifile::low_level_read_lo | ( | Array< double > & | v | ) |

inherited

Read an Array of float values at the current file pointer position.

Definition at line 439 of file itfile.cpp.

References s, itpp::Array< T >::set_size(), itpp::Array< T >::size(), and itpp::size().

## low_level_read_lo() [6/6]

void itpp::it_ifile::low_level_read_lo | ( | Array< std::complex< double > > & | v | ) |

inherited

Read an Array of float complex values at the current file pointer position.

Definition at line 473 of file itfile.cpp.

References s, and itpp::size().

## low_level_read_hi() [1/6]

void itpp::it_ifile::low_level_read_hi | ( | vec & | v | ) |

inherited

Read a vector of double values at the current file pointer position.

Definition at line 258 of file itfile.cpp.

References s, and itpp::size().

Referenced by itpp::operator>>(), itpp::operator>>(), itpp::operator>>(), itpp::operator>>(), itpp::operator>>(), itpp::operator>>(), itpp::operator>>(), itpp::operator>>(), itpp::operator>>(), and itpp::operator>>().

## low_level_read_hi() [2/6]

void itpp::it_ifile::low_level_read_hi | ( | cvec & | v | ) |

inherited

Read a vector of double complex values at the current file pointer position.

Definition at line 280 of file itfile.cpp.

References s, and itpp::size().

## low_level_read_hi() [3/6]

void itpp::it_ifile::low_level_read_hi | ( | mat & | m | ) |

inherited

Read a matrix of double values at the current file pointer position.

Definition at line 356 of file itfile.cpp.

References s.

## low_level_read_hi() [4/6]

void itpp::it_ifile::low_level_read_hi | ( | cmat & | m | ) |

inherited

Read a matrix of double complex values at the current file pointer position.

Definition at line 380 of file itfile.cpp.

References s.

## low_level_read_hi() [5/6]

void itpp::it_ifile::low_level_read_hi | ( | Array< double > & | v | ) |

inherited

Read an Array of double values at the current file pointer position.

Definition at line 451 of file itfile.cpp.

References s, itpp::Array< T >::set_size(), itpp::Array< T >::size(), and itpp::size().

## low_level_read_hi() [6/6]

void itpp::it_ifile::low_level_read_hi | ( | Array< std::complex< double > > & | v | ) |

inherited

Read an Array of double complex values at the current file pointer position.

Definition at line 486 of file itfile.cpp.

References s, and itpp::size().

## seek() [1/2]

bool itpp::it_ifile::seek | ( | const std::string & | name | ) |

inherited

Find the variable `name`.

Definition at line 65 of file itfile.cpp.

References itpp::it_file_base::data_header::block_bytes, itpp::it_file_base::data_header::name, read_data_header(), s, and itpp::it_file_base::data_header::type.

Referenced by itpp::it_file::exists(), itpp::it_load_var_as(), itpp::operator>>(), and itpp::it_file::remove().

## seek() [2/2]

bool itpp::it_ifile::seek | ( | int | n | ) |

inherited

Find the variable number `n`.

Definition at line 90 of file itfile.cpp.

References itpp::it_file_base::data_header::block_bytes, read_data_header(), s, and itpp::it_file_base::data_header::type.

## info()

void itpp::it_ifile::info | ( | std::string & | name,
|  | std::string & | type,
|  | std::string & | desc,
|  | uint64_t & | bytes )

inherited

Get information about the current variable.

Definition at line 111 of file itfile.cpp.

References itpp::it_file_base::data_header::data_bytes, itpp::it_file_base::data_header::desc, itpp::it_file_base::data_header::name, read_data_header(), s, and itpp::it_file_base::data_header::type.

## Member Data Documentation

## low_prec

bool itpp::it_file::low_prec

protected

Low precision flag. If true, use float type, otherwise double.

Definition at line 378 of file itfile.h.

Referenced by get_low_precision(), it_file(), it_file(), and set_low_precision().

## s

bfstream itpp::it_ifile::s

protected inherited

Protected binary file stream.

Definition at line 237 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(), low_level_read(), low_level_read(), low_level_read(), low_level_read(), low_level_read(), low_level_read(), low_level_read(), low_level_read(), low_level_read(), low_level_read(), low_level_read(), low_level_read(), low_level_read(), low_level_read(), low_level_read(), low_level_read(), low_level_read(), low_level_read(), low_level_read(), low_level_read(), low_level_read_hi(), low_level_read_hi(), low_level_read_hi(), low_level_read_hi(), low_level_read_hi(), low_level_read_hi(), low_level_read_lo(), low_level_read_lo(), low_level_read_lo(), low_level_read_lo(), low_level_read_lo(), low_level_read_lo(), itpp::it_file::low_level_write(), itpp::it_file::low_level_write(), itpp::it_file::low_level_write(), itpp::it_file::low_level_write(), itpp::it_file::low_level_write(), itpp::it_file::low_level_write(), itpp::it_file::low_level_write(), itpp::it_file::low_level_write(), itpp::it_file::low_level_write(), itpp::it_file::low_level_write(), itpp::it_file::low_level_write(), itpp::it_file::low_level_write(), itpp::it_file::low_level_write(), itpp::it_file::low_level_write(), itpp::it_file::low_level_write(), itpp::it_file::low_level_write(), itpp::it_file::low_level_write(), itpp::it_file::low_level_write(), itpp::it_file::low_level_write(), itpp::it_file::low_level_write(), itpp::it_file::low_level_write(), itpp::it_file::low_level_write(), itpp::it_file::low_level_write(), itpp::it_file::low_level_write(), itpp::it_file::low_level_write(), itpp::it_file::low_level_write(), itpp::it_file::low_level_write(), itpp::it_file::low_level_write(), itpp::it_file::open(), open(), itpp::it_file::pack(), read_check_file_header(), read_data_header(), itpp::it_file::remove(), seek(), seek(), itpp::it_file::write_data_header(), itpp::it_file::write_data_header_here(), and itpp::it_file::write_file_header().

## file_magic

char itpp::it_file_base::file_magic = { 'I', 'T', '+', '+' }

static protected inherited

IT++ file marker: "IT++".

Definition at line 122 of file itfile.h.

Referenced by itpp::it_ifile::read_check_file_header(), and itpp::it_file::write_file_header().

## file_version

char itpp::it_file_base::file_version = 3

static protected inherited

IT++ file version.

Definition at line 124 of file itfile.h.

Referenced by itpp::it_ifile::read_check_file_header(), and itpp::it_file::write_file_header().

The documentation for this class was generated from the following files:

- itpp/base/itfile.h
- itpp/base/itfile.cpp

Generated on for IT++ by Doxygen 1.15.0