Skip to content

Commit ac91bdf

Browse files
Merge branch 'master' of github.com:andreadelprete/dynamic-graph
2 parents 6fdb036 + 53e3345 commit ac91bdf

File tree

6 files changed

+14
-19
lines changed

6 files changed

+14
-19
lines changed

include/dynamic-graph/command-getter.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ namespace dynamicgraph {
5353
/// \li prototype of E::getParameter should be exactly as specified in this
5454
/// example.
5555
template <class E, typename T>
56-
class DYNAMIC_GRAPH_DLLEXPORT Getter : public Command {
56+
class Getter : public Command {
5757
public:
5858
/// Pointer to method that sets paramter of type T
5959
typedef T (E::*GetterMethod) () const;

include/dynamic-graph/command-setter.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ namespace dynamicgraph {
5353
/// \li prototype of E::setParameter should be exactly as specified in this
5454
/// example.
5555
template <class E, typename T>
56-
class DYNAMIC_GRAPH_DLLEXPORT Setter : public Command {
56+
class Setter : public Command {
5757
public:
5858
/// Pointer to method that sets paramter of type T
5959
typedef void (E::*SetterMethod) (const T&);

include/dynamic-graph/signal-cast-helper.h

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,17 +48,14 @@ namespace dynamicgraph
4848
: SignalCastRegisterer (typeid(T), disp, cast, trace)
4949
{}
5050

51-
DYNAMIC_GRAPH_DLLEXPORT
52-
static boost::any cast (std::istringstream& iss);
51+
static boost::any cast (std::istringstream& iss);
5352

54-
DYNAMIC_GRAPH_DLLEXPORT
55-
static void disp (const boost::any& object, std::ostream& os)
53+
static void disp (const boost::any& object, std::ostream& os)
5654
{
5755
os << boost::any_cast<T> (object) << std::endl;
5856
}
5957

60-
DYNAMIC_GRAPH_DLLEXPORT
61-
static void trace (const boost::any& object, std::ostream& os)
58+
static void trace (const boost::any& object, std::ostream& os)
6259
{
6360
disp(object,os);
6461
}
@@ -156,15 +153,12 @@ public:
156153
static void disp( TYPE const& t,std::ostream& os ) DISP \
157154
static void trace( TYPE const& t,std::ostream& os ) TRACE \
158155
public: \
159-
DYNAMIC_GRAPH_DLLEXPORT \
160156
static boost::any cast_( std::istringstream& stringValue ) { \
161157
return boost::any_cast<TYPE>(cast(stringValue)); \
162158
} \
163-
DYNAMIC_GRAPH_DLLEXPORT \
164159
static void disp_( const boost::any& t,std::ostream& os ) { \
165160
disp(boost::any_cast<TYPE>(t), os); \
166161
} \
167-
DYNAMIC_GRAPH_DLLEXPORT \
168162
static void trace_( const boost::any& t,std::ostream& os ) { \
169163
trace(boost::any_cast<TYPE>(t),os); \
170164
} \

include/dynamic-graph/value.h

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
namespace dynamicgraph {
2929
namespace command {
3030
class Value;
31-
class DYNAMIC_GRAPH_DLLEXPORT EitherType {
31+
class DYNAMIC_GRAPH_DLLAPI EitherType {
3232
public:
3333
EitherType(const Value& value);
3434
~EitherType();
@@ -44,7 +44,7 @@ namespace dynamicgraph {
4444
const Value* value_;
4545
};
4646

47-
class DYNAMIC_GRAPH_DLLEXPORT Value {
47+
class DYNAMIC_GRAPH_DLLAPI Value {
4848
public:
4949
enum Type {
5050
NONE,
@@ -93,9 +93,9 @@ namespace dynamicgraph {
9393
static std::string typeName(Type type);
9494

9595
/// Output in a stream
96-
DYNAMIC_GRAPH_DLLEXPORT friend std::ostream& operator<<(std::ostream& os, const Value& value);
96+
DYNAMIC_GRAPH_DLLAPI friend std::ostream& operator<<(std::ostream& os, const Value& value);
9797
public:
98-
DYNAMIC_GRAPH_DLLEXPORT friend class EitherType;
98+
friend class EitherType;
9999
bool boolValue() const;
100100
unsigned unsignedValue() const;
101101
int intValue() const;
@@ -109,12 +109,14 @@ namespace dynamicgraph {
109109
};
110110

111111
/* ---- HELPER ---------------------------------------------------------- */
112+
// Note: to ensure the WIN32 compatibility, it is necessary to export
113+
// the template specialization. Also, it is forbidden to do the template
114+
// specialization declaration in the header file, for the same reason.
112115
template< typename T >
113-
struct ValueHelper
116+
struct DYNAMIC_GRAPH_DLLAPI ValueHelper
114117
{
115118
static const Value::Type TypeID;
116119
};
117-
118120
} // namespace command
119121
} //namespace dynamicgraph
120122

src/command/value.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,6 @@ namespace dynamicgraph {
330330
return os;
331331
}
332332

333-
/* ---- HELPER ---------------------------------------------------------- */
334333
template<> const Value::Type ValueHelper<bool>::TypeID = Value::BOOL;
335334
template<> const Value::Type ValueHelper<unsigned>::TypeID = Value::UNSIGNED;
336335
template<> const Value::Type ValueHelper<int>::TypeID = Value::INT;

0 commit comments

Comments
 (0)