From a91caa594bcc4691c5d18e400a773e082c71d240 Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Fri, 20 Jul 2018 19:25:48 -0700 Subject: 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 --- src/systemc/ext/core/sc_export.hh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) 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; -- cgit v1.2.3