Przeglądaj źródła

Make overriden methods (pdevs)

Eric Ramat 1 rok temu
rodzic
commit
08dd32f243

+ 1 - 1
src/artis-star/common/event/Value.hpp

@@ -187,7 +187,7 @@ private:
   friend class boost::serialization::access;
 
   template<typename Archive>
-  void serialize(Archive &ar, const unsigned int version) {
+  void serialize(Archive & /* ar */, const unsigned int /* version */) {
     // TODO
   }
 

+ 17 - 19
src/artis-star/kernel/pdevs/Coordinator.hpp

@@ -57,11 +57,11 @@ public:
 
   virtual ~Coordinator() {}
 
-  GraphManager &get_graph_manager() { return _graph_manager; }
+  GraphManager &get_graph_manager() override { return _graph_manager; }
 
-  const GraphManager &get_graph_manager() const { return _graph_manager; }
+  const GraphManager &get_graph_manager() const override { return _graph_manager; }
 
-  virtual std::string to_string(int level) const {
+  std::string to_string(int level) const override {
     std::ostringstream ss;
 
     ss << common::String::make_spaces(level * 2) << "p-devs coordinator \""
@@ -70,14 +70,14 @@ public:
     return ss.str();
   }
 
-  void restore(const common::context::State <Time> &state) {
+  void restore(const common::context::State<Time> &state) override {
     common::Coordinator<Time>::restore(state);
     for (auto &child: _graph_manager.children()) {
       _event_table.init(child->get_tn(), child);
     }
   }
 
-  virtual void finish(const typename Time::type &t) {
+  virtual void finish(const typename Time::type &t) override {
 #ifndef WITH_TRACE
     (void) t;
 #endif
@@ -92,7 +92,7 @@ public:
 #endif
   }
 
-  typename Time::type start(const typename Time::type &t) {
+  typename Time::type start(const typename Time::type &t) override {
 //                When i-message (i, t) at time t
 //                  for-each d ∈ D do
 //                    send i-message to child d
@@ -134,7 +134,7 @@ public:
     return type::_tn;
   }
 
-  void output(const typename Time::type &t) {
+  void output(const typename Time::type &t) override {
 //                When *-message (*, t)
 //                  if t != tn then Error
 //                  IMM = {d | (d, th,d) ∈ (event-list & tn,d = tn) }
@@ -155,7 +155,7 @@ public:
 
     assert(t == type::_tn);
 
-    common::Models <Time> IMM = _event_table.get_current_models(t);
+    common::Models<Time> IMM = _event_table.get_current_models(t);
 
 #ifdef WITH_TRACE
     common::Trace<Time>::trace()
@@ -184,7 +184,7 @@ public:
 
   }
 
-  typename Time::type transition(const typename Time::type &t) {
+  typename Time::type transition(const typename Time::type &t) override {
 //                When x-message (x, t)
 //                  if not (tl <= t <= tn) then Error
 //                  receivers = { r | r ∈ children, N ∈ Ir, Z(N,r)(x) isn't empty }
@@ -210,8 +210,8 @@ public:
 
     assert(t >= type::_tl and t <= type::_tn);
 
-    common::Models <Time> receivers = get_receivers();
-    common::Models <Time> IMM = _event_table.get_current_models(t);
+    common::Models<Time> receivers = get_receivers();
+    common::Models<Time> IMM = _event_table.get_current_models(t);
 
 #ifdef WITH_TRACE
     common::Trace<Time>::trace()
@@ -251,7 +251,7 @@ public:
     return type::_tn;
   }
 
-  void post_event(const typename Time::type &t, const common::event::ExternalEvent <Time> &event) {
+  void post_event(const typename Time::type &t, const common::event::ExternalEvent<Time> &event) override {
 
 #ifdef WITH_TRACE
     common::Trace<Time>::trace()
@@ -280,8 +280,7 @@ public:
 
   }
 
-  typename Time::type dispatch_events(const common::event::Bag <Time> &bag,
-                                      const typename Time::type &t) {
+  typename Time::type dispatch_events(const common::event::Bag<Time> &bag, const typename Time::type &t) override {
 
 #ifdef WITH_TRACE
     common::Trace<Time>::trace()
@@ -313,18 +312,17 @@ public:
     return type::_tn;
   }
 
-  common::event::Value observe(const typename Time::type & /* t */,
-                        unsigned int /* index */) const {
+  common::event::Value observe(const typename Time::type & /* t */, unsigned int /* index */) const override {
     assert(false);
     return common::event::Value();
   }
 
-  typename Time::type lookahead(const typename Time::type &t) const {
+  typename Time::type lookahead(const typename Time::type &t) const override {
     return _graph_manager.lookahead(t);
   }
 
-  common::Models <Time> get_receivers() const {
-    common::Models <Time> receivers;
+  common::Models<Time> get_receivers() const {
+    common::Models<Time> receivers;
 
     for (auto &model: _graph_manager.children()) {
       if (model->event_number() > 0) {