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
e1eee781
Commit
e1eee781
authored
Jul 15, 2013
by
Mathias Bavay
Browse files
CodeBlocks was not happy anymore with << for stringstream. Therefore we now use ostringstream.
parent
0a62da06
Changes
25
Hide whitespace changes
Inline
Side-by-side
meteoio/Array2D.h
View file @
e1eee781
...
...
@@ -383,7 +383,7 @@ template<class T> bool Array2D<T>::isEmpty() const {
}
template
<
class
T
>
const
std
::
string
Array2D
<
T
>::
toString
()
const
{
std
::
stringstream
os
;
std
::
o
stringstream
os
;
os
<<
"<array2d>
\n
"
;
for
(
unsigned
int
jj
=
0
;
jj
<
ny
;
jj
++
)
{
const
unsigned
int
jnx
=
jj
*
nx
;
...
...
meteoio/Array3D.h
View file @
e1eee781
...
...
@@ -442,7 +442,7 @@ template<class T> bool Array3D<T>::isEmpty() const {
}
template
<
class
T
>
const
std
::
string
Array3D
<
T
>::
toString
()
const
{
std
::
stringstream
os
;
std
::
o
stringstream
os
;
os
<<
"<array3d>
\n
"
;
for
(
unsigned
int
kk
=
0
;
kk
<
nz
;
kk
++
)
{
os
<<
"depth["
<<
kk
<<
"]
\n
"
;
...
...
meteoio/BufferedIOHandler.cc
View file @
e1eee781
...
...
@@ -378,7 +378,7 @@ void BufferedIOHandler::clearBuffer(){
const
std
::
string
BufferedIOHandler
::
toString
()
const
{
std
::
stringstream
os
;
std
::
o
stringstream
os
;
os
<<
"<BufferedIOHandler>
\n
"
;
os
<<
"Config& cfg = "
<<
hex
<<
&
cfg
<<
dec
<<
"
\n
"
;
os
<<
"IOHandler &iohandler = "
<<
hex
<<
&
iohandler
<<
dec
<<
"
\n
"
;
...
...
meteoio/Config.cc
View file @
e1eee781
...
...
@@ -82,7 +82,7 @@ bool Config::keyExists(const std::string& key, const std::string& section) const
}
const
std
::
string
Config
::
toString
()
const
{
std
::
stringstream
os
;
std
::
o
stringstream
os
;
os
<<
"<Config>
\n
"
;
os
<<
"Source: "
<<
sourcename
<<
"
\n
"
;
for
(
map
<
string
,
string
>::
const_iterator
it
=
properties
.
begin
();
it
!=
properties
.
end
();
++
it
){
...
...
@@ -207,7 +207,7 @@ void Config::parseLine(const unsigned int& linenr, std::vector<std::string> &imp
if
(
line
[
0
]
==
'['
)
{
const
size_t
endpos
=
line
.
find_last_of
(
']'
);
if
((
endpos
==
string
::
npos
)
||
(
endpos
<
2
)
||
(
endpos
!=
(
line
.
length
()
-
1
)))
{
stringstream
tmp
;
o
stringstream
tmp
;
tmp
<<
linenr
;
throw
IOException
(
"Section header corrupt in line "
+
tmp
.
str
(),
AT
);
}
else
{
...
...
@@ -240,7 +240,7 @@ void Config::parseLine(const unsigned int& linenr, std::vector<std::string> &imp
properties
[
section
+
"::"
+
key
]
=
value
;
//save the key/value pair
accept_import_before
=
false
;
//this is not an import, so no further import_before allowed
}
else
{
stringstream
tmp
;
o
stringstream
tmp
;
tmp
<<
linenr
;
throw
InvalidFormatException
(
"Error reading key value pair in
\"
"
+
sourcename
+
"
\"
at line "
+
tmp
.
str
(),
AT
);
}
...
...
meteoio/Coords.cc
View file @
e1eee781
...
...
@@ -932,7 +932,7 @@ lat, double& lon)
* @return string containing the formatted coordinate
*/
std
::
string
Coords
::
decimal_to_dms
(
const
double
&
decimal
)
{
std
::
stringstream
dms
;
std
::
o
stringstream
dms
;
const
double
abs_dec
=
fabs
(
decimal
);
const
int
d
=
(
int
)
floor
(
abs_dec
);
const
int
m
=
(
int
)
floor
(
(
abs_dec
-
(
double
)
d
)
*
60.
);
...
...
@@ -1162,7 +1162,7 @@ int Coords::getUTMZone(const double i_latitude, const double i_longitude, std::s
else
if
((
0
>=
i_longitude
)
&&
(
i_latitude
<=
-
80
))
zoneLetter
=
'A'
;
else
if
((
0
<
i_longitude
)
&&
(
i_latitude
<=
-
80
))
zoneLetter
=
'B'
;
std
::
stringstream
zone
;
std
::
o
stringstream
zone
;
zone
<<
ZoneNumber
<<
zoneLetter
;
zone_out
=
zone
.
str
();
...
...
meteoio/DataGenerator.cc
View file @
e1eee781
...
...
@@ -180,7 +180,7 @@ size_t DataGenerator::getArgumentsForAlgorithm(const Config& cfg,
}
const
std
::
string
DataGenerator
::
toString
()
const
{
std
::
stringstream
os
;
std
::
o
stringstream
os
;
os
<<
"<DataGenerator>
\n
"
;
os
<<
"Generators defined: "
<<
generators_defined
<<
"
\n
"
;
os
<<
"User list of generators:
\n
"
;
...
...
meteoio/Date.cc
View file @
e1eee781
...
...
@@ -892,7 +892,7 @@ const string Date::toString(FORMATS type, const bool& gmt) const
}
const
std
::
string
Date
::
toString
()
const
{
std
::
stringstream
os
;
std
::
o
stringstream
os
;
os
<<
"<date>
\n
"
;
if
(
undef
==
true
)
os
<<
"Date is undefined
\n
"
;
...
...
meteoio/Grid2DObject.cc
View file @
e1eee781
...
...
@@ -312,7 +312,7 @@ double Grid2DObject::operator()(const unsigned int& i) const {
}
const
std
::
string
Grid2DObject
::
toString
()
const
{
std
::
stringstream
os
;
std
::
o
stringstream
os
;
os
<<
"<Grid2DObject>
\n
"
;
os
<<
llcorner
.
toString
();
os
<<
ncols
<<
" x "
<<
nrows
<<
" @ "
<<
cellsize
<<
"m
\n
"
;
...
...
meteoio/Grid3DObject.cc
View file @
e1eee781
...
...
@@ -324,7 +324,7 @@ double Grid3DObject::operator()(const unsigned int& i) const {
}
const
std
::
string
Grid3DObject
::
toString
()
const
{
std
::
stringstream
os
;
std
::
o
stringstream
os
;
os
<<
"<Grid3DObject>
\n
"
;
os
<<
llcorner
.
toString
();
os
<<
ncols
<<
" x "
<<
nrows
<<
" x "
<<
ndepths
<<
" @ "
<<
cellsize
<<
"m
\n
"
;
...
...
meteoio/IOManager.cc
View file @
e1eee781
...
...
@@ -457,7 +457,7 @@ void IOManager::write2DGrid(const Grid2DObject& grid2D, const MeteoGrids::Parame
}
const
std
::
string
IOManager
::
toString
()
const
{
stringstream
os
;
o
stringstream
os
;
os
<<
"<IOManager>
\n
"
;
os
<<
"Config cfg = "
<<
hex
<<
&
cfg
<<
dec
<<
"
\n
"
;
os
<<
rawio
.
toString
();
...
...
meteoio/InterpolationAlgorithms.cc
View file @
e1eee781
...
...
@@ -118,7 +118,7 @@ size_t InterpolationAlgorithm::getStationAltitudes(const std::vector<StationData
*/
std
::
string
InterpolationAlgorithm
::
getInfo
()
const
{
std
::
stringstream
os
;
std
::
o
stringstream
os
;
os
<<
algo
<<
", "
<<
nrOfMeasurments
;
if
(
nrOfMeasurments
==
1
)
os
<<
" station"
;
...
...
meteoio/InterpolationAlgorithms.h
View file @
e1eee781
...
...
@@ -162,7 +162,7 @@ class InterpolationAlgorithm {
std
::
vector
<
MeteoData
>
vecMeteo
;
std
::
vector
<
double
>
vecData
;
///<store the measurement for the given parameter
std
::
vector
<
StationData
>
vecMeta
;
///<store the station data for the given parameter
std
::
stringstream
info
;
///<to store some extra information about the interoplation process
std
::
o
stringstream
info
;
///<to store some extra information about the interoplation process
size_t
nrOfMeasurments
;
///<the available number of measurements
};
...
...
meteoio/Meteo1DInterpolator.cc
View file @
e1eee781
...
...
@@ -132,7 +132,7 @@ Meteo1DInterpolator& Meteo1DInterpolator::operator=(const Meteo1DInterpolator& s
const
std
::
string
Meteo1DInterpolator
::
toString
()
const
{
stringstream
os
;
o
stringstream
os
;
os
<<
"<Meteo1DInterpolator>
\n
"
;
os
<<
"Config& cfg = "
<<
hex
<<
&
cfg
<<
dec
<<
"
\n
"
;
os
<<
"Resampling algorithms:
\n
"
;
...
...
meteoio/Meteo2DInterpolator.cc
View file @
e1eee781
...
...
@@ -200,7 +200,7 @@ void Meteo2DInterpolator::checkMinMax(const double& minval, const double& maxval
}
const
std
::
string
Meteo2DInterpolator
::
toString
()
const
{
stringstream
os
;
o
stringstream
os
;
os
<<
"<Meteo2DInterpolator>
\n
"
;
os
<<
"Config& cfg = "
<<
hex
<<
&
cfg
<<
dec
<<
"
\n
"
;
os
<<
"IOManager& iomanager = "
<<
hex
<<
&
iomanager
<<
dec
<<
"
\n
"
;
...
...
meteoio/MeteoData.cc
View file @
e1eee781
...
...
@@ -278,7 +278,7 @@ size_t MeteoData::getParameterIndex(const std::string& parname) const
}
const
std
::
string
MeteoData
::
toString
()
const
{
std
::
stringstream
os
;
std
::
o
stringstream
os
;
os
<<
"<meteo>
\n
"
;
os
<<
meta
.
toString
();
os
<<
date
.
toString
(
Date
::
FULL
)
<<
"
\n
"
;
...
...
meteoio/MeteoProcessor.cc
View file @
e1eee781
...
...
@@ -107,7 +107,7 @@ bool MeteoProcessor::resample(const Date& date, const std::vector<MeteoData>& iv
}
const
std
::
string
MeteoProcessor
::
toString
()
const
{
std
::
stringstream
os
;
std
::
o
stringstream
os
;
os
<<
"<MeteoProcessor>
\n
"
;
os
<<
mi1d
.
toString
();
os
<<
"Processing stacks:
\n
"
;
...
...
meteoio/meteofilters/ProcessingBlock.cc
View file @
e1eee781
...
...
@@ -192,7 +192,7 @@ std::string ProcessingBlock::getName() const {
ProcessingBlock
::~
ProcessingBlock
()
{}
const
std
::
string
ProcessingBlock
::
toString
()
const
{
std
::
stringstream
os
;
std
::
o
stringstream
os
;
os
<<
"["
<<
block_name
<<
" "
;
os
<<
properties
.
toString
();
os
<<
"]"
;
...
...
meteoio/meteofilters/ProcessingStack.cc
View file @
e1eee781
...
...
@@ -30,7 +30,7 @@ ProcessingStack::ProcessingStack(const Config& cfg, const std::string& parname)
string
block_name
=
vec_filters
[
ii
];
IOUtils
::
toUpper
(
block_name
);
std
::
vector
<
std
::
string
>
vec_args
;
std
::
stringstream
tmp
;
std
::
o
stringstream
tmp
;
tmp
<<
param_name
<<
"::arg"
<<
(
ii
+
1
);
getArgumentsForFilter
(
cfg
,
tmp
.
str
(),
vec_args
);
//Read arguments
...
...
meteoio/meteolaws/Sun.cc
View file @
e1eee781
...
...
@@ -316,7 +316,7 @@ double SunObject::getSplitting(const double& iswr_measured) const
const
std
::
string
SunObject
::
toString
()
const
{
std
::
stringstream
os
;
std
::
o
stringstream
os
;
const
std
::
streamsize
old_prec
=
os
.
precision
();
os
<<
"<SunObject>
\n
"
;
os
<<
position
.
toString
();
...
...
meteoio/plugins/A3DIO.cc
View file @
e1eee781
...
...
@@ -463,7 +463,7 @@ void A3DIO::constructMeteo2DFilenames(const Date& startDate, const Date& endDate
cfg
.
getValue
(
"METEOPATH"
,
"Input"
,
tmp
);
for
(
int
yyyy
=
startyear
;
yyyy
<=
endyear
;
yyyy
++
){
std
::
stringstream
ss
;
std
::
o
stringstream
ss
;
ss
<<
yyyy
;
std
::
string
precFilename
=
tmp
+
"/prec"
+
ss
.
str
()
+
".txt"
;
...
...
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