From e89b15f66c2415c3318e8a8651e5f2bb181736e9 Mon Sep 17 00:00:00 2001
From: Mansard <nmansard@laas.fr>
Date: Tue, 21 Jun 2011 14:29:46 +0200
Subject: [PATCH] Account for the Entity::getClassName becoming pure virtual.

---
 include/sot-dynamic/angle-estimator.h            | 1 +
 include/sot-dynamic/dynamic.h                    | 1 +
 include/sot-dynamic/force-compensation.h         | 1 +
 include/sot-dynamic/integrator-force.h           | 1 +
 include/sot-dynamic/mass-apparent.h              | 1 +
 include/sot-dynamic/waist-attitude-from-sensor.h | 1 +
 include/sot-dynamic/zmpreffromcom.h              | 2 ++
 7 files changed, 8 insertions(+)

diff --git a/include/sot-dynamic/angle-estimator.h b/include/sot-dynamic/angle-estimator.h
index 70153b3..169d438 100644
--- a/include/sot-dynamic/angle-estimator.h
+++ b/include/sot-dynamic/angle-estimator.h
@@ -66,6 +66,7 @@ class SOTANGLEESTIMATOR_EXPORT AngleEstimator
 {
  public:
   static const std::string CLASS_NAME;
+  virtual const std::string& getClassName( void ) const { return CLASS_NAME; }
 
  public: /* --- CONSTRUCTION --- */
 
diff --git a/include/sot-dynamic/dynamic.h b/include/sot-dynamic/dynamic.h
index 7aa63f1..0f10f29 100644
--- a/include/sot-dynamic/dynamic.h
+++ b/include/sot-dynamic/dynamic.h
@@ -94,6 +94,7 @@ class SOTDYNAMIC_EXPORT Dynamic
 
  public:
   static const std::string CLASS_NAME;
+  virtual const std::string& getClassName( void ) const { return CLASS_NAME; }
 
  protected:
  public:
diff --git a/include/sot-dynamic/force-compensation.h b/include/sot-dynamic/force-compensation.h
index bc7e72c..09fd840 100644
--- a/include/sot-dynamic/force-compensation.h
+++ b/include/sot-dynamic/force-compensation.h
@@ -136,6 +136,7 @@ namespace dynamicgraph { namespace sot {
     {
     public:
       static const std::string CLASS_NAME;
+      virtual const std::string& getClassName( void ) const { return CLASS_NAME; }
       bool calibrationStarted;
 
 
diff --git a/include/sot-dynamic/integrator-force.h b/include/sot-dynamic/integrator-force.h
index 5b9af5e..6abc8e2 100644
--- a/include/sot-dynamic/integrator-force.h
+++ b/include/sot-dynamic/integrator-force.h
@@ -67,6 +67,7 @@ class SOTINTEGRATORFORCE_EXPORT IntegratorForce
 {
  public:
   static const std::string CLASS_NAME;
+  virtual const std::string& getClassName( void ) const { return CLASS_NAME; }
 
  protected:
   double timeStep;
diff --git a/include/sot-dynamic/mass-apparent.h b/include/sot-dynamic/mass-apparent.h
index e54fa65..0d5d776 100644
--- a/include/sot-dynamic/mass-apparent.h
+++ b/include/sot-dynamic/mass-apparent.h
@@ -66,6 +66,7 @@ namespace dynamicgraph { namespace sot {
       {
       public:
 	static const std::string CLASS_NAME;
+	virtual const std::string& getClassName( void ) const { return CLASS_NAME; }
 
       public: /* --- CONSTRUCTION --- */
 
diff --git a/include/sot-dynamic/waist-attitude-from-sensor.h b/include/sot-dynamic/waist-attitude-from-sensor.h
index 2a74e30..ee96d97 100644
--- a/include/sot-dynamic/waist-attitude-from-sensor.h
+++ b/include/sot-dynamic/waist-attitude-from-sensor.h
@@ -66,6 +66,7 @@ class SOTWAISTATTITUDEFROMSENSOR_EXPORT WaistAttitudeFromSensor
 {
  public:
   static const std::string CLASS_NAME;
+  virtual const std::string& getClassName( void ) const { return CLASS_NAME; }
 
  public: /* --- CONSTRUCTION --- */
 
diff --git a/include/sot-dynamic/zmpreffromcom.h b/include/sot-dynamic/zmpreffromcom.h
index 2f75df5..58e78e4 100644
--- a/include/sot-dynamic/zmpreffromcom.h
+++ b/include/sot-dynamic/zmpreffromcom.h
@@ -64,6 +64,8 @@ class SOTZMPREFFROMCOM_EXPORT ZmprefFromCom
 {
  public:
   static const std::string CLASS_NAME;
+  virtual const std::string& getClassName( void ) const { return CLASS_NAME; }
+ public:
   double dt;
   const static double DT_DEFAULT; // = 5e-3; // 5ms
   double footHeight;
-- 
GitLab