{}
virtual ~sc_export() {}
- virtual const char *kind() const { return "sc_export"; }
+ virtual const char *kind() const override { return "sc_export"; }
void operator () (IF &i) { bind(i); }
virtual void
const sc_interface *get_interface() const override { return interface; }
protected:
- void before_end_of_elaboration() {}
+ void before_end_of_elaboration() override {}
void
- end_of_elaboration()
+ end_of_elaboration() override
{
if (!interface) {
std::string msg = "export not bound: export '";
SC_REPORT_ERROR("(E109) complete binding failed", msg.c_str());
}
}
- void start_of_simulation() {}
- void end_of_simulation() {}
+ void start_of_simulation() override {}
+ void end_of_simulation() override {}
private:
IF *interface;
}
protected:
- void before_end_of_elaboration() {}
- void end_of_elaboration() {}
- void start_of_simulation() {}
- void end_of_simulation() {}
+ void before_end_of_elaboration() override {}
+ void end_of_elaboration() override {}
+ void start_of_simulation() override {}
+ void end_of_simulation() override {}
explicit sc_port_b(int n, sc_port_policy p) :
sc_port_base(sc_gen_unique_name("port"), n, p)
// Implementation defined, but depended on by the tests.
int
- vbind(sc_interface &i)
+ vbind(sc_interface &i) override
{
IF *interface = dynamic_cast<IF *>(&i);
if (!interface)
return 0;
}
int
- vbind(sc_port_base &pb)
+ vbind(sc_port_base &pb) override
{
sc_port_b<IF> *p = dynamic_cast<sc_port_b<IF> *>(&pb);
if (!p)
std::vector<IF *> _interfaces;
sc_interface *
- _gem5Interface(int n) const
+ _gem5Interface(int n) const override
{
if (n < 0 || n >= size()) {
report_error(SC_ID_GET_IF_, "index out of range");
return _interfaces[n];
}
void
- _gem5AddInterface(sc_interface *iface)
+ _gem5AddInterface(sc_interface *iface) override
{
IF *interface = dynamic_cast<IF *>(iface);
sc_assert(interface);
_interfaces.push_back(interface);
}
- const char *_ifTypeName() const { return typeid(IF).name(); }
+ const char *_ifTypeName() const override { return typeid(IF).name(); }
// Disabled
sc_port_b() {}
sc_port_b<IF>::bind(parent);
}
- virtual const char *kind() const { return "sc_port"; }
+ virtual const char *kind() const override { return "sc_port"; }
private:
// Disabled
sc_port(const sc_port<IF, N, P> &) {}
sc_port<IF, N, P> &operator = (const sc_port<IF, N, P> &) { return *this; }
- virtual sc_port_policy _portPolicy() const { return P; }
+ virtual sc_port_policy _portPolicy() const override { return P; }
};
} // namespace sc_core