Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
OpenWalnut
OpenWalnut Core
Commits
e8991c64
Commit
e8991c64
authored
Feb 06, 2012
by
Sebastian Eichelbaum
Browse files
[FIX
#129
] switched completely to filesystem 3.
parent
ca5a285d
Changes
47
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
26 additions
and
82 deletions
+26
-82
src/core/common/WIOTools.cpp
src/core/common/WIOTools.cpp
+4
-8
src/core/common/WIOTools.h
src/core/common/WIOTools.h
+10
-5
src/core/common/WPathHelper.h
src/core/common/WPathHelper.h
+0
-4
src/core/common/WPropertyBase.cpp
src/core/common/WPropertyBase.cpp
+0
-4
src/core/common/WPropertyTypes.h
src/core/common/WPropertyTypes.h
+0
-4
src/core/common/WSharedLib.cpp
src/core/common/WSharedLib.cpp
+1
-5
src/core/common/WSharedLib.h
src/core/common/WSharedLib.h
+0
-4
src/core/common/test/WIOTools_test.h
src/core/common/test/WIOTools_test.h
+1
-1
src/core/dataHandler/WDataSetFibers.cpp
src/core/dataHandler/WDataSetFibers.cpp
+0
-4
src/core/dataHandler/io/WWriter.cpp
src/core/dataHandler/io/WWriter.cpp
+0
-4
src/core/dataHandler/io/WWriterDendrogram.cpp
src/core/dataHandler/io/WWriterDendrogram.cpp
+1
-5
src/core/dataHandler/io/WWriterDendrogram.h
src/core/dataHandler/io/WWriterDendrogram.h
+0
-4
src/core/dataHandler/io/WWriterFiberVTK.cpp
src/core/dataHandler/io/WWriterFiberVTK.cpp
+1
-5
src/core/dataHandler/io/WWriterFiberVTK.h
src/core/dataHandler/io/WWriterFiberVTK.h
+0
-4
src/core/graphicsEngine/WGEGeodeUtils.cpp
src/core/graphicsEngine/WGEGeodeUtils.cpp
+1
-1
src/core/graphicsEngine/WGETextureHud.cpp
src/core/graphicsEngine/WGETextureHud.cpp
+1
-1
src/core/graphicsEngine/shaders/WGEShader.cpp
src/core/graphicsEngine/shaders/WGEShader.cpp
+5
-9
src/core/graphicsEngine/shaders/WGEShader.h
src/core/graphicsEngine/shaders/WGEShader.h
+0
-4
src/core/graphicsEngine/widgets/labeling/WGELabel.cpp
src/core/graphicsEngine/widgets/labeling/WGELabel.cpp
+1
-1
src/core/kernel/WKernel.cpp
src/core/kernel/WKernel.cpp
+0
-5
No files found.
src/core/common/WIOTools.cpp
View file @
e8991c64
...
...
@@ -26,10 +26,6 @@
#include <streambuf>
#include <string>
// Use filesystem version 2 for compatibility with newer boost versions.
#ifndef BOOST_FILESYSTEM_VERSION
#define BOOST_FILESYSTEM_VERSION 2
#endif
#include <boost/filesystem.hpp>
#include "exceptions/WFileNotFound.h"
...
...
@@ -43,11 +39,11 @@ std::string readFileIntoString( const std::string& name )
std
::
string
readFileIntoString
(
const
boost
::
filesystem
::
path
&
path
)
{
std
::
string
filename
=
path
.
file_
string
();
std
::
string
filename
=
path
.
string
();
std
::
ifstream
input
(
filename
.
c_str
()
);
if
(
!
input
.
is_open
()
)
{
throw
WFileNotFound
(
std
::
string
(
"The file
\"
"
)
+
boost
::
filesystem
::
complete
(
path
).
file_
string
()
+
std
::
string
(
"
\"
does not exist."
)
);
throw
WFileNotFound
(
std
::
string
(
"The file
\"
"
)
+
path
.
string
()
+
std
::
string
(
"
\"
does not exist."
)
);
}
// preallocate space for the string.
...
...
@@ -69,10 +65,10 @@ void writeStringIntoFile( const std::string& name, const std::string& content )
void
writeStringIntoFile
(
const
boost
::
filesystem
::
path
&
path
,
const
std
::
string
&
content
)
{
std
::
ofstream
outfile
(
path
.
file_
string
().
c_str
()
);
std
::
ofstream
outfile
(
path
.
string
().
c_str
()
);
if
(
!
outfile
.
is_open
()
)
{
throw
WFileOpenFailed
(
"The file
\"
"
+
boost
::
filesystem
::
complete
(
path
).
file_
string
()
+
"
\"
could not be opened."
);
throw
WFileOpenFailed
(
"The file
\"
"
+
path
.
string
()
+
"
\"
could not be opened."
);
}
outfile
<<
content
<<
std
::
flush
;
...
...
src/core/common/WIOTools.h
View file @
e8991c64
...
...
@@ -30,10 +30,6 @@
#include <algorithm>
#include <string>
// Use filesystem version 2 for compatibility with newer boost versions.
#ifndef BOOST_FILESYSTEM_VERSION
#define BOOST_FILESYSTEM_VERSION 2
#endif
#include <boost/filesystem.hpp>
#include "WExportCommon.h"
...
...
@@ -92,13 +88,22 @@ template< class T > void switchByteOrderOfArray( T *array, const size_t arraySiz
}
}
/**
* \param name File name to get the extension or suffix from.
* \return filename suffix
*/
inline
std
::
string
getSuffix
(
boost
::
filesystem
::
path
name
)
{
return
name
.
extension
().
string
();
}
/**
* \param name File name to get the extension or suffix from.
* \return filename suffix
*/
inline
std
::
string
getSuffix
(
std
::
string
name
)
{
return
boost
::
filesystem
::
path
(
name
)
.
extension
(
);
return
getSuffix
(
boost
::
filesystem
::
path
(
name
)
);
}
/**
...
...
src/core/common/WPathHelper.h
View file @
e8991c64
...
...
@@ -27,10 +27,6 @@
#include <vector>
// Use filesystem version 2 for compatibility with newer boost versions.
#ifndef BOOST_FILESYSTEM_VERSION
#define BOOST_FILESYSTEM_VERSION 2
#endif
#include <boost/filesystem.hpp>
#include <boost/shared_ptr.hpp>
...
...
src/core/common/WPropertyBase.cpp
View file @
e8991c64
...
...
@@ -25,10 +25,6 @@
#include <list>
#include <string>
// Use filesystem version 2 for compatibility with newer boost versions.
#ifndef BOOST_FILESYSTEM_VERSION
#define BOOST_FILESYSTEM_VERSION 2
#endif
#include <boost/filesystem.hpp>
#include "exceptions/WPropertyNameMalformed.h"
...
...
src/core/common/WPropertyTypes.h
View file @
e8991c64
...
...
@@ -32,10 +32,6 @@
#include <vector>
#include <utility>
// Use filesystem version 2 for compatibility with newer boost versions.
#ifndef BOOST_FILESYSTEM_VERSION
#define BOOST_FILESYSTEM_VERSION 2
#endif
#include <boost/filesystem.hpp>
#include <boost/lexical_cast.hpp>
...
...
src/core/common/WSharedLib.cpp
View file @
e8991c64
...
...
@@ -31,10 +31,6 @@
#include <windows.h> // NOLINT
#endif
// Use filesystem version 2 for compatibility with newer boost versions.
#ifndef BOOST_FILESYSTEM_VERSION
#define BOOST_FILESYSTEM_VERSION 2
#endif
#include <boost/filesystem.hpp>
#include "exceptions/WLibraryFetchFailed.h"
...
...
@@ -243,7 +239,7 @@ struct WSharedLib::data
#endif
WSharedLib
::
WSharedLib
(
boost
::
filesystem
::
path
lib
)
:
m_data
(
new
data
(
lib
.
native_file_
string
()
)
)
m_data
(
new
data
(
lib
.
string
()
)
)
{
}
...
...
src/core/common/WSharedLib.h
View file @
e8991c64
...
...
@@ -28,10 +28,6 @@
#include <algorithm>
#include <string>
// Use filesystem version 2 for compatibility with newer boost versions.
#ifndef BOOST_FILESYSTEM_VERSION
#define BOOST_FILESYSTEM_VERSION 2
#endif
#include <boost/filesystem.hpp>
#include "WExportCommon.h"
...
...
src/core/common/test/WIOTools_test.h
View file @
e8991c64
...
...
@@ -105,7 +105,7 @@ public:
boost
::
filesystem
::
path
fpath
=
tempFileName
();
writeStringIntoFile
(
fpath
,
content
);
std
::
ifstream
input
(
fpath
.
file_
string
().
c_str
()
);
std
::
ifstream
input
(
fpath
.
string
().
c_str
()
);
std
::
string
actual
;
actual
.
assign
(
(
std
::
istreambuf_iterator
<
char
>
(
input
)
),
std
::
istreambuf_iterator
<
char
>
()
);
input
.
close
();
...
...
src/core/dataHandler/WDataSetFibers.cpp
View file @
e8991c64
...
...
@@ -28,10 +28,6 @@
#include <utility>
#include <vector>
// Use filesystem version 2 for compatibility with newer boost versions.
#ifndef BOOST_FILESYSTEM_VERSION
#define BOOST_FILESYSTEM_VERSION 2
#endif
#include <boost/filesystem/fstream.hpp>
#include <boost/lexical_cast.hpp>
...
...
src/core/dataHandler/io/WWriter.cpp
View file @
e8991c64
...
...
@@ -24,10 +24,6 @@
#include <string>
// Use filesystem version 2 for compatibility with newer boost versions.
#ifndef BOOST_FILESYSTEM_VERSION
#define BOOST_FILESYSTEM_VERSION 2
#endif
#include <boost/filesystem.hpp>
#include "../../common/WIOTools.h"
...
...
src/core/dataHandler/io/WWriterDendrogram.cpp
View file @
e8991c64
...
...
@@ -25,10 +25,6 @@
#include <fstream>
#include <string>
// Use filesystem version 2 for compatibility with newer boost versions.
#ifndef BOOST_FILESYSTEM_VERSION
#define BOOST_FILESYSTEM_VERSION 2
#endif
#include <boost/filesystem.hpp>
#include <boost/shared_ptr.hpp>
...
...
@@ -39,7 +35,7 @@
#include "WWriterDendrogram.h"
WWriterDendrogram
::
WWriterDendrogram
(
const
boost
::
filesystem
::
path
&
path
,
bool
overwrite
)
:
WWriter
(
path
.
file_
string
(),
overwrite
)
:
WWriter
(
path
.
string
(),
overwrite
)
{
}
...
...
src/core/dataHandler/io/WWriterDendrogram.h
View file @
e8991c64
...
...
@@ -27,10 +27,6 @@
#include <string>
// Use filesystem version 2 for compatibility with newer boost versions.
#ifndef BOOST_FILESYSTEM_VERSION
#define BOOST_FILESYSTEM_VERSION 2
#endif
#include <boost/filesystem.hpp>
#include <boost/shared_ptr.hpp>
...
...
src/core/dataHandler/io/WWriterFiberVTK.cpp
View file @
e8991c64
...
...
@@ -25,10 +25,6 @@
#include <fstream>
#include <string>
// Use filesystem version 2 for compatibility with newer boost versions.
#ifndef BOOST_FILESYSTEM_VERSION
#define BOOST_FILESYSTEM_VERSION 2
#endif
#include <boost/filesystem.hpp>
#include <boost/shared_ptr.hpp>
...
...
@@ -39,7 +35,7 @@
#include "WWriterFiberVTK.h"
WWriterFiberVTK
::
WWriterFiberVTK
(
const
boost
::
filesystem
::
path
&
path
,
bool
overwrite
)
:
WWriter
(
path
.
file_
string
(),
overwrite
)
:
WWriter
(
path
.
string
(),
overwrite
)
{
}
void
WWriterFiberVTK
::
writeFibs
(
boost
::
shared_ptr
<
const
WDataSetFibers
>
fiberDS
)
const
...
...
src/core/dataHandler/io/WWriterFiberVTK.h
View file @
e8991c64
...
...
@@ -27,10 +27,6 @@
#include <string>
// Use filesystem version 2 for compatibility with newer boost versions.
#ifndef BOOST_FILESYSTEM_VERSION
#define BOOST_FILESYSTEM_VERSION 2
#endif
#include <boost/filesystem.hpp>
#include <boost/shared_ptr.hpp>
...
...
src/core/graphicsEngine/WGEGeodeUtils.cpp
View file @
e8991c64
...
...
@@ -388,7 +388,7 @@ osg::ref_ptr< osg::PositionAttitudeTransform > wge::addLabel( osg::Vec3 position
labelGeode
->
addDrawable
(
label
);
// setup font
label
->
setFont
(
WPathHelper
::
getAllFonts
().
Default
.
file_
string
()
);
label
->
setFont
(
WPathHelper
::
getAllFonts
().
Default
.
string
()
);
label
->
setBackdropType
(
osgText
::
Text
::
OUTLINE
);
label
->
setCharacterSize
(
6
);
...
...
src/core/graphicsEngine/WGETextureHud.cpp
View file @
e8991c64
...
...
@@ -261,7 +261,7 @@ WGETextureHud::WGETextureHudEntry::WGETextureHudEntry( osg::ref_ptr< osg::Textur
state
->
setMode
(
GL_DEPTH_TEST
,
osg
::
StateAttribute
::
OFF
);
addChild
(
textGeode
);
osgText
::
Text
*
label
=
new
osgText
::
Text
();
label
->
setFont
(
WPathHelper
::
getAllFonts
().
Default
.
file_
string
()
);
label
->
setFont
(
WPathHelper
::
getAllFonts
().
Default
.
string
()
);
label
->
setBackdropType
(
osgText
::
Text
::
OUTLINE
);
label
->
setCharacterSize
(
15
);
label
->
setText
(
m_name
);
...
...
src/core/graphicsEngine/shaders/WGEShader.cpp
View file @
e8991c64
...
...
@@ -29,10 +29,6 @@
#include <fstream>
#include <boost/algorithm/string.hpp>
// Use filesystem version 2 for compatibility with newer boost versions.
#ifndef BOOST_FILESYSTEM_VERSION
#define BOOST_FILESYSTEM_VERSION 2
#endif
#include <boost/filesystem.hpp>
#include <boost/function.hpp>
#include <boost/lexical_cast.hpp>
...
...
@@ -242,9 +238,9 @@ std::string WGEShader::processShaderRecursive( const std::string filename, bool
// use one of the following paths
std
::
string
fn
=
filename
;
std
::
string
fnLocal
=
(
m_shaderPath
/
filename
).
file_
string
();
std
::
string
fnLocalShaders
=
(
m_shaderPath
/
"shaders"
/
filename
).
file_
string
();
std
::
string
fnGlobal
=
(
WPathHelper
::
getShaderPath
()
/
filename
).
file_
string
();
std
::
string
fnLocal
=
(
m_shaderPath
/
filename
).
string
();
std
::
string
fnLocalShaders
=
(
m_shaderPath
/
"shaders"
/
filename
).
string
();
std
::
string
fnGlobal
=
(
WPathHelper
::
getShaderPath
()
/
filename
).
string
();
if
(
boost
::
filesystem
::
exists
(
m_shaderPath
/
filename
)
)
{
...
...
@@ -261,8 +257,8 @@ std::string WGEShader::processShaderRecursive( const std::string filename, bool
else
if
(
!
optional
)
{
WLogger
::
getLogger
()
->
addLogMessage
(
"The requested shader
\"
"
+
filename
+
"
\"
does not exist in
\"
"
+
m_shaderPath
.
file_
string
()
+
"
\"
,
\"
"
+
(
m_shaderPath
/
"shaders"
).
file_
string
()
+
"
\"
or
\"
"
+
WPathHelper
::
getShaderPath
().
file_
string
()
+
"
\"
."
,
"WGEShader ("
+
filename
+
")"
,
LL_ERROR
m_shaderPath
.
string
()
+
"
\"
,
\"
"
+
(
m_shaderPath
/
"shaders"
).
string
()
+
"
\"
or
\"
"
+
WPathHelper
::
getShaderPath
().
string
()
+
"
\"
."
,
"WGEShader ("
+
filename
+
")"
,
LL_ERROR
);
return
""
;
...
...
src/core/graphicsEngine/shaders/WGEShader.h
View file @
e8991c64
...
...
@@ -28,10 +28,6 @@
#include <map>
#include <string>
// Use filesystem version 2 for compatibility with newer boost versions.
#ifndef BOOST_FILESYSTEM_VERSION
#define BOOST_FILESYSTEM_VERSION 2
#endif
#include <boost/filesystem.hpp>
#include <boost/signals2/signal.hpp>
...
...
src/core/graphicsEngine/widgets/labeling/WGELabel.cpp
View file @
e8991c64
...
...
@@ -33,7 +33,7 @@ WGELabel::WGELabel():
{
// initialize members
setCharacterSize
(
21
);
setFont
(
WPathHelper
::
getAllFonts
().
Default
.
file_
string
()
);
setFont
(
WPathHelper
::
getAllFonts
().
Default
.
string
()
);
setAxisAlignment
(
osgText
::
Text
::
SCREEN
);
setAlignment
(
osgText
::
Text
::
LEFT_BOTTOM
);
setBackdropType
(
osgText
::
Text
::
OUTLINE
);
...
...
src/core/kernel/WKernel.cpp
View file @
e8991c64
...
...
@@ -33,11 +33,6 @@
#include <string>
#include <vector>
// Use filesystem version 2 for compatibility with newer boost versions.
#ifndef BOOST_FILESYSTEM_VERSION
#define BOOST_FILESYSTEM_VERSION 2
#endif
#include "../common/WThreadedRunner.h"
#include "../common/WTimer.h"
#include "../common/WRealtimeTimer.h"
...
...
Prev
1
2
3
Next
Write
Preview
Markdown
is supported
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