Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Corentin Bergé
dynamic-graph
Commits
53e33453
Commit
53e33453
authored
Aug 01, 2014
by
François Keith
Browse files
Merge pull request #16 from gergondet/topic/FixVisibilityIssue
Fix visibility issues
parents
b127c1fd
5721ccb9
Changes
5
Hide whitespace changes
Inline
Side-by-side
include/dynamic-graph/command-getter.h
View file @
53e33453
...
...
@@ -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
;
...
...
include/dynamic-graph/command-setter.h
View file @
53e33453
...
...
@@ -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
&
);
...
...
include/dynamic-graph/signal-cast-helper.h
View file @
53e33453
...
...
@@ -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); \
} \
...
...
include/dynamic-graph/value.h
View file @
53e33453
...
...
@@ -28,7 +28,7 @@
namespace
dynamicgraph
{
namespace
command
{
class
Value
;
class
DYNAMIC_GRAPH_DLL
EXPORT
EitherType
{
class
DYNAMIC_GRAPH_DLL
API
EitherType
{
public:
EitherType
(
const
Value
&
value
);
~
EitherType
();
...
...
@@ -44,7 +44,7 @@ namespace dynamicgraph {
const
Value
*
value_
;
};
class
DYNAMIC_GRAPH_DLL
EXPORT
Value
{
class
DYNAMIC_GRAPH_DLL
API
Value
{
public:
enum
Type
{
NONE
,
...
...
@@ -93,9 +93,9 @@ namespace dynamicgraph {
static
std
::
string
typeName
(
Type
type
);
/// Output in a stream
DYNAMIC_GRAPH_DLL
EXPORT
friend
std
::
ostream
&
operator
<<
(
std
::
ostream
&
os
,
const
Value
&
value
);
DYNAMIC_GRAPH_DLL
API
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
...
...
src/command/value.cpp
View file @
53e33453
...
...
@@ -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
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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