|
@@ -43,11 +43,11 @@ public:
|
|
typedef GraphManager<Time, Parameters, GraphParameters> type;
|
|
typedef GraphManager<Time, Parameters, GraphParameters> type;
|
|
|
|
|
|
struct ModelPort {
|
|
struct ModelPort {
|
|
- common::Model <Time> *model;
|
|
|
|
|
|
+ common::Model<Time> *model;
|
|
unsigned int port_index;
|
|
unsigned int port_index;
|
|
type *graph_manager;
|
|
type *graph_manager;
|
|
|
|
|
|
- ModelPort(common::Model <Time> *model, unsigned int port_index)
|
|
|
|
|
|
+ ModelPort(common::Model<Time> *model, unsigned int port_index)
|
|
: model(model),
|
|
: model(model),
|
|
port_index(port_index),
|
|
port_index(port_index),
|
|
graph_manager(nullptr) {}
|
|
graph_manager(nullptr) {}
|
|
@@ -57,7 +57,7 @@ public:
|
|
}
|
|
}
|
|
};
|
|
};
|
|
|
|
|
|
- GraphManager(common::Coordinator <Time> *coordinator,
|
|
|
|
|
|
+ GraphManager(common::Coordinator<Time> *coordinator,
|
|
const Parameters & /* parameters */,
|
|
const Parameters & /* parameters */,
|
|
const GraphParameters & /* graph_parameters */)
|
|
const GraphParameters & /* graph_parameters */)
|
|
:
|
|
:
|
|
@@ -75,7 +75,7 @@ public:
|
|
return p;
|
|
return p;
|
|
}
|
|
}
|
|
|
|
|
|
- void dispatch_events(common::event::Bag <Time> bag, typename Time::type t) {
|
|
|
|
|
|
+ void dispatch_events(common::event::Bag<Time> bag, typename Time::type t) {
|
|
for (auto &ymsg: bag) {
|
|
for (auto &ymsg: bag) {
|
|
typename common::Links<Time>::Result result_model = _link_list.find(
|
|
typename common::Links<Time>::Result result_model = _link_list.find(
|
|
ymsg.get_model(),
|
|
ymsg.get_model(),
|
|
@@ -94,23 +94,21 @@ public:
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- virtual void
|
|
|
|
- dispatch_events_to_parent(common::Node <Time> node, const common::event::Value &content,
|
|
|
|
- typename Time::type t) {
|
|
|
|
- common::event::Bag <Time> ymessages;
|
|
|
|
|
|
+ virtual void dispatch_events_to_parent(common::Node<Time> node, const common::event::Value &content,
|
|
|
|
+ typename Time::type t) {
|
|
|
|
+ common::event::Bag<Time> ymessages;
|
|
|
|
|
|
ymessages.push_back(common::event::ExternalEvent<Time>(node, content));
|
|
ymessages.push_back(common::event::ExternalEvent<Time>(node, content));
|
|
|
|
|
|
if (common::GraphManager<Time>::_coordinator->get_parent()) {
|
|
if (common::GraphManager<Time>::_coordinator->get_parent()) {
|
|
- dynamic_cast < common::Coordinator <Time> * >(common::GraphManager<Time>::_coordinator
|
|
|
|
- ->get_parent())
|
|
|
|
- ->dispatch_events(ymessages, t);
|
|
|
|
|
|
+ dynamic_cast < common::Coordinator<Time> * >(common::GraphManager<Time>::_coordinator
|
|
|
|
+ ->get_parent())->dispatch_events(ymessages, t);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
virtual typename Time::type lookahead(const typename Time::type &t) const { return t; }
|
|
virtual typename Time::type lookahead(const typename Time::type &t) const { return t; }
|
|
|
|
|
|
- void post_event(typename Time::type t, const common::event::ExternalEvent <Time> &event) {
|
|
|
|
|
|
+ void post_event(typename Time::type t, const common::event::ExternalEvent<Time> &event) {
|
|
typename common::Links<Time>::Result result =
|
|
typename common::Links<Time>::Result result =
|
|
_link_list.find(common::GraphManager<Time>::_coordinator,
|
|
_link_list.find(common::GraphManager<Time>::_coordinator,
|
|
event.port_index());
|
|
event.port_index());
|
|
@@ -135,8 +133,8 @@ public:
|
|
}
|
|
}
|
|
|
|
|
|
private:
|
|
private:
|
|
- void add_link(common::Model <Time> *src_model, unsigned int src_port_index,
|
|
|
|
- common::Model <Time> *dst_model, unsigned int dst_port_index) {
|
|
|
|
|
|
+ void add_link(common::Model<Time> *src_model, unsigned int src_port_index,
|
|
|
|
+ common::Model<Time> *dst_model, unsigned int dst_port_index) {
|
|
assert((src_model != common::GraphManager<Time>::_coordinator and
|
|
assert((src_model != common::GraphManager<Time>::_coordinator and
|
|
dst_model != common::GraphManager<Time>::_coordinator and
|
|
dst_model != common::GraphManager<Time>::_coordinator and
|
|
src_model->exist_out_port(src_port_index) and
|
|
src_model->exist_out_port(src_port_index) and
|
|
@@ -153,7 +151,7 @@ private:
|
|
_link_list.add(src_model, src_port_index, dst_model, dst_port_index);
|
|
_link_list.add(src_model, src_port_index, dst_model, dst_port_index);
|
|
}
|
|
}
|
|
|
|
|
|
- common::Links <Time> _link_list;
|
|
|
|
|
|
+ common::Links<Time> _link_list;
|
|
};
|
|
};
|
|
|
|
|
|
} // namespace artis dtss
|
|
} // namespace artis dtss
|