Skip to content
Snippets Groups Projects
Commit db5fd5c3 authored by Nicolas Mansard's avatar Nicolas Mansard
Browse files

Merge branch 'topic/proto-command' of github.com:jrl-umi3218/dynamic-graph into topic/proto-command

Conflicts:
	include/dynamic-graph/entity.h
parents 0b05a14e 34801f48
No related branches found
No related tags found
No related merge requests found
......@@ -30,6 +30,31 @@
# include <dynamic-graph/signal-array.h>
# include <dynamic-graph/signal-base.h>
/// \brief Helper macro for entity declaration.
///
/// This macro should be called in the declaration of all entities.
/// Example:
/// <code>
/// class A : public dynamicgraph::entity
/// {
/// DYNAMIC_GRAPH_ENTITY_DECL();
///
/// public:
// // your class here
/// };
/// </code>
///
/// Caution: you *MUST* call DYNAMICGRAPH_FACTORY_ENTITY_PLUGIN in the
/// associated source file to ensure that the attributes generated by
/// this macro are correctly initialized.
# define DYNAMIC_GRAPH_ENTITY_DECL() \
public: \
virtual const std::string& getClassName () const \
{ \
return CLASS_NAME; \
} \
static const std::string CLASS_NAME
namespace dynamicgraph
{
/// \ingroup dgraph
......@@ -50,8 +75,6 @@ namespace dynamicgraph
typedef std::map< std::string,SignalBase<int>* > SignalMap;
typedef std::map<const std::string, command::Command*> CommandMap_t;
static const std::string CLASS_NAME;
explicit Entity (const std::string& name);
virtual ~Entity ();
......@@ -59,7 +82,6 @@ namespace dynamicgraph
{
return name;
}
virtual const std::string& getClassName () const = 0;
SignalBase<int>& getSignal (const std::string& signalName);
......
......@@ -52,13 +52,8 @@ namespace dynamicgraph
/// \brief Main class of the tracer real-time plug-in.
class DG_TRACERREALTIME_DLLAPI TracerRealTime : public Tracer
{
DYNAMIC_GRAPH_ENTITY_DECL ();
public:
static const std::string CLASS_NAME;
virtual const std::string& getClassName () const
{
return CLASS_NAME;
}
TracerRealTime (const std::string n);
virtual ~TracerRealTime ()
{}
......
......@@ -36,18 +36,10 @@ namespace dynamicgraph
/// \brief Tracer plug-in main class.
class DG_TRACER_DLLAPI Tracer : public Entity
{
DYNAMIC_GRAPH_ENTITY_DECL ();
protected:
typedef std::list< const SignalBase<int>* > SignalList;
SignalList toTraceSignals;
public:
static const std::string CLASS_NAME;
virtual const std::string& getClassName () const
{
return CLASS_NAME;
}
public:
enum TraceStyle
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment