Eric Ramat il y a 6 ans
Parent
commit
4f7dbcbe74
1 fichiers modifiés avec 11 ajouts et 5 suppressions
  1. 11 5
      src/paradevs/common/observer/View.hpp

+ 11 - 5
src/paradevs/common/observer/View.hpp

@@ -130,7 +130,8 @@ public:
         return 0;
     }
 
-    const Values& get(const std::string& selector_name, const std::string& variable_name) const
+    const Values& get(const std::string& selector_name,
+                      const std::string& variable_name) const
     {
         SelectorValues::const_iterator it = _values.find(selector_name);
 
@@ -150,7 +151,8 @@ public:
     void observe(double time, const common::Model < common::DoubleTime >* model,
                  const std::string& selector_name, unsigned int variable_index)
     {
-        std::string path = (boost::format("%1%:%2%") % model->path() % variable_index).str() ;
+        std::string path = (boost::format("%1%:%2%") % model->path() %
+                            variable_index).str() ;
         VariableValues& values = _values[selector_name];
 
         if (values.find(path) == values.end()) {
@@ -170,10 +172,13 @@ public:
             ++i;
         }
         if (chain[i + 1] == ALL) {
-            for (size_t model_index = 0; model_index < model->get_submodel_number(chain[i]);
+            for (size_t model_index = 0;
+                 model_index < model->get_submodel_number(chain[i]);
                  ++model_index) {
                 assert(chain[i] >= 0);
-                observe(chain, i + 2, time, model->get_submodel((unsigned int)chain[i], model_index),
+                observe(chain, i + 2, time,
+                        model->get_submodel((unsigned int)chain[i],
+                                            model_index),
                         selector_name, variable_index);
             }
         } else {
@@ -192,7 +197,8 @@ public:
             if (it->second.size() > 1) {
                 size_t i = 0;
 
-                observe(it->second, i, time, model, it->first, it->second.back());
+                observe(it->second, i, time, model, it->first,
+                        it->second.back());
             } else {
                 if (model) {
                     observe(time, model, it->first, it->second.back());