WSL/SLF GitLab Repository
Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
snow-models
meteoio
Commits
d4d808a8
Commit
d4d808a8
authored
Jul 31, 2014
by
Mathias Bavay
Browse files
removed the popc specific code
parent
2337bec5
Changes
36
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
d4d808a8
...
...
@@ -8,7 +8,6 @@ SET(VERSION_MAJOR 2 CACHE INTERNAL "")
SET
(
VERSION_MINOR 4 CACHE INTERNAL
""
)
SET
(
VERSION_PATCH 3 CACHE INTERNAL
""
)
SET
(
POPCC popcc
)
SET
(
LIBPREFIX
"lib"
)
#make sure ALL plugins are libXXX for ALL plateforms
SET
(
CMAKE_IMPORT_LIBRARY_PREFIX
"lib"
)
#for Visual C++ import libraries
...
...
@@ -44,11 +43,7 @@ ELSE(MSVC)
SET
(
WARNINGS
"-Wall -Wno-long-long"
)
SET
(
PROFILING
"-pg -fprofile-arcs"
)
SET
(
DEEP_WARNINGS
"-Wunused-value -Wshadow -Wpointer-arith -Wconversion -Winline -Wdisabled-optimization"
)
#-Wfloat-equal -Wpadded
IF
(
POPC
)
SET
(
EXTRA_WARNINGS
"-Wextra -Wno-ignored-qualifiers"
)
ELSE
(
POPC
)
SET
(
EXTRA_WARNINGS
"-Wextra -pedantic -Weffc++
${
DEEP_WARNINGS
}
"
)
#-Weffc++
ENDIF
(
POPC
)
SET
(
EXTRA_WARNINGS
"-Wextra -pedantic -Weffc++
${
DEEP_WARNINGS
}
"
)
#-Weffc++
IF
(
CMAKE_COMPILER_IS_GNUCXX AND NOT ANDROID
)
SET
(
EXTRA_WARNINGS
"
${
EXTRA_WARNINGS
}
-ansi"
)
#Android does not like ansi...
IF
(
WIN32
)
#for gcc on windows
...
...
@@ -112,20 +107,13 @@ IF(DEST STREQUAL "optimized")
SET
(
ARCH
"
${
ARCH_OPTIM
}
"
)
ENDIF
(
DEST STREQUAL
"optimized"
)
#build for use with POPC in parallel objects
SET
(
POPC OFF CACHE BOOL
"Compile for POPC ON or OFF"
)
#show exception messages in a graphical message box
SET
(
GUI_EXCEPTIONS OFF CACHE BOOL
"Show a message box with exceptions texts ON or OFF"
)
###########################################################
#finally, SET compile flags
IF
(
POPC
)
#SET(POPC_FLAGS "-cxxmain -Dcerr=\\\"cout\\\"")
SET
(
POPC_FLAGS
"-cxxmain"
)
ENDIF
(
POPC
)
SET
(
CMAKE_CXX_FLAGS
"
${
POPC_FLAGS
}
${
_VERSION
}
${
ARCH
}
"
CACHE STRING
""
FORCE
)
SET
(
CMAKE_CXX_FLAGS
"
${
_VERSION
}
${
ARCH
}
"
CACHE STRING
""
FORCE
)
SET
(
CMAKE_CXX_FLAGS_RELEASE
"
${
OPTIM
}
"
CACHE STRING
""
FORCE
)
SET
(
CMAKE_CXX_FLAGS_DEBUG
"
${
DEBUG
}
${
WARNINGS
}
${
EXTRA_WARNINGS
}
"
CACHE STRING
""
FORCE
)
SET
(
CMAKE_CXX_FLAGS_CXXFLAGS
"$ENV{CXXFLAGS}"
CACHE STRING
""
FORCE
)
...
...
@@ -215,7 +203,6 @@ ADD_CUSTOM_TARGET(distclean make clean
COMMAND cmake -E remove tests/2D_interpolations/2009-01-19T12.00_HNW.asc tests/2D_interpolations/2009-01-19T12.00_RH.asc tests/2D_interpolations/2009-01-19T12.00_RSWR.asc tests/2D_interpolations/2009-01-19T12.00_TA.asc
)
###########################################################
#for the uninstall target
CONFIGURE_FILE
(
...
...
meteoio/BufferedIOHandler.cc
View file @
d4d808a8
...
...
@@ -151,13 +151,8 @@ void BufferedIOHandler::readStationData(const Date& date, STATIONS_SET& vecStati
iohandler
.
readStationData
(
date
,
vecStation
);
}
#ifdef _POPC_
void
BufferedIOHandler
::
writeMeteoData
(
std
::
vector
<
METEO_SET
>&
vecMeteo
,
const
std
::
string
&
name
)
#else
void
BufferedIOHandler
::
writeMeteoData
(
const
std
::
vector
<
METEO_SET
>&
vecMeteo
,
const
std
::
string
&
name
)
#endif
{
iohandler
.
writeMeteoData
(
vecMeteo
,
name
);
}
...
...
meteoio/BufferedIOHandler.h
View file @
d4d808a8
...
...
@@ -50,11 +50,7 @@ namespace mio {
class
MeteoFilter
;
#ifdef _POPC_
class
BufferedIOHandler
{
#else
class
BufferedIOHandler
:
public
IOInterface
{
#endif
public:
/**
...
...
@@ -70,11 +66,8 @@ class BufferedIOHandler : public IOInterface {
* @endcode
*/
BufferedIOHandler
(
IOHandler
&
in_iohandler
,
const
Config
&
in_cfg
);
#ifdef _POPC_
virtual
~
BufferedIOHandler
()
{};
#else
virtual
~
BufferedIOHandler
()
throw
()
{};
#endif
BufferedIOHandler
&
operator
=
(
const
BufferedIOHandler
&
);
///<Assignement operator
...
...
@@ -105,13 +98,8 @@ class BufferedIOHandler : public IOInterface {
virtual
void
readMeteoData
(
const
Date
&
dateStart
,
const
Date
&
dateEnd
,
std
::
vector
<
METEO_SET
>&
vecMeteo
,
const
size_t
&
stationindex
=
IOUtils
::
npos
);
#ifdef _POPC_
virtual
void
writeMeteoData
(
std
::
vector
<
METEO_SET
>&
vecMeteo
,
const
std
::
string
&
name
=
""
);
#else
virtual
void
writeMeteoData
(
const
std
::
vector
<
METEO_SET
>&
vecMeteo
,
const
std
::
string
&
name
=
""
);
#endif
virtual
void
write2DGrid
(
const
Grid2DObject
&
grid_in
,
const
std
::
string
&
options
=
""
);
virtual
void
write2DGrid
(
const
Grid2DObject
&
grid_in
,
const
MeteoGrids
::
Parameters
&
parameter
,
const
Date
&
date
);
...
...
meteoio/CMakeLists.txt
View file @
d4d808a8
...
...
@@ -24,15 +24,6 @@ IF(DATA_QA)
ENDIF
(
MSVC
)
ENDIF
(
DATA_QA
)
IF
(
POPC
)
#FIND_PACKAGE(Popc REQUIRED)
SET
(
popc_sources marshal_meteoio.cc
)
SET
(
CMAKE_CXX_COMPILER popcc
)
#this does not work, the user still has to do it manually
#INCLUDE(CMakeForceCompiler)
#CMAKE_FORCE_CXX_COMPILER(popcc POPCC)
SET
(
POPC_EXT
"popc"
)
ENDIF
(
POPC
)
SET
(
meteoio_sources
IOManager.cc
Matrix.cc
...
...
@@ -66,8 +57,8 @@ SET(meteoio_sources
${
meteolaws_sources
}
${
meteostats_sources
}
${
meteofilters_sources
}
${
popc_sources
}
)
IF
(
GUI_EXCEPTIONS
)
IF
(
MSVC
)
ADD_DEFINITIONS
(
/DMSG_BOX
)
...
...
@@ -88,7 +79,7 @@ ENDIF(GUI_EXCEPTIONS)
#shared library.
IF
(
BUILD_SHARED_LIBS
)
SET
(
SHAREDNAME
${
PROJECT_NAME
}
${
POPC_EXT
}
)
SET
(
SHAREDNAME
${
PROJECT_NAME
}
)
ADD_LIBRARY
(
${
SHAREDNAME
}
${
meteoio_sources
}
)
TARGET_LINK_LIBRARIES
(
${
SHAREDNAME
}
${
plugin_libs
}
${
LIBPROJ
}
${
Popc_LIBRARIES
}
${
EXTRA_LINK_FLAGS
}
${
GUI_LIBS
}
)
SET_TARGET_PROPERTIES
(
${
SHAREDNAME
}
PROPERTIES
...
...
@@ -111,7 +102,7 @@ ENDIF(BUILD_SHARED_LIBS)
#static library. Please keep in mind that for Windows, a dll is a runtime
IF
(
BUILD_STATIC_LIBS
)
SET
(
STATICNAME
${
PROJECT_NAME
}
_STATIC
)
SET
(
STATICLIBNAME
${
PROJECT_NAME
}
${
POPC_EXT
}
)
SET
(
STATICLIBNAME
${
PROJECT_NAME
}
)
ADD_LIBRARY
(
${
STATICNAME
}
STATIC
${
meteoio_sources
}
)
TARGET_LINK_LIBRARIES
(
${
STATICNAME
}
${
plugin_libs
}
${
LIBPROJ
}
${
Popc_LIBRARIES
}
${
EXTRA_LINK_FLAGS
}
${
GUI_LIBS
}
)
SET_TARGET_PROPERTIES
(
${
STATICNAME
}
PROPERTIES
...
...
meteoio/Config.cc
View file @
d4d808a8
...
...
@@ -356,23 +356,3 @@ void Config::write(const std::string& filename) const
}
}
//end namespace
#ifdef _POPC_
#include
"marshal_meteoio.h"
using
namespace
mio
;
//HACK for POPC
void
Config
::
Serialize
(
POPBuffer
&
buf
,
bool
pack
)
{
if
(
pack
)
{
buf
.
Pack
(
&
sourcename
,
1
);
marshal_map_str_str
(
buf
,
properties
,
0
,
FLAG_MARSHAL
,
NULL
);
}
else
{
buf
.
UnPack
(
&
sourcename
,
1
);
marshal_map_str_str
(
buf
,
properties
,
0
,
!
FLAG_MARSHAL
,
NULL
);
}
}
#endif
//} //namespace //HACK for POPC
meteoio/Config.h
View file @
d4d808a8
...
...
@@ -57,14 +57,7 @@ namespace mio {
class
ConfigProxy
;
#ifdef _POPC_
#include
<paroc_base.h>
class
Config
:
POPBase
{
public:
void
Serialize
(
POPBuffer
&
buf
,
bool
pack
);
#else
class
Config
{
#endif
public:
/**
* @brief Empty constructor. The user MUST later one fill the internal key/value map object
...
...
meteoio/Coords.cc
View file @
d4d808a8
...
...
@@ -1854,43 +1854,3 @@ void Coords::setDefaultValues() {
}
}
//end namespace
#ifdef _POPC_
#include
"marshal_meteoio.h"
using
namespace
mio
;
//HACK for POPC
void
Coords
::
Serialize
(
POPBuffer
&
buf
,
bool
pack
)
{
if
(
pack
){
buf
.
Pack
(
&
coordsystem
,
1
);
buf
.
Pack
(
&
coordparam
,
1
);
buf
.
Pack
(
&
ref_latitude
,
1
);
buf
.
Pack
(
&
ref_longitude
,
1
);
buf
.
Pack
(
&
latitude
,
1
);
buf
.
Pack
(
&
longitude
,
1
);
buf
.
Pack
(
&
altitude
,
1
);
buf
.
Pack
(
&
easting
,
1
);
buf
.
Pack
(
&
northing
,
1
);
buf
.
Pack
(
&
grid_i
,
1
);
buf
.
Pack
(
&
grid_j
,
1
);
buf
.
Pack
(
&
grid_k
,
1
);
marshal_geo_distances
(
buf
,
distance_algo
,
0
,
FLAG_MARSHAL
,
NULL
);
}
else
{
buf
.
UnPack
(
&
coordsystem
,
1
);
buf
.
UnPack
(
&
coordparam
,
1
);
buf
.
UnPack
(
&
ref_latitude
,
1
);
buf
.
UnPack
(
&
ref_longitude
,
1
);
buf
.
UnPack
(
&
latitude
,
1
);
buf
.
UnPack
(
&
longitude
,
1
);
buf
.
UnPack
(
&
altitude
,
1
);
buf
.
UnPack
(
&
easting
,
1
);
buf
.
UnPack
(
&
northing
,
1
);
buf
.
UnPack
(
&
grid_i
,
1
);
buf
.
UnPack
(
&
grid_j
,
1
);
buf
.
UnPack
(
&
grid_k
,
1
);
marshal_geo_distances
(
buf
,
distance_algo
,
0
,
!
FLAG_MARSHAL
,
NULL
);
}
}
#endif
//} //namespace //HACK for POPC
meteoio/Coords.h
View file @
d4d808a8
...
...
@@ -39,15 +39,8 @@ namespace mio {
* @date 2009-01-20
*/
#ifdef _POPC_
#include
<paroc_base.h>
class
Coords
:
POPBase
{
public:
void
Serialize
(
POPBuffer
&
buf
,
bool
pack
);
#else
class
Coords
{
#endif
public:
public:
///Keywords for selecting the algorithm for computing geodesic distances
typedef
enum
GEO_DISTANCES
{
GEO_COSINE
,
///< Spherical law of cosine (See http://www.movable-type.co.uk/scripts/latlong.html)
...
...
meteoio/DEMObject.cc
View file @
d4d808a8
...
...
@@ -1070,70 +1070,4 @@ std::iostream& operator>>(std::iostream& is, DEMObject& dem) {
return
is
;
}
}
//end namespace
#ifdef _POPC_
#include
"marshal_meteoio.h"
using
namespace
mio
;
//HACK for POPC
void
DEMObject
::
Serialize
(
POPBuffer
&
buf
,
bool
pack
)
{
if
(
pack
)
{
buf
.
Pack
(
&
ncols
,
1
);
buf
.
Pack
(
&
nrows
,
1
);
buf
.
Pack
(
&
cellsize
,
1
);
marshal_Coords
(
buf
,
llcorner
,
0
,
FLAG_MARSHAL
,
NULL
);
buf
.
Pack
(
&
min_altitude
,
1
);
buf
.
Pack
(
&
max_altitude
,
1
);
buf
.
Pack
(
&
min_slope
,
1
);
buf
.
Pack
(
&
max_slope
,
1
);
buf
.
Pack
(
&
min_curvature
,
1
);
buf
.
Pack
(
&
max_curvature
,
1
);
buf
.
Pack
(
&
slope_failures
,
1
);
buf
.
Pack
(
&
curvature_failures
,
1
);
buf
.
Pack
(
&
update_flag
,
1
);
marshal_slope_type
(
buf
,
dflt_algorithm
,
0
,
FLAG_MARSHAL
,
NULL
);
marshal_DOUBLE2D
(
buf
,
grid2D
,
0
,
FLAG_MARSHAL
,
NULL
);
marshal_DOUBLE2D
(
buf
,
slope
,
0
,
FLAG_MARSHAL
,
NULL
);
marshal_DOUBLE2D
(
buf
,
azi
,
0
,
FLAG_MARSHAL
,
NULL
);
marshal_DOUBLE2D
(
buf
,
curvature
,
0
,
FLAG_MARSHAL
,
NULL
);
marshal_DOUBLE2D
(
buf
,
Nx
,
0
,
FLAG_MARSHAL
,
NULL
);
marshal_DOUBLE2D
(
buf
,
Ny
,
0
,
FLAG_MARSHAL
,
NULL
);
marshal_DOUBLE2D
(
buf
,
Nz
,
0
,
FLAG_MARSHAL
,
NULL
);
}
else
{
buf
.
UnPack
(
&
ncols
,
1
);
buf
.
UnPack
(
&
nrows
,
1
);
buf
.
UnPack
(
&
cellsize
,
1
);
marshal_Coords
(
buf
,
llcorner
,
0
,
!
FLAG_MARSHAL
,
NULL
);
buf
.
UnPack
(
&
min_altitude
,
1
);
buf
.
UnPack
(
&
max_altitude
,
1
);
buf
.
UnPack
(
&
min_slope
,
1
);
buf
.
UnPack
(
&
max_slope
,
1
);
buf
.
UnPack
(
&
min_curvature
,
1
);
buf
.
UnPack
(
&
max_curvature
,
1
);
buf
.
UnPack
(
&
slope_failures
,
1
);
buf
.
UnPack
(
&
curvature_failures
,
1
);
buf
.
UnPack
(
&
update_flag
,
1
);
grid2D
.
clear
();
//if(grid2D!=NULL)delete(grid2D);
slope
.
clear
();
azi
.
clear
();
curvature
.
clear
();
Nx
.
clear
();
Ny
.
clear
();
Nz
.
clear
();
marshal_slope_type
(
buf
,
dflt_algorithm
,
0
,
!
FLAG_MARSHAL
,
NULL
);
marshal_DOUBLE2D
(
buf
,
grid2D
,
0
,
!
FLAG_MARSHAL
,
NULL
);
marshal_DOUBLE2D
(
buf
,
slope
,
0
,
!
FLAG_MARSHAL
,
NULL
);
marshal_DOUBLE2D
(
buf
,
azi
,
0
,
!
FLAG_MARSHAL
,
NULL
);
marshal_DOUBLE2D
(
buf
,
curvature
,
0
,
!
FLAG_MARSHAL
,
NULL
);
marshal_DOUBLE2D
(
buf
,
Nx
,
0
,
!
FLAG_MARSHAL
,
NULL
);
marshal_DOUBLE2D
(
buf
,
Ny
,
0
,
!
FLAG_MARSHAL
,
NULL
);
marshal_DOUBLE2D
(
buf
,
Nz
,
0
,
!
FLAG_MARSHAL
,
NULL
);
}
}
#endif
//} //namespace //HACK for POPC
meteoio/DEMObject.h
View file @
d4d808a8
...
...
@@ -40,16 +40,7 @@ namespace mio {
* @date 2009-07-20
*/
#ifdef _POPC_
class
DEMObjectDummy
{};
//HACK for POPC
#include
<paroc_base.h>
class
DEMObject
:
public
Grid2DObject
/*, POPBase*/
{
public:
void
Serialize
(
POPBuffer
&
buf
,
bool
pack
);
#else
class
DEMObject
:
public
Grid2DObject
{
#endif
public:
Array2D
<
double
>
slope
;
Array2D
<
double
>
azi
;
...
...
meteoio/DataGenerator.cc
View file @
d4d808a8
...
...
@@ -277,21 +277,4 @@ const std::string DataGenerator::toString() const {
return
os
.
str
();
}
#ifdef _POPC_
#include
"marshal_meteoio.h"
using
namespace
mio
;
//HACK for POPC
void
DataGenerator
::
Serialize
(
POPBuffer
&
buf
,
bool
pack
)
{
/*if (pack)
{
}
else
{
}*/
}
#endif
}
//namespace
meteoio/DataGenerator.h
View file @
d4d808a8
...
...
@@ -97,15 +97,8 @@ namespace mio {
* @date 2013-03-20
*/
#ifdef _POPC_
#include
<paroc_base.h>
class
DataGenerator
:
POPBase
{
public:
void
Serialize
(
POPBuffer
&
buf
,
bool
pack
);
#else
class
DataGenerator
{
#endif
public:
public:
DataGenerator
(
const
Config
&
cfg
);
DataGenerator
(
const
DataGenerator
&
c
)
:
mapGenerators
(
c
.
mapGenerators
),
mapCreators
(
c
.
mapCreators
),
generators_defined
(
c
.
generators_defined
),
creators_defined
(
c
.
creators_defined
)
{};
...
...
meteoio/Date.cc
View file @
d4d808a8
...
...
@@ -1093,33 +1093,4 @@ double Date::GMTToLocal(const double& i_gmt_julian) const {
}
}
#ifdef _POPC_
#include
"marshal_meteoio.h"
using
namespace
mio
;
//HACK for POPC
void
Date
::
Serialize
(
POPBuffer
&
buf
,
bool
pack
)
{
if
(
pack
)
{
buf
.
Pack
(
&
timezone
,
1
);
buf
.
Pack
(
&
dst
,
1
);
buf
.
Pack
(
&
gmt_julian
,
1
);
buf
.
Pack
(
&
gmt_year
,
1
);
buf
.
Pack
(
&
gmt_month
,
1
);
buf
.
Pack
(
&
gmt_day
,
1
);
buf
.
Pack
(
&
gmt_hour
,
1
);
buf
.
Pack
(
&
gmt_minute
,
1
);
buf
.
Pack
(
&
undef
,
1
);
}
else
{
buf
.
UnPack
(
&
timezone
,
1
);
buf
.
UnPack
(
&
dst
,
1
);
buf
.
UnPack
(
&
gmt_julian
,
1
);
buf
.
UnPack
(
&
gmt_year
,
1
);
buf
.
UnPack
(
&
gmt_month
,
1
);
buf
.
UnPack
(
&
gmt_day
,
1
);
buf
.
UnPack
(
&
gmt_hour
,
1
);
buf
.
UnPack
(
&
gmt_minute
,
1
);
buf
.
UnPack
(
&
undef
,
1
);
}
}
#endif
}
//namespace
meteoio/Date.h
View file @
d4d808a8
...
...
@@ -55,16 +55,7 @@ namespace mio {
* @date 2010-04-15
*/
#ifdef _POPC_
#include
<paroc_base.h>
class
DateDummy
{};
//HACK for POPC
class
Date
:
POPBase
{
public:
void
Serialize
(
POPBuffer
&
buf
,
bool
pack
);
#else
class
Date
{
#endif
public:
///Keywords for selecting the date formats
typedef
enum
{
...
...
meteoio/Grid2DObject.cc
View file @
d4d808a8
...
...
@@ -334,28 +334,3 @@ std::iostream& operator>>(std::iostream& is, Grid2DObject& grid) {
}
}
//namespace
#ifdef _POPC_
#include
"marshal_meteoio.h"
using
namespace
mio
;
//HACK for POPC
void
Grid2DObject
::
Serialize
(
POPBuffer
&
buf
,
bool
pack
)
{
if
(
pack
)
{
buf
.
Pack
(
&
ncols
,
1
);
buf
.
Pack
(
&
nrows
,
1
);
buf
.
Pack
(
&
cellsize
,
1
);
marshal_Coords
(
buf
,
llcorner
,
0
,
FLAG_MARSHAL
,
NULL
);
marshal_DOUBLE2D
(
buf
,
grid2D
,
0
,
FLAG_MARSHAL
,
NULL
);
}
else
{
buf
.
UnPack
(
&
ncols
,
1
);
buf
.
UnPack
(
&
nrows
,
1
);
buf
.
UnPack
(
&
cellsize
,
1
);
marshal_Coords
(
buf
,
llcorner
,
0
,
!
FLAG_MARSHAL
,
NULL
);
grid2D
.
clear
();
//if(grid2D!=NULL)delete(grid2D);
marshal_DOUBLE2D
(
buf
,
grid2D
,
0
,
!
FLAG_MARSHAL
,
NULL
);
}
}
#endif
//} //namespace //HACK for POPC
meteoio/Grid2DObject.h
View file @
d4d808a8
...
...
@@ -36,22 +36,7 @@ namespace mio {
* @date 2008-12-20
*/
#ifdef _POPC_
#include
<paroc_base.h>
class
Grid2DObjetctDummy
{};
//HACK for POPC
class
Grid2DObject
:
POPBase
{
public:
/**
* @brief Serialize method for POPC. Used to marshall data and send it from an object to another.
*
* @param buf pointer to the communication buffer
* @param pack indicates if the data is sent or received
*/
virtual
void
Serialize
(
POPBuffer
&
buf
,
bool
pack
);
#else
class
Grid2DObject
{
#endif
public:
///structure to contain the grid coordinates of a point in a 2D grid
typedef
struct
GRID_POINT_2D
{
...
...
meteoio/Grid3DObject.cc
View file @
d4d808a8
...
...
@@ -357,34 +357,3 @@ std::iostream& operator>>(std::iostream& is, Grid3DObject& grid) {
}
}
//end namespace
#ifdef _POPC_
#include
"marshal_meteoio.h"
using
namespace
mio
;
//HACK for POPC
void
Grid3DObject
::
Serialize
(
POPBuffer
&
buf
,
bool
pack
)
{
if
(
pack
)
{
buf
.
Pack
(
&
ncols
,
1
);
buf
.
Pack
(
&
nrows
,
1
);
buf
.
Pack
(
&
ndepths
,
1
);
buf
.
Pack
(
&
cellsize
,
1
);
marshal_Coords
(
buf
,
llcorner
,
0
,
FLAG_MARSHAL
,
NULL
);
//size_t x,y,z;
//grid3D.size(x,y,z);
marshal_DOUBLE3D
(
buf
,
grid3D
,
0
,
FLAG_MARSHAL
,
NULL
);
}
else
{
buf
.
UnPack
(
&
ncols
,
1
);
buf
.
UnPack
(
&
nrows
,
1
);
buf
.
UnPack
(
&
ndepths
,
1
);
buf
.
UnPack
(
&
cellsize
,
1
);
marshal_Coords
(
buf
,
llcorner
,
0
,
!
FLAG_MARSHAL
,
NULL
);
//grid3D.clear();//if(grid2D!=NULL)delete(grid2D);
marshal_DOUBLE3D
(
buf
,
grid3D
,
0
,
!
FLAG_MARSHAL
,
NULL
);
}
}
#endif
//} //namespace //HACK for POPC
meteoio/Grid3DObject.h
View file @
d4d808a8
...
...
@@ -36,16 +36,7 @@ namespace mio {
* @date 2009-07-20
*/
#ifdef _POPC_
#include
<paroc_base.h>
class
Grid3DObjetctDummy
{};
//HACK for POPC
class
Grid3DObject
:
POPBase
{
public:
void
Serialize
(
POPBuffer
&
buf
,
bool
pack
);
#else
class
Grid3DObject
{
#endif
public:
typedef
struct
GRID_POINT_3D
{
//TODO: this potentially conflicts with the definition in Grid2DObject
size_t
ix
;
///<grid index along X
...
...
meteoio/IOExceptions.cc
View file @
d4d808a8
...
...
@@ -108,11 +108,7 @@ std::string IOException::resolveSymbols(char *symbols, const unsigned int& ii, b
}
#endif
#ifdef _POPC_
IOException
::
IOException
(
const
std
::
string
&
message
,
const
std
::
string
&
position
)
:
POPException
(
STD_EXCEPTION
)
#else
IOException
::
IOException
(
const
std
::
string
&
message
,
const
std
::
string
&
position
)
:
msg
(),
full_output
()
#endif
{
#if defined _WIN32 || defined __MINGW32__ || defined __CYGWIN__
const
char
*
delim
=
strrchr
(
position
.
c_str
(),
'\\'
);
...
...
@@ -139,10 +135,6 @@ IOException::IOException(const std::string& message, const std::string& position
#else
full_output
=
msg
+
"
\n
"
;
#endif
#ifdef _POPC_
const
string
tmp
=
backtrace_info
+
"
\n\n
"
+
msg
;
SetExtra
(
tmp
.
c_str
());
#endif
}
IOException
::~
IOException
()
throw
()
{}
...
...
meteoio/IOExceptions.h
View file @
d4d808a8
...
...
@@ -37,12 +37,8 @@ namespace mio {
* @author Thomas Egger
*/
#ifdef _POPC_
#include
<paroc_exception.h>
class
MIO_API
IOException
:
public
POPException
{
#else
class
IOException
:
public
std
::
exception
{
#endif
class
IOException
:
public
std
::
exception
{
public:
IOException
(
const
std
::
string
&
message
=
"IOException occured"
,
const
std
::
string
&
position
=
""
);
~
IOException
()
throw
();
...
...
Prev
1
2
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment