1 #ifndef MATIOCPP_FILE_H
2 #define MATIOCPP_FILE_H
29 inline const input &getVariable(
const input& it);
37 template<
class key,
class input>
181 template <
class iterator>
matioCpp::FileVersion version() const
The MAT file version.
void close()
Close the file.
static bool Exists(const std::string &name)
Check if file exists and can be opened.
matioCpp::FileMode mode() const
The mode with which the file has been opened.
bool isOpen() const
Check if the file is open.
void operator=(const File &other)=delete
Deleted copy assignment, to avoid confusion on whether the content has been copied or not.
bool open(const std::string &name, matioCpp::FileMode mode=matioCpp::FileMode::ReadAndWrite)
Open the specified file.
std::string header() const
The file header.
std::vector< std::string > variableNames() const
Get the list of variables in the file.
File()
Default Constructor.
static bool Delete(const std::string &name)
Delete the specified file.
std::string name() const
The file name.
matioCpp::Variable read(const std::string &name) const
Read a variable given the name.
static File Create(const std::string &name, matioCpp::FileVersion version=matioCpp::FileVersion::Default, const std::string &header="")
Create a new file (static)
bool write(const Variable &variable, matioCpp::Compression compression=matioCpp::Compression::None)
Write a Variable to a file.
File(const File &other)=delete
Deleted copy constructor, to avoid confusion on whether the content has been copied or not.
The matioCpp::Variable class is the equivalent of matvar_t in matio.
FileVersion
The supported file versions.
FileMode
The available modes with which a file can be opened.
Compression
Compression type when writing to a file.