commit 0c8d22a524bacd2a0469cce769fa47d6c6f05a27
Author: sschulz <sschulz@techfak.uni-bielefeld.de>
Date:   Fri Feb 19 14:54:11 2016 +0100

    stylecheck based cleanup

diff --git a/src/client/middleware_rsb.cpp b/src/client/middleware_rsb.cpp
index cdda6fb..1500cea 100644
--- a/src/client/middleware_rsb.cpp
+++ b/src/client/middleware_rsb.cpp
@@ -28,73 +28,81 @@
 #include "client/middleware_rsb.h"
 
 #ifdef RSB_SUPPORT
+
 #define BOOST_SIGNALS_NO_DEPRECATION_WARNING 1
-#include <rsb/Listener.h>
-#include <rsb/patterns/RemoteServer.h>
-#include <rsb/MetaData.h>
-#include <rsb/converter/Repository.h>
 #include <rsb/converter/ProtocolBufferConverter.h>
+#include <rsb/converter/Repository.h>
 #include <rsb/Factory.h>
+#include <rsb/Listener.h>
+#include <rsb/MetaData.h>
+#include <rsb/patterns/RemoteServer.h>
+#include <string>
 
-#include <humotion/mouth.h>
-#include <humotion/gaze.h>
+#include "humotion/gaze.h"
+#include "humotion/mouth.h"
 
-using namespace std;
-using namespace rsb;
-using namespace boost;
-using namespace humotion;
-using namespace humotion::client;
+// using namespace std;
+// using namespace rsb;
+// using namespace boost;
+// using namespace humotion;
+using humotion::client::MiddlewareRSB;
 
 //! constructor
-MiddlewareRSB::MiddlewareRSB(string scope) : Middleware(scope){
+MiddlewareRSB::MiddlewareRSB(string scope) : Middleware(scope) {
     printf("> registering converters\n");
 
-    try{
-        //converter for GazeTarget
-        rsb::converter::Converter<string>::Ptr gazeTargetConverter(new rsb::converter::ProtocolBufferConverter<rst::robot::HumotionGazeTarget>());
+    try {
+        // converter for GazeTarget
+        rsb::converter::Converter<string>::Ptr gazeTargetConverter(
+                    new rsb::converter::ProtocolBufferConverter<rst::robot::HumotionGazeTarget>());
         rsb::converter::converterRepository<string>()->registerConverter(gazeTargetConverter);
-    }catch (std::invalid_argument e){
-        printf("> it seems like a converter for rst::robot::HumotionGazeTarget is already registered. fine, will not add another converter\n");
+    } catch (std::invalid_argument e) {
+        printf("> it seems like a converter for rst::robot::HumotionGazeTarget "
+               "is already registered. fine, will not add another converter\n");
     }
 
-    try{
-        //converter for MouthTarget
-        rsb::converter::Converter<string>::Ptr mouthTargetConverter(new rsb::converter::ProtocolBufferConverter<rst::robot::MouthTarget>());
-        rsb::converter::converterRepository<string>()->registerConverter(mouthTargetConverter);
-    }catch (std::invalid_argument e){
-        printf("> it seems like a converter for rst::robot::MouthTarget is already registered. fine, will not add another converter\n");
+    try {
+        // converter for MouthTarget
+        rsb::converter::Converter<string>::Ptr mouthTargetConverter(
+                    new rsb::converter::ProtocolBufferConverter<rst::robot::MouthTarget>());
+        rsb::converter::converterRepository<std::string>()->registerConverter(mouthTargetConverter);
+    } catch (std::invalid_argument e) {
+        printf("> it seems like a converter for rst::robot::MouthTarget is "
+               "already registered. fine, will not add another converter\n");
     }
 
 
-    //first get a factory instance that is used to create RSB domain objects
+    // first get a factory instance that is used to create RSB domain objects
     Factory &factory = getFactory();
 
-    //create informer
-    mouth_target_informer = factory.createInformer<rst::robot::MouthTarget> (base_scope + "/humotion/mouth/target");
-    gaze_target_informer  = factory.createInformer<rst::robot::HumotionGazeTarget> (base_scope + "/humotion/gaze/target");
+    // create informer
+    mouth_target_informer = factory.createInformer<rst::robot::MouthTarget>
+            (base_scope + "/humotion/mouth/target");
+    gaze_target_informer  = factory.createInformer<rst::robot::HumotionGazeTarget>
+            (base_scope + "/humotion/gaze/target");
 
     printf("> MiddlewareRSB initialised\n");
 }
 
 //! destructor
-MiddlewareRSB::~MiddlewareRSB(){
+MiddlewareRSB::~MiddlewareRSB() {
 }
 
 //! connection ok?
 //! \return true if conn is alive
-bool MiddlewareRSB::ok(){
+bool MiddlewareRSB::ok() {
     return true;
 }
 
 //! do a single tick
-void MiddlewareRSB::tick(){
-    //nothing to do
+void MiddlewareRSB::tick() {
+    // nothing to do
 }
 
 
 //! send mouth target to server
-void MiddlewareRSB::send_mouth_target(){
-    //build target packet:
+void MiddlewareRSB::send_mouth_target() {
+    // build target packet
     boost::shared_ptr<rst::robot::MouthTarget> request(new rst::robot::MouthTarget());
 
     request->set_position_left(mouth_state.position_left);
@@ -110,13 +118,13 @@ void MiddlewareRSB::send_mouth_target(){
 }
 
 //! send mouth target to server
-void MiddlewareRSB::send_gaze_target(int gaze_type){
-    //build target packet:
+void MiddlewareRSB::send_gaze_target(int gaze_type) {
+    // build target packet
     boost::shared_ptr<rst::robot::HumotionGazeTarget> request(new rst::robot::HumotionGazeTarget());
 
     request->set_pan(gaze_state.pan);
     request->set_tilt(gaze_state.tilt);
-    request->set_roll (gaze_state.roll);
+    request->set_roll(gaze_state.roll);
     request->set_vergence(gaze_state.vergence);
 
     request->set_pan_offset(gaze_state.pan_offset);
@@ -132,14 +140,14 @@ void MiddlewareRSB::send_gaze_target(int gaze_type){
     request->set_eyeblink_request_left(gaze_state.eyeblink_request_left);
     request->set_eyeblink_request_right(gaze_state.eyeblink_request_right);
 
-    if (gaze_state.type == GazeState::ABSOLUTE){
+    if (gaze_state.type == GazeState::ABSOLUTE) {
         request->set_type(rst::robot::HumotionGazeTarget::ABSOLUTE);
-    }else{
+    } else {
         request->set_type(rst::robot::HumotionGazeTarget::RELATIVE);
     }
 
 
-    //add position to send queue
+    // add position to send queue
     gaze_target_informer->publish(request);
 }
 
