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
Guilhem Saurel
soth
Commits
fa8ddc17
Commit
fa8ddc17
authored
Nov 07, 2019
by
Guilhem Saurel
Browse files
Use Boost.signals2 only
parent
aa7b2684
Pipeline
#6721
passed with stage
in 4 minutes and 43 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
fa8ddc17
...
...
@@ -25,7 +25,7 @@ PROJECT(${PROJECT_NAME} C CXX)
ADD_REQUIRED_DEPENDENCY
(
eigen3
)
SEARCH_FOR_EIGEN
()
SET
(
BOOST_COMPONENTS program_options
signals
)
SET
(
BOOST_COMPONENTS program_options
)
SEARCH_FOR_BOOST
()
INCLUDE_DIRECTORIES
(
SYSTEM
${
Boost_INCLUDE_DIRS
}
)
...
...
include/soth/BasicStage.hpp
View file @
fa8ddc17
...
...
@@ -9,18 +9,8 @@
#include
"soth/api.hpp"
#include
<boost/noncopyable.hpp>
#include
<boost/version.hpp>
#ifndef WITHOUT_NOTIFIOR
#if BOOST_VERSION > 105300
#include
<boost/signals2.hpp>
#define NOTIFIOR_SIGNAL2
#else
#include
<boost/signals.hpp>
#endif
#endif
#include
<boost/version.hpp>
namespace
soth
{
class
BaseY
;
...
...
@@ -76,20 +66,11 @@ class SOTH_EXPORT BasicStage : boost::noncopyable {
VectorBound
getBounds
()
const
;
VectorBound
&
getBoundsInternal
();
public:
/* Notification, could be removed conditionnaly to the lack of
boost::signal. */
#ifndef WITHOUT_NOTIFIOR
public:
typedef
boost
::
function
<
void
(
std
::
string
,
ConstraintRef
,
std
::
string
)
>
listener_function_t
;
#ifdef NOTIFIOR_SIGNAL2
boost
::
signals2
::
signal
<
void
(
std
::
string
,
ConstraintRef
,
std
::
string
)
>
notifior
;
#else
boost
::
signal
<
void
(
std
::
string
,
ConstraintRef
,
std
::
string
)
>
notifior
;
#endif
#else
inline
void
notifior
(
int
,
int
,
std
::
string
)
{}
#endif
};
}
// namespace soth
...
...
src/HCOD.cpp
View file @
fa8ddc17
...
...
@@ -116,14 +116,12 @@ void HCOD::setNameByOrder(const std::string root) {
}
void
HCOD
::
notifiorRegistration
(
const
Stage
::
listener_function_t
&
f
,
int
stageRank
)
{
#ifndef WITHOUT_NOTIFIOR
if
(
stageRank
==
-
1
)
for
(
size_t
i
=
0
;
i
<
stages
.
size
();
++
i
)
{
stages
[
i
]
->
notifior
.
connect
(
f
);
}
else
stages
[
stageRank
]
->
notifior
.
connect
(
f
);
#endif
}
void
HCOD
::
setDamping
(
const
double
&
d
)
{
...
...
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