MeteoIODoc  2.10.0
libMatioWrapper.h
Go to the documentation of this file.
1 // SPDX-License-Identifier: LGPL-3.0-or-later
2 /***********************************************************************************/
3 /* Copyright 2016 WSL Institute for Snow and Avalanche Research SLF-DAVOS */
4 /***********************************************************************************/
5 /* This file is part of MeteoIO.
6  MeteoIO is free software: you can redistribute it and/or modify
7  it under the terms of the GNU Lesser General Public License as published by
8  the Free Software Foundation, either version 3 of the License, or
9  (at your option) any later version.
10 
11  MeteoIO is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU Lesser General Public License for more details.
15 
16  You should have received a copy of the GNU Lesser General Public License
17  along with MeteoIO. If not, see <http://www.gnu.org/licenses/>.
18 */
19 #ifndef LIBMATIOWRAPPER_H
20 #define LIBMATIOWRAPPER_H
21 
23 
24 #include <matio.h>
25 #include <string>
26 
27 namespace matWrap {
28  void listFields(matvar_t *matvar);
29  void printStructure(matvar_t *matvar);
30  std::string readString(const std::string &filename, const std::string &fieldname, mat_t *matfp, matvar_t *matvar);
31  double readDouble(const std::string &filename, const std::string &fieldname, mat_t *matfp, matvar_t *matvar);
32  std::vector<std::string> readStringVector(const std::string &filename, const std::string &fieldname, mat_t *matfp, matvar_t *matvar);
33  std::vector<double> readDoubleVector(const std::string &filename, const std::string &fieldname, mat_t *matfp, matvar_t *matvar);
34  void readDoubleArray(const std::string &filename, const std::string &fieldname, mat_t *matfp, matvar_t *matvar, mio::Array2D<double> &array);
35  void printFileStructure(const std::string& filename, const double& TZ);
36 } //namespace
37 
38 #endif
Definition: libMatioWrapper.cc:25
void listFields(matvar_t *matvar)
Definition: libMatioWrapper.cc:31
void printStructure(matvar_t *matvar)
Definition: libMatioWrapper.cc:39
std::vector< double > readDoubleVector(const std::string &filename, const std::string &fieldname, mat_t *matfp, matvar_t *matvar)
Definition: libMatioWrapper.cc:117
double readDouble(const std::string &filename, const std::string &fieldname, mat_t *matfp, matvar_t *matvar)
Definition: libMatioWrapper.cc:60
std::vector< std::string > readStringVector(const std::string &filename, const std::string &fieldname, mat_t *matfp, matvar_t *matvar)
Definition: libMatioWrapper.cc:83
void readDoubleArray(const std::string &filename, const std::string &fieldname, mat_t *matfp, matvar_t *matvar, mio::Array2D< double > &array)
Definition: libMatioWrapper.cc:145
std::string readString(const std::string &filename, const std::string &fieldname, mat_t *matfp, matvar_t *matvar)
Definition: libMatioWrapper.cc:49
void printFileStructure(const std::string &filename, const double &TZ)
Definition: libMatioWrapper.cc:177