Opens and reads a MATfile. More...
#include <InputDevice.hh>

Public Member Functions | |
| std::vector< MatrixInfo >::iterator | begin () |
| Begin iterator. | |
| std::vector< MatrixInfo > ::const_iterator | begin () const |
| Begin iterator (const version). | |
| std::string | description () const |
| Descriptive text. | |
| std::vector< MatrixInfo >::iterator | end () |
| End iterator. | |
| std::vector< MatrixInfo > ::const_iterator | end () const |
| End iterator (const version). | |
| std::vector< MatrixInfo > ::const_iterator | find (const std::string) const |
| const std::vector< MatrixInfo > & | info () const |
| Summary of contents. | |
| template<typename charT > | |
| InputDevice (const std::basic_string< charT > &filename) | |
| Constructor. | |
| template<typename charT > | |
| InputDevice (const charT *filename) | |
| Constructor. | |
| bool | inverse_endian () const |
| Endian indicator. | |
| MatrixInfo | operator[] (const std::string) const |
| template<class WrapperClass > | |
| void | readArray (const std::string &name, WrapperClass &wrapper) |
| Read a matrix from the file. | |
| std::string | subsystem () const |
| Subsystem data offset. | |
| miINT16_t | version () const |
| Version. | |
Private Member Functions | |
| void | extract_header (std::istream &) |
| void | extract_info (std::istream &) |
Private Attributes | |
| std::vector< MatrixInfo > | data_ |
| std::string | description_ |
| std::string | filename_ |
| bool | inverse_endian_ |
| std::string | subsystem_ |
| miINT16_t | version_ |
Opens and reads a MATfile.
This class provides read access support for MATfiles and allows input operation.
Definition at line 76 of file InputDevice.hh.
| InputDevice::InputDevice | ( | const std::basic_string< charT > & | filename | ) |
Constructor.
Opens a file, reads the header, decompress the data (if needed) and searches the file for matrices and matrix names, but does not perform any construction of matrices.
Definition at line 231 of file InputDevice.hh.

| InputDevice::InputDevice | ( | const charT * | filename | ) |
Constructor.
This is an overloaded constructed, provided for convenience.
Definition at line 255 of file InputDevice.hh.

| std::vector<MatrixInfo>::iterator InputDevice::begin | ( | ) | [inline] |
Begin iterator.
Returns the iterator to the begin of the information vector.
Definition at line 155 of file InputDevice.hh.
| std::vector<MatrixInfo>::const_iterator InputDevice::begin | ( | ) | const [inline] |
Begin iterator (const version).
Returns the constant iterator to the begin of the information vector.
Definition at line 164 of file InputDevice.hh.
| std::string InputDevice::description | ( | ) | const [inline] |
Descriptive text.
Returns the descriptive text of the MATfile, i.e. the firsts (human-readable) 116 bytes.
Definition at line 104 of file InputDevice.hh.
| std::vector<MatrixInfo>::iterator InputDevice::end | ( | ) | [inline] |
End iterator.
Returns the iterator to the end of the information vector.
Definition at line 173 of file InputDevice.hh.
| std::vector<MatrixInfo>::const_iterator InputDevice::end | ( | ) | const [inline] |
End iterator (const version).
Returns the constant iterator to the end of the information vector.
Definition at line 182 of file InputDevice.hh.
| void InputDevice::extract_header | ( | std::istream & | fs | ) | [private] |
Definition at line 279 of file InputDevice.hh.
| void InputDevice::extract_info | ( | std::istream & | fs | ) | [private] |
Definition at line 308 of file InputDevice.hh.
| std::vector< MatrixInfo >::const_iterator InputDevice::find | ( | const std::string | matrixName | ) | const |
| const std::vector<MatrixInfo>& InputDevice::info | ( | ) | const [inline] |
Summary of contents.
Returns a vector containing informations on the matrices.
Definition at line 138 of file InputDevice.hh.
| bool InputDevice::inverse_endian | ( | ) | const [inline] |
Endian indicator.
Returns true if the given MATfile has been written by a system with inverted endianness.
Definition at line 131 of file InputDevice.hh.
| MatrixInfo InputDevice::operator[] | ( | const std::string | matrixName | ) | const |
| void InputDevice::readArray | ( | const std::string & | name, |
| WrapperClass & | wrapper | ||
| ) | [inline] |
Read a matrix from the file.
This method reads the matrix with the given name into the wrapper.
Definition at line 193 of file InputDevice.hh.

| std::string InputDevice::subsystem | ( | ) | const [inline] |
Subsystem data offset.
Returns the 8 byte regarding the subsystem-specific data, which are stored on bytes 117-124 of each MATfile.
Definition at line 112 of file InputDevice.hh.
| miINT16_t InputDevice::version | ( | ) | const [inline] |
Version.
Returns the value of the version field, which is stored on the bytes 125-126 of each MATfile.
Definition at line 120 of file InputDevice.hh.
std::vector<MatrixInfo> InputDevice::data_ [private] |
Definition at line 220 of file InputDevice.hh.
std::string InputDevice::description_ [private] |
Definition at line 215 of file InputDevice.hh.
std::string InputDevice::filename_ [private] |
Definition at line 213 of file InputDevice.hh.
bool InputDevice::inverse_endian_ [private] |
Definition at line 218 of file InputDevice.hh.
std::string InputDevice::subsystem_ [private] |
Definition at line 216 of file InputDevice.hh.
miINT16_t InputDevice::version_ [private] |
Definition at line 217 of file InputDevice.hh.