diff --git a/.travis b/.travis index 50277d3018bc3d2a47ac49c7fce867752e26184e..127d03a2df0f7a3996bfd66a671eb504a9343e2d 160000 --- a/.travis +++ b/.travis @@ -1 +1 @@ -Subproject commit 50277d3018bc3d2a47ac49c7fce867752e26184e +Subproject commit 127d03a2df0f7a3996bfd66a671eb504a9343e2d diff --git a/include/dynamic-graph/command-getter.h b/include/dynamic-graph/command-getter.h index 73e845eed1ba66acceb8cddf786fb058e7302bc0..9c60a231063cfb2d6e9d8897a89e7e0ba9a7f198 100644 --- a/include/dynamic-graph/command-getter.h +++ b/include/dynamic-graph/command-getter.h @@ -53,7 +53,7 @@ namespace dynamicgraph { /// \li prototype of E::getParameter should be exactly as specified in this /// example. template <class E, typename T> - class DYNAMIC_GRAPH_DLLEXPORT Getter : public Command { + class Getter : public Command { public: /// Pointer to method that sets paramter of type T typedef T (E::*GetterMethod) () const; diff --git a/include/dynamic-graph/command-setter.h b/include/dynamic-graph/command-setter.h index 588567ee085a418d3fbe028cfdac19e878ae3262..cc8859386f5087d48e8d72dba15aaad8b82b7014 100644 --- a/include/dynamic-graph/command-setter.h +++ b/include/dynamic-graph/command-setter.h @@ -53,7 +53,7 @@ namespace dynamicgraph { /// \li prototype of E::setParameter should be exactly as specified in this /// example. template <class E, typename T> - class DYNAMIC_GRAPH_DLLEXPORT Setter : public Command { + class Setter : public Command { public: /// Pointer to method that sets paramter of type T typedef void (E::*SetterMethod) (const T&); diff --git a/include/dynamic-graph/signal-cast-helper.h b/include/dynamic-graph/signal-cast-helper.h index 8b4637548add715c2cafb3ad012b84eddf66e6c4..f7704dba15802d22faa918774f8aa505bd644491 100644 --- a/include/dynamic-graph/signal-cast-helper.h +++ b/include/dynamic-graph/signal-cast-helper.h @@ -48,17 +48,14 @@ namespace dynamicgraph : SignalCastRegisterer (typeid(T), disp, cast, trace) {} - DYNAMIC_GRAPH_DLLEXPORT - static boost::any cast (std::istringstream& iss); + static boost::any cast (std::istringstream& iss); - DYNAMIC_GRAPH_DLLEXPORT - static void disp (const boost::any& object, std::ostream& os) + static void disp (const boost::any& object, std::ostream& os) { os << boost::any_cast<T> (object) << std::endl; } - DYNAMIC_GRAPH_DLLEXPORT - static void trace (const boost::any& object, std::ostream& os) + static void trace (const boost::any& object, std::ostream& os) { disp(object,os); } @@ -156,15 +153,12 @@ public: static void disp( TYPE const& t,std::ostream& os ) DISP \ static void trace( TYPE const& t,std::ostream& os ) TRACE \ public: \ - DYNAMIC_GRAPH_DLLEXPORT \ static boost::any cast_( std::istringstream& stringValue ) { \ return boost::any_cast<TYPE>(cast(stringValue)); \ } \ - DYNAMIC_GRAPH_DLLEXPORT \ static void disp_( const boost::any& t,std::ostream& os ) { \ disp(boost::any_cast<TYPE>(t), os); \ } \ - DYNAMIC_GRAPH_DLLEXPORT \ static void trace_( const boost::any& t,std::ostream& os ) { \ trace(boost::any_cast<TYPE>(t),os); \ } \ diff --git a/include/dynamic-graph/value.h b/include/dynamic-graph/value.h index 471e7805dfa3df0834c6104b9ae2bc5a04ba9380..f3614bbec54572338ecea654c20d08a4727884f6 100644 --- a/include/dynamic-graph/value.h +++ b/include/dynamic-graph/value.h @@ -28,7 +28,7 @@ namespace dynamicgraph { namespace command { class Value; - class DYNAMIC_GRAPH_DLLEXPORT EitherType { + class DYNAMIC_GRAPH_DLLAPI EitherType { public: EitherType(const Value& value); ~EitherType(); @@ -44,7 +44,7 @@ namespace dynamicgraph { const Value* value_; }; - class DYNAMIC_GRAPH_DLLEXPORT Value { + class DYNAMIC_GRAPH_DLLAPI Value { public: enum Type { NONE, @@ -93,9 +93,9 @@ namespace dynamicgraph { static std::string typeName(Type type); /// Output in a stream - DYNAMIC_GRAPH_DLLEXPORT friend std::ostream& operator<<(std::ostream& os, const Value& value); + DYNAMIC_GRAPH_DLLAPI friend std::ostream& operator<<(std::ostream& os, const Value& value); public: - DYNAMIC_GRAPH_DLLEXPORT friend class EitherType; + friend class EitherType; bool boolValue() const; unsigned unsignedValue() const; int intValue() const; @@ -109,12 +109,14 @@ namespace dynamicgraph { }; /* ---- HELPER ---------------------------------------------------------- */ + // Note: to ensure the WIN32 compatibility, it is necessary to export + // the template specialization. Also, it is forbidden to do the template + // specialization declaration in the header file, for the same reason. template< typename T > - struct ValueHelper + struct DYNAMIC_GRAPH_DLLAPI ValueHelper { static const Value::Type TypeID; }; - } // namespace command } //namespace dynamicgraph diff --git a/src/command/value.cpp b/src/command/value.cpp index 68ff3a37795dfcd83be02d167cbec1854708629d..92a032d1d016e7b9222ee2f7334b9a556ea5fa0b 100644 --- a/src/command/value.cpp +++ b/src/command/value.cpp @@ -330,7 +330,6 @@ namespace dynamicgraph { return os; } - /* ---- HELPER ---------------------------------------------------------- */ template<> const Value::Type ValueHelper<bool>::TypeID = Value::BOOL; template<> const Value::Type ValueHelper<unsigned>::TypeID = Value::UNSIGNED; template<> const Value::Type ValueHelper<int>::TypeID = Value::INT;