From 6607b4194d3c963e92f099ec44424028fcefe936 Mon Sep 17 00:00:00 2001
From: florent <florent@laas.fr>
Date: Fri, 17 Dec 2010 09:46:49 +0100
Subject: [PATCH] Make member fromSensor private and add setter and getter.

     * include/sot-dynamic/angle-estimator.h,
     * src/angle-estimator.cpp: rename member fromSensor -> fromSensor_.
---
 include/sot-dynamic/angle-estimator.h | 9 ++++++++-
 src/angle-estimator.cpp               | 8 ++++----
 2 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/include/sot-dynamic/angle-estimator.h b/include/sot-dynamic/angle-estimator.h
index 759f820..6820c43 100644
--- a/include/sot-dynamic/angle-estimator.h
+++ b/include/sot-dynamic/angle-estimator.h
@@ -103,7 +103,14 @@ class SOTANGLEESTIMATOR_EXPORT AngleEstimator
 					const int& time );
   
  public: /* --- PARAMS --- */
-  bool fromSensor;
+  void fromSensor(const bool& inFromSensor) {
+    fromSensor_ = fromSensor;
+  }
+  bool fromSensor() const {
+    return fromSensor_;
+  }
+ private:
+  bool fromSensor_;
 
   virtual void commandLine( const std::string& cmdLine,
 			    std::istringstream& cmdArgs,
diff --git a/src/angle-estimator.cpp b/src/angle-estimator.cpp
index 59f5151..3bc43ba 100644
--- a/src/angle-estimator.cpp
+++ b/src/angle-estimator.cpp
@@ -73,7 +73,7 @@ AngleEstimator( const std::string & name )
 			    "sotAngleEstimator("+name
 			    +")::output(vectorRollPitchYaw)::waistWorldPoseRPY" )
 
-   ,fromSensor(true)
+   ,fromSensor_(true)
 {
   sotDEBUGIN(5);
   
@@ -267,7 +267,7 @@ computeWaistWorldPosition( MatrixHomogeneous& res,
   const MatrixHomogeneous & waistMleg = contactEmbeddedPositionSIN( time );
   MatrixHomogeneous legMwaist; waistMleg.inverse( legMwaist );
 
-  if( fromSensor )
+  if( fromSensor_ )
     { 
       const MatrixRotation & Rflex = flexibilitySOUT( time ); // footRleg
       ml::Vector zero(3); zero.fill(0.);
@@ -316,9 +316,9 @@ commandLine( const std::string& cmdLine,
       std::string val; cmdArgs>>val; 
       if( ("true"==val)||("false"==val) )
 	{
-	  fromSensor = ( val=="true" ); 
+	  fromSensor_ = ( val=="true" );
 	} else {
-	  os << "fromSensor = " << (fromSensor?"true":"false") << std::endl;
+	  os << "fromSensor = " << (fromSensor_?"true":"false") << std::endl;
 	}
     }
   else { Entity::commandLine( cmdLine,cmdArgs,os); }
-- 
GitLab