32a33
> #include "../utils/sc_report_handler.hh"
74,75c75,91
< virtual void bind(IF &i) { interface = &i; }
< operator IF & () { return *interface; }
---
> virtual void
> bind(IF &i)
> {
> if (interface) {
> SC_REPORT_ERROR("(E126) sc_export instance already bound", name());
> return;
> }
> interface = &i;
> }
> operator IF & ()
> {
> if (!interface) {
> SC_REPORT_ERROR("(E120) sc_export instance has no interface",
> name());
> }
> return *interface;
> }
78,79c94,111
< IF *operator -> () { return interface; }
< const IF *operator -> () const { return interface; }
---
> IF *
> operator -> ()
> {
> if (!interface) {
> SC_REPORT_ERROR("(E120) sc_export instance has no interface",
> name());
> }
> return interface;
> }
> const IF *
> operator -> () const
> {
> if (!interface) {
> SC_REPORT_ERROR("(E120) sc_export instance has no interface",
> name());
> }
> return interface;
> }
86c118,126
< void end_of_elaboration() {}
---
> void
> end_of_elaboration()
> {
> if (!interface) {
> std::string msg = "export not bound: export '";
> msg = msg + name() + "' (" + kind() + ")";
> SC_REPORT_ERROR("(E109) complete binding failed", msg.c_str());
> }
> }