PageRenderTime 25ms CodeModel.GetById 15ms RepoModel.GetById 0ms app.codeStats 0ms

/src/wrapper/reader_wrapper.h

https://bitbucket.org/fbriol/lagrangian
C Header | 94 lines | 43 code | 29 blank | 22 comment | 0 complexity | e8d15c05140ab182aeabdc7e6985ea3c MD5 | raw file
Possible License(s): GPL-3.0
  1. /*
  2. This file is part of lagrangian library.
  3. lagrangian is free software: you can redistribute it and/or modify
  4. it under the terms of the GNU General Public License as published by
  5. the Free Software Foundation, either version 3 of the License, or
  6. (at your option) any later version.
  7. lagrangian is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. GNU General Public License for more details.
  11. You should have received a copy of the GNU General Public License
  12. along with lagrangian. If not, see <http://www.gnu.org/licenses/>.
  13. */
  14. #pragma once
  15. // ___________________________________________________________________________//
  16. #include <boost/python.hpp>
  17. // ___________________________________________________________________________//
  18. #include "reader.hpp"
  19. #include "axis.hpp"
  20. #include "netcdf_reader.hpp"
  21. // ___________________________________________________________________________//
  22. namespace bp = boost::python;
  23. namespace wrapper
  24. {
  25. // ___________________________________________________________________________//
  26. struct Reader: lagrangian::Reader, bp::wrapper<lagrangian::Reader>
  27. {
  28. Reader();
  29. virtual lagrangian::JulianDay GetJulianDay(std::string const &name) const;
  30. virtual double Interpolate(const double longitude,
  31. double const latitude,
  32. double const fill_value=0,
  33. lagrangian::CellProperties& cell=lagrangian::CellProperties::NONE()) const;
  34. virtual void Load(::std::string const & name, ::std::string const & unit);
  35. virtual void Open(::std::string const & filename);
  36. };
  37. // ___________________________________________________________________________//
  38. struct Netcdf: lagrangian::reader::Netcdf, bp::wrapper<
  39. lagrangian::reader::Netcdf>
  40. {
  41. Netcdf(lagrangian::reader::Netcdf const & arg);
  42. Netcdf();
  43. virtual lagrangian::JulianDay GetJulianDay(std::string const & name) const;
  44. lagrangian::JulianDay WrapperGetJulianDay(std::string const & name) const;
  45. double Interpolate(double const longitude,
  46. double const latitude,
  47. double const fill_value=0,
  48. lagrangian::CellProperties& cell=lagrangian::CellProperties::NONE()) const;
  49. double WrapperInterpolate(double const longitude,
  50. double const latitude,
  51. double const fill_value=0,
  52. lagrangian::CellProperties& cell=lagrangian::CellProperties::NONE()) const;
  53. virtual void Load(std::string const & varname,
  54. std::string const & unit = "");
  55. void WrapperLoad(std::string const & varname,
  56. std::string const & unit = "");
  57. virtual void Open(std::string const & filename);
  58. void WrapperOpen(std::string const & filename);
  59. };
  60. // ___________________________________________________________________________//
  61. void ReaderPythonModule();
  62. }