From 805033d99b0c9542b93a8923ad28b06e8dbeb8ff Mon Sep 17 00:00:00 2001 From: Johannes Feldmann Date: Wed, 30 May 2018 11:02:36 +0200 Subject: [PATCH] Make static methods for instance handling private in derived classes. --- DRAMSys/library/src/common/jsonAddressDecoder.h | 3 +++ DRAMSys/library/src/common/xmlAddressdecoder.h | 3 +++ 2 files changed, 6 insertions(+) diff --git a/DRAMSys/library/src/common/jsonAddressDecoder.h b/DRAMSys/library/src/common/jsonAddressDecoder.h index 10180f21..e6838da2 100644 --- a/DRAMSys/library/src/common/jsonAddressDecoder.h +++ b/DRAMSys/library/src/common/jsonAddressDecoder.h @@ -65,6 +65,9 @@ private: vector> m_vColumnBits; // This container stores for each column bit a pair which consists of "First/Number of the column bit" and "Second/Number of the address bit" + static AddressDecoder &getInstance(); + static void createInstance(Type t); + public: virtual void setConfiguration(std::string url); diff --git a/DRAMSys/library/src/common/xmlAddressdecoder.h b/DRAMSys/library/src/common/xmlAddressdecoder.h index 4178ca98..97cbd9eb 100644 --- a/DRAMSys/library/src/common/xmlAddressdecoder.h +++ b/DRAMSys/library/src/common/xmlAddressdecoder.h @@ -59,6 +59,9 @@ private: tinyxml2::XMLElement *addressmapping; + static AddressDecoder &getInstance(); + static void createInstance(Type t); + public: virtual DecodedAddress decodeAddress(sc_dt::uint64 addr); virtual sc_dt::uint64 encodeAddress(DecodedAddress n);