Commit 53e33453 authored by François Keith's avatar François Keith
Browse files

Merge pull request #16 from gergondet/topic/FixVisibilityIssue

Fix visibility issues
parents b127c1fd 5721ccb9
......@@ -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;
......
......@@ -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&);
......
......@@ -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); \
} \
......
......@@ -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
......
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment