WSL/SLF GitLab Repository

Commit c84d4bbd authored by Mathias Bavay's avatar Mathias Bavay
Browse files

some white spaces clean up and tagging as well as proper definitions for the...

some white spaces clean up and tagging as well as proper definitions for the upcoming visibility markup
parent 8eddac38
/***********************************************************************************/
/* Copyright 2012 WSL Institute for Snow and Avalanche Research SLF-DAVOS */
/***********************************************************************************/
/* This file is part of MeteoIO.
MeteoIO is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
MeteoIO is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with MeteoIO. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __EXPORTS_H__
#define __EXPORTS_H__
// Generic helper definitions for shared library support
#if defined _WIN32 || defined __CYGWIN__
#define MIO_HELPER_DLL_IMPORT __declspec(dllimport)
#define MIO_HELPER_DLL_EXPORT __declspec(dllexport)
#define MIO_HELPER_DLL_LOCAL
#else
#if defined __clang__ || __GNUC__ >= 4
#define MIO_HELPER_DLL_IMPORT __attribute__ ((visibility ("default")))
#define MIO_HELPER_DLL_EXPORT __attribute__ ((visibility ("default")))
#define MIO_HELPER_DLL_LOCAL __attribute__ ((visibility ("hidden")))
#else
#define MIO_HELPER_DLL_IMPORT
#define MIO_HELPER_DLL_EXPORT
#define MIO_HELPER_DLL_LOCAL
#endif
#endif
// Now we use the generic helper definitions above to define
// MIO_API (for public API symbols) and MIO_LOCAL (non-api symbols)
#ifdef MIO_DLL //dynamic compile
#ifdef MIO_DLL_EXPORTS //building as a dll
#define MIO_API MIO_HELPER_DLL_EXPORT
#else
#define MIO_API MIO_HELPER_DLL_IMPORT
#endif
#define MIO_LOCAL MIO_HELPER_DLL_LOCAL
#else //static compile
#define MIO_API
#define MIO_LOCAL
#endif
#endif
......@@ -52,7 +52,7 @@ class SunObject {
void setLatLon(const double& i_latitude, const double& i_longitude, const double& i_altitude);
void setElevationThresh(const double& i_elevation_threshold);
void calculateRadiation(const double& ta, const double& rh, const double& pressure, const double& mean_albedo);
void calculateRadiation(const double& ta, const double& rh, const double& pressure, const double& mean_albedo); //HACK handle cloudy atmosphere?
void calculateRadiation(const double& ta, const double& rh, const double& mean_albedo);
void getBeamRadiation(double& R_toa, double& R_direct, double& R_diffuse) const;
void getHorizontalRadiation(double& R_toa, double& R_direct, double& R_diffuse) const;
......
......@@ -45,7 +45,6 @@ class A3DIO : public IOInterface {
virtual void readDEM(DEMObject& dem_out);
virtual void readLanduse(Grid2DObject& landuse_out);
virtual void readAssimilationData(const Date&, Grid2DObject& da_out);
virtual void readStationData(const Date& date, std::vector<StationData>& vecStation);
......@@ -56,6 +55,7 @@ class A3DIO : public IOInterface {
virtual void writeMeteoData(const std::vector< std::vector<MeteoData> >& vecMeteo,
const std::string& name="");
virtual void readAssimilationData(const Date&, Grid2DObject& da_out);
virtual void readSpecialPoints(std::vector<Coords>& pts);
virtual void write2DGrid(const Grid2DObject& grid_in, const std::string& name);
......
......@@ -72,7 +72,7 @@ class ARPSIO : public IOInterface {
virtual void write2DGrid(const Grid2DObject& grid_in, const std::string& filename);
virtual void write2DGrid(const Grid2DObject& grid_in, const MeteoGrids::Parameters& parameter, const Date& date);
void read3DGrid(Grid3DObject& grid_out, const std::string& in_name);
void read3DGrid(Grid3DObject& grid_out, const std::string& in_name); //HACK
private:
void setOptions();
......
......@@ -17,9 +17,9 @@
*/
#ifndef __GSNIO_H__
#define __GSNIO_H__
#include <math.h>
#define _isnan isnan
#include <math.h>
#define _isnan isnan
#include "gsn/soapGSNWebServiceSoap12BindingProxy.h"
#include "gsn/GSNWebServiceSoap12Binding.nsmap"
......@@ -61,18 +61,20 @@ class GSNIO : public IOInterface {
GSNIO(const Config&);
~GSNIO() throw();
virtual void read2DGrid(Grid2DObject& dem_out, const std::string& parameter="");
virtual void read2DGrid(Grid2DObject& grid_out, const MeteoGrids::Parameters& parameter, const Date& date);
virtual void readDEM(DEMObject& dem_out);
virtual void readLanduse(Grid2DObject& landuse_out);
virtual void readStationData(const Date& date, std::vector<StationData>& vecStation);
virtual void readMeteoData(const Date& dateStart, const Date& dateEnd,
std::vector< std::vector<MeteoData> >& vecMeteo,
const size_t& stationindex=IOUtils::npos);
std::vector< std::vector<MeteoData> >& vecMeteo,
const size_t& stationindex=IOUtils::npos);
virtual void writeMeteoData(const std::vector< std::vector<MeteoData> >& vecMeteo,
const std::string& name="");
const std::string& name="");
virtual void read2DGrid(Grid2DObject& dem_out, const std::string& parameter="");
virtual void read2DGrid(Grid2DObject& grid_out, const MeteoGrids::Parameters& parameter, const Date& date);
virtual void readDEM(DEMObject& dem_out);
virtual void readLanduse(Grid2DObject& landuse_out);
virtual void readAssimilationData(const Date&, Grid2DObject& da_out);
virtual void readSpecialPoints(std::vector<Coords>& pts);
virtual void write2DGrid(const Grid2DObject& grid_in, const std::string& name);
......
......@@ -68,7 +68,7 @@ class PGMIO : public IOInterface {
virtual void write2DGrid(const Grid2DObject& grid_in, const std::string& filename);
virtual void write2DGrid(const Grid2DObject& grid_in, const MeteoGrids::Parameters& parameter, const Date& date);
void read3DGrid(Grid3DObject& grid_out, const std::string& in_name);
void read3DGrid(Grid3DObject& grid_out, const std::string& in_name); //HACK
private:
void getGridPaths();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment