Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
OpenWalnut Core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
44
Issues
44
List
Boards
Labels
Service Desk
Milestones
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
OpenWalnut
OpenWalnut Core
Commits
27c61c02
Commit
27c61c02
authored
Feb 08, 2012
by
Sebastian Eichelbaum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[FIX
#130
] - removed boost lexical cast completely. This solves the locale issue.
parent
e0515a6f
Changes
55
Hide whitespace changes
Inline
Side-by-side
Showing
55 changed files
with
219 additions
and
230 deletions
+219
-230
src/core/common/WAssert.cpp
src/core/common/WAssert.cpp
+2
-2
src/core/common/WColor.cpp
src/core/common/WColor.cpp
+0
-1
src/core/common/WItemSelector.cpp
src/core/common/WItemSelector.cpp
+1
-3
src/core/common/WPropertyGroup.cpp
src/core/common/WPropertyGroup.cpp
+0
-1
src/core/common/WPropertyGroupBase.cpp
src/core/common/WPropertyGroupBase.cpp
+2
-2
src/core/common/WPropertyTypes.cpp
src/core/common/WPropertyTypes.cpp
+9
-7
src/core/common/WPropertyTypes.h
src/core/common/WPropertyTypes.h
+7
-7
src/core/common/WPropertyVariable.h
src/core/common/WPropertyVariable.h
+1
-1
src/core/common/WSegmentationFault.h
src/core/common/WSegmentationFault.h
+2
-3
src/core/common/WStringUtils.h
src/core/common/WStringUtils.h
+35
-36
src/core/common/math/linearAlgebra/WMatrixFixed.h
src/core/common/math/linearAlgebra/WMatrixFixed.h
+5
-6
src/core/dataHandler/WDataHandler.cpp
src/core/dataHandler/WDataHandler.cpp
+4
-4
src/core/dataHandler/WDataSetFibers.cpp
src/core/dataHandler/WDataSetFibers.cpp
+0
-1
src/core/dataHandler/WSubject.cpp
src/core/dataHandler/WSubject.cpp
+0
-1
src/core/dataHandler/io/WReaderMatrixSymVTK.cpp
src/core/dataHandler/io/WReaderMatrixSymVTK.cpp
+2
-3
src/core/graphicsEngine/WGEColormapping.cpp
src/core/graphicsEngine/WGEColormapping.cpp
+5
-3
src/core/graphicsEngine/WGEGeodeUtils.cpp
src/core/graphicsEngine/WGEGeodeUtils.cpp
+4
-2
src/core/graphicsEngine/WGEProjectFileIO.cpp
src/core/graphicsEngine/WGEProjectFileIO.cpp
+12
-11
src/core/graphicsEngine/WGETexture.h
src/core/graphicsEngine/WGETexture.h
+0
-1
src/core/graphicsEngine/WGETextureUtils.h
src/core/graphicsEngine/WGETextureUtils.h
+3
-5
src/core/graphicsEngine/WGEUtils.h
src/core/graphicsEngine/WGEUtils.h
+0
-1
src/core/graphicsEngine/offscreen/WGEOffscreenRenderPass.cpp
src/core/graphicsEngine/offscreen/WGEOffscreenRenderPass.cpp
+0
-1
src/core/graphicsEngine/shaders/WGEShader.cpp
src/core/graphicsEngine/shaders/WGEShader.cpp
+0
-1
src/core/graphicsEngine/shaders/WGEShaderDefine.h
src/core/graphicsEngine/shaders/WGEShaderDefine.h
+0
-1
src/core/graphicsEngine/shaders/WGEShaderVersionPreprocessor.cpp
...e/graphicsEngine/shaders/WGEShaderVersionPreprocessor.cpp
+3
-1
src/core/kernel/combiner/WModuleProjectFileCombiner.cpp
src/core/kernel/combiner/WModuleProjectFileCombiner.cpp
+6
-6
src/modules/atlasCreator/WMAtlasCreator.cpp
src/modules/atlasCreator/WMAtlasCreator.cpp
+3
-1
src/modules/atlasSurfaces/WMAtlasSurfaces.cpp
src/modules/atlasSurfaces/WMAtlasSurfaces.cpp
+5
-4
src/modules/clusterDisplay/WMClusterDisplay.cpp
src/modules/clusterDisplay/WMClusterDisplay.cpp
+10
-8
src/modules/clusterDisplayVoxels/WMClusterDisplayVoxels.cpp
src/modules/clusterDisplayVoxels/WMClusterDisplayVoxels.cpp
+14
-12
src/modules/colormapper/WMColormapper.cpp
src/modules/colormapper/WMColormapper.cpp
+0
-1
src/modules/coordinateSystem/WRulerOrtho.cpp
src/modules/coordinateSystem/WRulerOrtho.cpp
+13
-13
src/modules/data/io/WReaderEEG.cpp
src/modules/data/io/WReaderEEG.cpp
+5
-6
src/modules/data/io/WReaderEEGASCII.cpp
src/modules/data/io/WReaderEEGASCII.cpp
+1
-2
src/modules/data/io/WReaderELC.cpp
src/modules/data/io/WReaderELC.cpp
+4
-5
src/modules/data/io/WReaderFiberVTK.cpp
src/modules/data/io/WReaderFiberVTK.cpp
+1
-1
src/modules/data/io/WReaderFiberVTK.h
src/modules/data/io/WReaderFiberVTK.h
+3
-3
src/modules/data/io/WReaderVTK.cpp
src/modules/data/io/WReaderVTK.cpp
+1
-1
src/modules/data/io/WReaderVTK.h
src/modules/data/io/WReaderVTK.h
+3
-3
src/modules/histogramView/WMHistogramView.cpp
src/modules/histogramView/WMHistogramView.cpp
+8
-8
src/modules/probTractDisplay/WMProbTractDisplay.cpp
src/modules/probTractDisplay/WMProbTractDisplay.cpp
+3
-3
src/modules/readMesh/WMReadMesh.cpp
src/modules/readMesh/WMReadMesh.cpp
+29
-28
src/modules/teemGlyphs/WMTeemGlyphs.cpp
src/modules/teemGlyphs/WMTeemGlyphs.cpp
+3
-1
src/modules/transferFunctionColorBar/WMTransferFunctionColorBar.cpp
...s/transferFunctionColorBar/WMTransferFunctionColorBar.cpp
+0
-1
src/modules/webglSupport/WMWebglSupport.cpp
src/modules/webglSupport/WMWebglSupport.cpp
+7
-6
src/qt4gui/qt4/WQtGLScreenCapture.cpp
src/qt4gui/qt4/WQtGLScreenCapture.cpp
+0
-1
src/qt4gui/qt4/controlPanel/WPropertyColorWidget.cpp
src/qt4gui/qt4/controlPanel/WPropertyColorWidget.cpp
+0
-1
src/qt4gui/qt4/controlPanel/WPropertyDoubleWidget.cpp
src/qt4gui/qt4/controlPanel/WPropertyDoubleWidget.cpp
+0
-1
src/qt4gui/qt4/controlPanel/WPropertyFilenameWidget.cpp
src/qt4gui/qt4/controlPanel/WPropertyFilenameWidget.cpp
+0
-1
src/qt4gui/qt4/controlPanel/WPropertyIntWidget.cpp
src/qt4gui/qt4/controlPanel/WPropertyIntWidget.cpp
+0
-1
src/qt4gui/qt4/controlPanel/WPropertyMatrix4X4Widget.cpp
src/qt4gui/qt4/controlPanel/WPropertyMatrix4X4Widget.cpp
+3
-3
src/qt4gui/qt4/controlPanel/WPropertyPositionWidget.cpp
src/qt4gui/qt4/controlPanel/WPropertyPositionWidget.cpp
+0
-1
src/qt4gui/qt4/controlPanel/WPropertySelectionWidget.cpp
src/qt4gui/qt4/controlPanel/WPropertySelectionWidget.cpp
+0
-1
src/qt4gui/qt4/controlPanel/WPropertyStringWidget.cpp
src/qt4gui/qt4/controlPanel/WPropertyStringWidget.cpp
+0
-1
src/qt4gui/qt4/controlPanel/WPropertyTransferFunctionWidget.cpp
...4gui/qt4/controlPanel/WPropertyTransferFunctionWidget.cpp
+0
-1
No files found.
src/core/common/WAssert.cpp
View file @
27c61c02
...
...
@@ -24,7 +24,7 @@
#include <string>
#include
<boost/lexical_cast.hpp>
#include
"WStringUtils.h"
#include "WAssert.h"
...
...
@@ -39,7 +39,7 @@ void wAssertFailed( std::string const& expression, std::string const& file, std:
std
::
cerr
<<
std
::
endl
;
abort
();
#else
std
::
string
s
=
"Assertion failed: "
+
expression
+
" (in file "
+
file
+
" at line "
+
boost
::
lexical_cast
<
std
::
string
>
(
line
)
+
")"
;
std
::
string
s
=
"Assertion failed: "
+
expression
+
" (in file "
+
file
+
" at line "
+
string_utils
::
toString
(
line
)
+
")"
;
if
(
!
msg
.
empty
()
)
{
s
+=
", Message: "
+
msg
;
...
...
src/core/common/WColor.cpp
View file @
27c61c02
...
...
@@ -26,7 +26,6 @@
#include <string>
#include <vector>
#include <boost/lexical_cast.hpp>
#include "../common/exceptions/WOutOfBounds.h"
#include "../common/WStringUtils.h"
...
...
src/core/common/WItemSelector.cpp
View file @
27c61c02
...
...
@@ -25,8 +25,6 @@
#include <string>
#include <vector>
#include <boost/lexical_cast.hpp>
#include "WStringUtils.h"
#include "WItemSelection.h"
...
...
@@ -91,7 +89,7 @@ WItemSelector WItemSelector::newSelector( const std::string asString ) const
IndexList
l
;
for
(
size_t
i
=
0
;
i
<
tokens
.
size
();
++
i
)
{
l
.
push_back
(
boost
::
lexical_cast
<
size_t
>
(
tokens
[
i
]
)
);
l
.
push_back
(
string_utils
::
fromString
<
size_t
>
(
tokens
[
i
]
)
);
}
return
createSelector
(
l
);
...
...
src/core/common/WPropertyGroup.cpp
View file @
27c61c02
...
...
@@ -28,7 +28,6 @@
#include <vector>
#include <algorithm>
#include <boost/lexical_cast.hpp>
#include <boost/tokenizer.hpp>
#include "WLogger.h"
...
...
src/core/common/WPropertyGroupBase.cpp
View file @
27c61c02
...
...
@@ -28,9 +28,9 @@
#include <vector>
#include <algorithm>
#include <boost/lexical_cast.hpp>
#include <boost/tokenizer.hpp>
#include "WStringUtils.h"
#include "WLogger.h"
#include "exceptions/WPropertyUnknown.h"
#include "exceptions/WPropertyNotUnique.h"
...
...
@@ -129,7 +129,7 @@ boost::shared_ptr< WPropertyBase > WPropertyGroupBase::findProperty( std::string
}
// get the properties along the path
result
=
findProperty
(
curProps
,
boost
::
lexical_cast
<
std
::
string
>
(
*
it
)
);
result
=
findProperty
(
curProps
,
string_utils
::
toString
(
*
it
)
);
if
(
!
result
)
{
// not found? Return NULL.
...
...
src/core/common/WPropertyTypes.cpp
View file @
27c61c02
...
...
@@ -25,6 +25,7 @@
#include <string>
#include <vector>
#include "WStringUtils.h"
#include "WPropertyTypes.h"
#include "WTransferFunction.h"
...
...
@@ -91,16 +92,17 @@ namespace PROPERTY_TYPE_HELPER
{
if
(
innerTokens
[
0
]
==
"c"
)
{
tf
.
addColor
(
boost
::
lexical_cast
<
double
>
(
innerTokens
[
1
].
c_str
()
),
// isovalue
WColor
(
boost
::
lexical_cast
<
double
>
(
innerTokens
[
2
].
c_str
()
),
// red
boost
::
lexical_cast
<
double
>
(
innerTokens
[
3
].
c_str
()
),
// green
boost
::
lexical_cast
<
double
>
(
innerTokens
[
4
].
c_str
()
),
// blue
1.
)
);
// blue
tf
.
addColor
(
string_utils
::
fromString
<
double
>
(
innerTokens
[
1
].
c_str
()
),
// isovalue
WColor
(
string_utils
::
fromString
<
double
>
(
innerTokens
[
2
].
c_str
()
),
// red
string_utils
::
fromString
<
double
>
(
innerTokens
[
3
].
c_str
()
),
// green
string_utils
::
fromString
<
double
>
(
innerTokens
[
4
].
c_str
()
),
// blue
1.
)
);
// blue
}
else
if
(
innerTokens
[
0
]
==
"a"
)
{
tf
.
addAlpha
(
boost
::
lexical_cast
<
double
>
(
innerTokens
[
1
].
c_str
()
),
boost
::
lexical_cast
<
double
>
(
innerTokens
[
2
].
c_str
()
)
);
tf
.
addAlpha
(
string_utils
::
fromString
<
double
>
(
innerTokens
[
1
].
c_str
()
),
string_utils
::
fromString
<
double
>
(
innerTokens
[
2
].
c_str
()
)
);
}
idx
++
;
}
...
...
src/core/common/WPropertyTypes.h
View file @
27c61c02
...
...
@@ -33,8 +33,8 @@
#include <utility>
#include <boost/filesystem.hpp>
#include <boost/lexical_cast.hpp>
#include "WStringUtils.h"
#include "math/linearAlgebra/WLinearAlgebra.h"
#include "math/linearAlgebra/WMatrixFixed.h"
#include "math/linearAlgebra/WVectorFixed.h"
...
...
@@ -308,7 +308,7 @@ namespace PROPERTY_TYPE_HELPER
/**
* Class helping to create a new instance of the property content from an old one. This might be needed by some types (some need to have a
* predecessor for creation).
* You only need to specialize this class for types not allowing the direct use of
boost::lexical_cast.
* You only need to specialize this class for types not allowing the direct use of
string_utils::fromString
*/
template
<
typename
T
>
class
WStringConversion
...
...
@@ -323,7 +323,7 @@ namespace PROPERTY_TYPE_HELPER
*/
T
create
(
const
T
&
/*old*/
,
const
std
::
string
str
)
{
return
boost
::
lexical_cast
<
T
>
(
str
);
return
string_utils
::
fromString
<
T
>
(
str
);
}
/**
...
...
@@ -335,7 +335,7 @@ namespace PROPERTY_TYPE_HELPER
*/
std
::
string
asString
(
const
T
&
v
)
{
return
boost
::
lexical_cast
<
std
::
string
>
(
v
);
return
string_utils
::
toString
(
v
);
}
};
...
...
@@ -477,7 +477,7 @@ namespace PROPERTY_TYPE_HELPER
*/
std
::
string
asString
(
const
WPVBaseTypes
::
PV_SELECTION
&
v
)
{
return
boost
::
lexical_cast
<
std
::
string
>
(
v
);
return
string_utils
::
toString
(
v
);
}
};
...
...
@@ -580,7 +580,7 @@ namespace PROPERTY_TYPE_HELPER
{
for
(
size_t
col
=
0
;
col
<
4
;
++
col
)
{
c
(
row
,
col
)
=
boost
::
lexical_cast
<
double
>
(
tokens
[
idx
]
);
c
(
row
,
col
)
=
string_utils
::
fromString
<
double
>
(
tokens
[
idx
]
);
idx
++
;
}
}
...
...
@@ -679,7 +679,7 @@ namespace PROPERTY_TYPE_HELPER
size_t
idx
=
0
;
for
(
size_t
col
=
0
;
col
<
3
;
++
col
)
{
c
[
col
]
=
boost
::
lexical_cast
<
double
>
(
tokens
[
idx
]
);
c
[
col
]
=
string_utils
::
fromString
<
double
>
(
tokens
[
idx
]
);
idx
++
;
}
return
c
;
...
...
src/core/common/WPropertyVariable.h
View file @
27c61c02
...
...
@@ -598,7 +598,7 @@ bool WPropertyVariable< T >::setAsString( std::string value )
PROPERTY_TYPE_HELPER
::
WStringConversion
<
T
>
h
=
PROPERTY_TYPE_HELPER
::
WStringConversion
<
T
>
();
return
set
(
h
.
create
(
WFlag
<
T
>::
get
(),
value
)
);
}
catch
(
const
boost
::
bad_lexical_cast
&
e
)
catch
(
const
std
::
exception
&
e
)
{
return
false
;
}
...
...
src/core/common/WSegmentationFault.h
View file @
27c61c02
...
...
@@ -32,8 +32,7 @@
#include <string>
#include <boost/lexical_cast.hpp>
#include "WStringUtils.h"
#include "WException.h"
...
...
@@ -64,7 +63,7 @@ private:
static
void
SignalHandler
(
int
signum
)
{
throw
SignalExceptionClass
(
std
::
string
(
"SIGNAL: "
)
+
boost
::
lexical_cast
<
std
::
string
>
(
signum
)
);
string_utils
::
toString
(
signum
)
);
}
};
};
...
...
src/core/common/WStringUtils.h
View file @
27c61c02
...
...
@@ -35,7 +35,6 @@
#include <string>
#include <vector>
#include <boost/lexical_cast.hpp>
...
...
@@ -59,6 +58,39 @@
*/
namespace
string_utils
{
/**
* Convert a given value to a string. The input value must provide a operator<< or be a standard scalar type.
*
* \tparam T the source type. You do not need to specify this directly as it can be deducted from the given parameter
* \param value the value to cast to string
*
* \return the string.
*/
template
<
typename
T
>
inline
std
::
string
toString
(
const
T
&
value
)
{
std
::
stringstream
ss
;
ss
<<
value
;
return
ss
.
str
();
}
/**
* Convert a given string to a value of a certain type. The target type must provide a operator>> to work or be a standard scalar type.
*
* \tparam T the source type.
* \param value the value to cast to string
*
* \return the string.
*/
template
<
typename
T
>
inline
T
fromString
(
const
std
::
string
&
str
)
{
std
::
stringstream
ss
(
str
);
T
value
;
ss
>>
value
;
return
value
;
}
/** We consider the following characters as whitespace:
* - <tt>\\r</tt> carriage return
* - <tt>\\n</tt> newline
...
...
@@ -153,7 +185,7 @@ namespace string_utils
* Also wrapping brackets '[' ']' are expected. In general this is the opposite of the
* output operator above.
* \warning The inputstream is first written into a string then the convertion into T
* via
boost::lexical_cast
takes place.
* via
fromString
takes place.
* \warning The delimiter should not be in an elements string representation since then
* the tokenizer may gets confused
*
...
...
@@ -172,7 +204,7 @@ namespace string_utils
v
.
reserve
(
tokens
.
size
()
);
for
(
size_t
i
=
0
;
i
<
tokens
.
size
();
++
i
)
{
v
.
push_back
(
boost
::
lexical_cast
<
T
>
(
tokens
[
i
]
)
);
v
.
push_back
(
fromString
<
T
>
(
tokens
[
i
]
)
);
}
return
in
;
}
...
...
@@ -210,39 +242,6 @@ namespace string_utils
os
<<
rTrim
(
result
.
str
(),
", "
)
<<
"}"
;
return
os
;
}
/**
* Convert a given value to a string. The input value must provide a operator<< or be a standard scalar type.
*
* \tparam T the source type. You do not need to specify this directly as it can be deducted from the given parameter
* \param value the value to cast to string
*
* \return the string.
*/
template
<
typename
T
>
inline
std
::
string
toString
(
const
T
&
value
)
{
std
::
stringstream
ss
;
ss
<<
value
;
return
ss
.
str
();
}
/**
* Convert a given string to a value of a certain type. The target type must provide a operator>> to work or be a standard scalar type.
*
* \tparam T the source type.
* \param value the value to cast to string
*
* \return the string.
*/
template
<
typename
T
>
inline
T
fromString
(
const
std
::
string
&
str
)
{
std
::
stringstream
ss
(
str
);
T
value
;
ss
>>
value
;
return
value
;
}
}
// end of namespace
#endif // WSTRINGUTILS_H
src/core/common/math/linearAlgebra/WMatrixFixed.h
View file @
27c61c02
...
...
@@ -29,7 +29,6 @@
#include <algorithm>
#include <boost/static_assert.hpp>
#include <boost/lexical_cast.hpp>
#include <boost/tokenizer.hpp>
// Needed for conversion: OSG Types
...
...
@@ -975,8 +974,8 @@ public:
{
if
(
(
row
>=
Rows
)
||
(
col
>=
Cols
)
)
{
throw
WOutOfBounds
(
"Index pair ("
+
boost
::
lexical_cast
<
std
::
string
>
(
row
)
+
", "
+
boost
::
lexical_cast
<
std
::
string
>
(
col
)
+
") is invalid for "
+
boost
::
lexical_cast
<
std
::
string
>
(
Rows
)
+
"x"
+
boost
::
lexical_cast
<
std
::
string
>
(
Cols
)
+
throw
WOutOfBounds
(
"Index pair ("
+
string_utils
::
toString
(
row
)
+
", "
+
string_utils
::
toString
(
col
)
+
") is invalid for "
+
string_utils
::
toString
(
Rows
)
+
"x"
+
string_utils
::
toString
(
Cols
)
+
" matrix."
);
}
return
operator
()(
row
,
col
);
...
...
@@ -998,8 +997,8 @@ public:
{
if
(
(
row
>=
Rows
)
||
(
col
>=
Cols
)
)
{
throw
WOutOfBounds
(
"Index pair ("
+
boost
::
lexical_cast
<
std
::
string
>
(
row
)
+
", "
+
boost
::
lexical_cast
<
std
::
string
>
(
col
)
+
") is invalid for "
+
boost
::
lexical_cast
<
std
::
string
>
(
Rows
)
+
"x"
+
boost
::
lexical_cast
<
std
::
string
>
(
Cols
)
+
throw
WOutOfBounds
(
"Index pair ("
+
string_utils
::
toString
(
row
)
+
", "
+
string_utils
::
toString
(
col
)
+
") is invalid for "
+
string_utils
::
toString
(
Rows
)
+
"x"
+
string_utils
::
toString
(
Cols
)
+
" matrix."
);
}
return
operator
()(
row
,
col
);
...
...
@@ -1460,7 +1459,7 @@ std::istream& operator>>( std::istream& in, WMatrixFixed< ValueT, Rows, Cols, Va
{
return
in
;
}
m
(
row
,
col
)
=
boost
::
lexical_cast
<
ValueT
>
(
*
it
);
m
(
row
,
col
)
=
string_utils
::
fromString
<
ValueT
>
(
*
it
);
++
it
;
}
}
...
...
src/core/dataHandler/WDataHandler.cpp
View file @
27c61c02
...
...
@@ -26,12 +26,12 @@
#include <string>
#include <vector>
#include <boost/lexical_cast.hpp>
#include "WSubject.h"
#include "exceptions/WDHNoSuchSubject.h"
#include "../common/WLogger.h"
#include "../common/WStringUtils.h"
#include "WDataHandler.h"
...
...
@@ -52,7 +52,7 @@ WDataHandler::~WDataHandler()
void
WDataHandler
::
addSubject
(
boost
::
shared_ptr
<
WSubject
>
subject
)
{
WLogger
::
getLogger
()
->
addLogMessage
(
"Adding subject with ID
\"
"
+
boost
::
lexical_cast
<
std
::
string
>
(
subject
->
getPersonalInformation
().
getSubjectID
()
)
+
"
\"
and Name
\"
"
string_utils
::
toString
(
subject
->
getPersonalInformation
().
getSubjectID
()
)
+
"
\"
and Name
\"
"
+
subject
->
getName
()
+
"
\"
."
,
"Data Handler"
,
LL_DEBUG
);
...
...
@@ -65,7 +65,7 @@ void WDataHandler::removeSubject( boost::shared_ptr< WSubject > subject )
SubjectSharedContainerType
::
WriteTicket
l
=
m_subjects
.
getWriteTicket
();
WLogger
::
getLogger
()
->
addLogMessage
(
"Removing subject with ID
\"
"
+
boost
::
lexical_cast
<
std
::
string
>
(
subject
->
getPersonalInformation
().
getSubjectID
()
)
+
"
\"
and Name
\"
"
string_utils
::
toString
(
subject
->
getPersonalInformation
().
getSubjectID
()
)
+
"
\"
and Name
\"
"
+
subject
->
getName
()
+
"
\"
."
,
"Data Handler"
,
LL_DEBUG
);
...
...
@@ -91,7 +91,7 @@ void WDataHandler::clear()
++
iter
)
{
WLogger
::
getLogger
()
->
addLogMessage
(
"Removing subject
\"
"
+
boost
::
lexical_cast
<
std
::
string
>
(
(
*
iter
)
->
getPersonalInformation
().
getSubjectID
()
)
+
"
\"
."
,
string_utils
::
toString
(
(
*
iter
)
->
getPersonalInformation
().
getSubjectID
()
)
+
"
\"
."
,
"Data Handler"
,
LL_DEBUG
);
(
*
iter
)
->
clear
();
...
...
src/core/dataHandler/WDataSetFibers.cpp
View file @
27c61c02
...
...
@@ -29,7 +29,6 @@
#include <vector>
#include <boost/filesystem/fstream.hpp>
#include <boost/lexical_cast.hpp>
#include "../common/datastructures/WFiber.h"
#include "../common/WBoundingBox.h"
...
...
src/core/dataHandler/WSubject.cpp
View file @
27c61c02
...
...
@@ -25,7 +25,6 @@
#include <string>
#include <vector>
#include <boost/lexical_cast.hpp>
#include "../common/WLogger.h"
...
...
src/core/dataHandler/io/WReaderMatrixSymVTK.cpp
View file @
27c61c02
...
...
@@ -27,7 +27,6 @@
#include <string>
#include <vector>
#include <boost/lexical_cast.hpp>
#include <boost/shared_ptr.hpp>
#include "../../common/WAssert.h"
...
...
@@ -105,9 +104,9 @@ void WReaderMatrixSymVTK::readTable( boost::shared_ptr< std::vector< double > >
}
try
{
numDistances
=
boost
::
lexical_cast
<
size_t
>
(
tokens
.
at
(
1
)
);
numDistances
=
string_utils
::
fromString
<
size_t
>
(
tokens
.
at
(
1
)
);
}
catch
(
const
boost
::
bad_lexical_cast
&
e
)
catch
(
const
std
::
exception
&
e
)
{
throw
WDHException
(
std
::
string
(
"Invalid number of elements: "
+
tokens
.
at
(
1
)
)
);
}
...
...
src/core/graphicsEngine/WGEColormapping.cpp
View file @
27c61c02
...
...
@@ -28,6 +28,8 @@
#include <string>
#include "../common/WLogger.h"
#include "../common/WStringUtils.h"
#include "WGETextureUtils.h"
#include "exceptions/WGESignalSubscriptionFailed.h"
...
...
@@ -50,8 +52,8 @@ void setDefines( osg::ref_ptr< WGEShader > shader, size_t start = 0 )
// disable textures with invalid unit numbers
if
(
unit
<
wge
::
getMaxTexUnits
()
-
start
)
{
shader
->
setDefine
(
"Colormap"
+
boost
::
lexical_cast
<
std
::
string
>
(
unit
)
+
"Enabled"
,
true
);
shader
->
setDefine
(
"Colormap"
+
boost
::
lexical_cast
<
std
::
string
>
(
unit
)
+
"Unit"
,
start
+
unit
);
shader
->
setDefine
(
"Colormap"
+
string_utils
::
toString
(
unit
)
+
"Enabled"
,
true
);
shader
->
setDefine
(
"Colormap"
+
string_utils
::
toString
(
unit
)
+
"Unit"
,
start
+
unit
);
}
}
}
...
...
@@ -282,7 +284,7 @@ void WGEColormapping::callback( osg::Node* node )
(
unit
<
maxTexUnits
)
&&
(
iter
!=
rt
->
get
().
end
()
);
++
iter
)
{
wge
::
bindTexture
(
node
,
*
iter
,
unit
,
"u_colormap"
+
boost
::
lexical_cast
<
std
::
string
>
(
unit
-
info
->
m_texUnitStart
)
);
wge
::
bindTexture
(
node
,
*
iter
,
unit
,
"u_colormap"
+
string_utils
::
toString
(
unit
-
info
->
m_texUnitStart
)
);
unit
++
;
}
...
...
src/core/graphicsEngine/WGEGeodeUtils.cpp
View file @
27c61c02
...
...
@@ -39,6 +39,8 @@
#include "../common/math/linearAlgebra/WLinearAlgebra.h"
#include "../common/math/WMath.h"
#include "../common/WPathHelper.h"
#include "../common/WStringUtils.h"
#include "shaders/WGEShader.h"
#include "WGEGeodeUtils.h"
#include "WGEGeometryUtils.h"
...
...
@@ -410,8 +412,8 @@ osg::ref_ptr< osg::PositionAttitudeTransform > wge::addLabel( osg::Vec3 position
osg
::
ref_ptr
<
osg
::
PositionAttitudeTransform
>
wge
::
vector2label
(
osg
::
Vec3
position
)
{
std
::
string
label
=
"("
+
boost
::
lexical_cast
<
std
::
string
>
(
position
[
0
]
)
+
","
+
boost
::
lexical_cast
<
std
::
string
>
(
position
[
1
]
)
+
","
+
boost
::
lexical_cast
<
std
::
string
>
(
position
[
2
]
)
+
")"
;
std
::
string
label
=
"("
+
string_utils
::
toString
(
position
[
0
]
)
+
","
+
string_utils
::
toString
(
position
[
1
]
)
+
","
+
string_utils
::
toString
(
position
[
2
]
)
+
")"
;
return
(
addLabel
(
position
,
label
)
);
}
...
...
src/core/graphicsEngine/WGEProjectFileIO.cpp
View file @
27c61c02
...
...
@@ -25,12 +25,13 @@
#include <string>
#include <boost/regex.hpp>
#include <boost/lexical_cast.hpp>
#include <boost/tokenizer.hpp>
#include <osg/Camera>
#include "../common/WLogger.h"
#include "../common/WStringUtils.h"
#include "WGraphicsEngine.h"
#include "WGEViewer.h"
...
...
@@ -68,7 +69,7 @@ double* parseDoubleSequence( std::string seq, unsigned int size )
unsigned
int
i
=
0
;
for
(
tokenizer
::
iterator
it
=
tok
.
begin
();
(
it
!=
tok
.
end
()
)
&&
(
i
<
size
);
++
it
)
{
values
[
i
]
=
boost
::
lexical_cast
<
double
>
(
(
*
it
)
);
values
[
i
]
=
string_utils
::
fromString
<
double
>
(
(
*
it
)
);
++
i
;
}
...
...
@@ -119,7 +120,7 @@ bool WGEProjectFileIO::parse( std::string line, unsigned int lineNumber )
wlog
::
debug
(
"Project Loader [Parser]"
)
<<
"Line "
<<
lineNumber
<<
": Camera
\"
"
<<
matches
[
2
]
<<
"
\"
with ID "
<<
matches
[
1
];
// store it
m_cameras
[
boost
::
lexical_cast
<
unsigned
int
>
(
matches
[
1
]
)
]
=
matches
[
2
];
m_cameras
[
string_utils
::
fromString
<
unsigned
int
>
(
matches
[
1
]
)
]
=
matches
[
2
];
return
true
;
}
...
...
@@ -131,8 +132,8 @@ bool WGEProjectFileIO::parse( std::string line, unsigned int lineNumber )
wlog
::
debug
(
"Project Loader [Parser]"
)
<<
"Line "
<<
lineNumber
<<
": Camera Manipulator Matrix with ID "
<<
matches
[
1
];
// is there already a matrix for this camera? -> we do not care :-). Overwrite it.
m_manipulatorMatrices
[
boost
::
lexical_cast
<
unsigned
int
>
(
matches
[
1
]
)
]
=
osg
::
Matrixd
(
parseMatrix
(
boost
::
lexical_cast
<
std
::
string
>
(
matches
[
2
]
)
)
);
m_manipulatorMatrices
[
string_utils
::
fromString
<
unsigned
int
>
(
matches
[
1
]
)
]
=
osg
::
Matrixd
(
parseMatrix
(
string_utils
::
toString
(
matches
[
2
]
)
)
);
return
true
;
}
...
...
@@ -145,8 +146,8 @@ bool WGEProjectFileIO::parse( std::string line, unsigned int lineNumber )
wlog
::
debug
(
"Project Loader [Parser]"
)
<<
"Line "
<<
lineNumber
<<
": Camera Manipulator Home Eye Point with ID "
<<
matches
[
1
];
// is there already a vector set? -> ignore.
double
*
vals
=
parseVector
(
boost
::
lexical_cast
<
std
::
string
>
(
matches
[
2
]
)
);
m_homeEyeVectors
[
boost
::
lexical_cast
<
unsigned
int
>
(
matches
[
1
]
)
]
=
osg
::
Vec3d
(
vals
[
0
],
vals
[
1
],
vals
[
2
]
);
double
*
vals
=
parseVector
(
string_utils
::
toString
(
matches
[
2
]
)
);
m_homeEyeVectors
[
string_utils
::
fromString
<
unsigned
int
>
(
matches
[
1
]
)
]
=
osg
::
Vec3d
(
vals
[
0
],
vals
[
1
],
vals
[
2
]
);
return
true
;
}
...
...
@@ -159,8 +160,8 @@ bool WGEProjectFileIO::parse( std::string line, unsigned int lineNumber )
wlog
::
debug
(
"Project Loader [Parser]"
)
<<
"Line "
<<
lineNumber
<<
": Camera Manipulator Home Center Point with ID "
<<
matches
[
1
];
// is there already a vector set? -> ignore.
double
*
vals
=
parseVector
(
boost
::
lexical_cast
<
std
::
string
>
(
matches
[
2
]
)
);
m_homeCenterVectors
[
boost
::
lexical_cast
<
unsigned
int
>
(
matches
[
1
]
)
]
=
osg
::
Vec3d
(
vals
[
0
],
vals
[
1
],
vals
[
2
]
);
double
*
vals
=
parseVector
(
string_utils
::
toString
(
matches
[
2
]
)
);
m_homeCenterVectors
[
string_utils
::
fromString
<
unsigned
int
>
(
matches
[
1
]
)
]
=
osg
::
Vec3d
(
vals
[
0
],
vals
[
1
],
vals
[
2
]
);
return
true
;
}
...
...
@@ -173,8 +174,8 @@ bool WGEProjectFileIO::parse( std::string line, unsigned int lineNumber )
wlog
::
debug
(
"Project Loader [Parser]"
)
<<
"Line "
<<
lineNumber
<<
": Camera Manipulator Home Up Point with ID "
<<
matches
[
1
];
// is there already a vector set? -> ignore.
double
*
vals
=
parseVector
(
boost
::
lexical_cast
<
std
::
string
>
(
matches
[
2
]
)
);
m_homeUpVectors
[
boost
::
lexical_cast
<
unsigned
int
>
(
matches
[
1
]
)
]
=
osg
::
Vec3d
(
vals
[
0
],
vals
[
1
],
vals
[
2
]
);
double
*
vals
=
parseVector
(
string_utils
::
toString
(
matches
[
2
]
)
);
m_homeUpVectors
[
string_utils
::
fromString
<
unsigned
int
>
(
matches
[
1
]
)
]
=
osg
::
Vec3d
(
vals
[
0
],
vals
[
1
],
vals
[
2
]
);
return
true
;
}
...
...
src/core/graphicsEngine/WGETexture.h
View file @
27c61c02
...
...
@@ -27,7 +27,6 @@
#include <string>
#include <boost/lexical_cast.hpp>
#include <boost/shared_ptr.hpp>
#include <osg/Node>
...
...
src/core/graphicsEngine/WGETextureUtils.h
View file @
27c61c02
...
...
@@ -34,13 +34,11 @@
#include <osg/Texture2D>
#include <osg/Texture3D>
#include
<boost/lexical_cast.hpp>
#include
"../common/WStringUtils.h"
#include "shaders/WGEPropertyUniform.h"
#include "callbacks/WGEPropertyTransformationCallback.h"
template
<
typename
T
>
class
WGETexture
;
class
WDataTexture3D
;
...
...
@@ -148,7 +146,7 @@ void wge::bindTexture( osg::ref_ptr< osg::Node > node, osg::ref_ptr< T > texture
{
if
(
prefix
==
""
)
{
prefix
=
"u_texture"
+
boost
::
lexical_cast
<
std
::
string
>
(
unit
);
prefix
=
"u_texture"
+
string_utils
::
toString
(
unit
);
}
osg
::
StateSet
*
state
=
node
->
getOrCreateStateSet
();
...
...
@@ -165,7 +163,7 @@ void wge::bindTexture( osg::ref_ptr< osg::Node > node, osg::ref_ptr< WGETexture<
{
if
(
prefix
==
""
)
{
prefix
=
"u_texture"
+
boost
::
lexical_cast
<
std
::
string
>
(
unit
);
prefix
=
"u_texture"
+
string_utils
::
toString
(
unit
);
}
wge
::
bindTexture
<
T
>
(
node
,
osg
::
ref_ptr
<
T
>
(
texture
),
unit
,
prefix
);
...
...
src/core/graphicsEngine/WGEUtils.h
View file @
27c61c02
...
...
@@ -28,7 +28,6 @@
#include <string>
#include <vector>
#include <boost/lexical_cast.hpp>
#include <osg/Array>
#include <osg/Vec3>
...
...
src/core/graphicsEngine/offscreen/WGEOffscreenRenderPass.cpp
View file @
27c61c02
...
...
@@ -24,7 +24,6 @@
#include <string>
#include <boost/lexical_cast.hpp>
#include <osg/Texture>
#include <osg/Texture2D>
...
...
src/core/graphicsEngine/shaders/WGEShader.cpp
View file @
27c61c02
...
...
@@ -31,7 +31,6 @@
#include <boost/algorithm/string.hpp>
#include <boost/filesystem.hpp>
#include <boost/function.hpp>
#include <boost/lexical_cast.hpp>
#include <boost/regex.hpp>
#include <boost/signals2/signal.hpp>
#include <boost/tokenizer.hpp>
...
...
src/core/graphicsEngine/shaders/WGEShaderDefine.h
View file @
27c61c02
...
...
@@ -29,7 +29,6 @@
#include &l