From: Gabe Black Date: Sat, 21 Jul 2018 02:25:48 +0000 (-0700) Subject: systemc: Promote some functions to sc_export_base. X-Git-Tag: v19.0.0.0~1827 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a91caa594bcc4691c5d18e400a773e082c71d240;p=gem5.git systemc: Promote some functions to sc_export_base. There are a few functions which return a generic sc_interface pointer which were (in the spec) defined to be in the interface type specific sc_export class. They don't need to be and aren't in the Accellera implementation, and without having them in the base class there's no good way to get at a generic interface pointer from an export. Change-Id: Iba692c79bf1d4f7684f28447d8b22c88ef4b804d Reviewed-on: https://gem5-review.googlesource.com/12043 Reviewed-by: Gabe Black Maintainer: Gabe Black --- diff --git a/src/systemc/ext/core/sc_export.hh b/src/systemc/ext/core/sc_export.hh index dc2176492..421e063c0 100644 --- a/src/systemc/ext/core/sc_export.hh +++ b/src/systemc/ext/core/sc_export.hh @@ -41,6 +41,9 @@ class sc_export_base : public sc_object { public: void warn_unimpl(const char *func) const; + + virtual sc_interface *get_iterface() = 0; + virtual const sc_interface *get_interface() const = 0; }; template @@ -71,14 +74,14 @@ class sc_export : public sc_export_base return nullptr; } - virtual sc_interface * - get_iterface() + sc_interface * + get_iterface() override { warn_unimpl(__PRETTY_FUNCTION__); return nullptr; } - virtual const sc_interface * - get_interface() const + const sc_interface * + get_interface() const override { warn_unimpl(__PRETTY_FUNCTION__); return nullptr;