summaryrefslogtreecommitdiffstats
path: root/utils/regtools/qeditor/analyser.h
diff options
context:
space:
mode:
authorAmaury Pouly <amaury.pouly@gmail.com>2014-02-09 02:13:53 +0100
committerAmaury Pouly <amaury.pouly@gmail.com>2014-02-10 23:14:26 +0100
commit3d07706c05c46878533f55f26bbe02d7904efd75 (patch)
treef1b549c275f7a27f9e7038e5fc4eccb94bf8be45 /utils/regtools/qeditor/analyser.h
parent8358707d8276dd297655395b922560e3c65631e1 (diff)
downloadrockbox-3d07706c05c46878533f55f26bbe02d7904efd75.tar.gz
rockbox-3d07706c05c46878533f55f26bbe02d7904efd75.zip
regtools/qeditor: rewrite soc handling
The code was a mess with respect to soc handling: some code just plain copied the SoC descriptor which are big objects, some was using indexes. The new soc factor out everything in a few classes which hide these ugly details so that descriptors are never copied. Change-Id: I17af8b47f997a528b58221621389d42d24fded93
Diffstat (limited to 'utils/regtools/qeditor/analyser.h')
-rw-r--r--utils/regtools/qeditor/analyser.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/utils/regtools/qeditor/analyser.h b/utils/regtools/qeditor/analyser.h
index 33094574c1..a06652bfb0 100644
--- a/utils/regtools/qeditor/analyser.h
+++ b/utils/regtools/qeditor/analyser.h
@@ -10,12 +10,12 @@ class Analyser : public QObject
{
Q_OBJECT
public:
- Analyser(const soc_t& soc, IoBackend *backend);
+ Analyser(const SocRef& soc, IoBackend *backend);
virtual ~Analyser();
virtual QWidget *GetWidget() = 0;
protected:
- soc_t m_soc;
+ const SocRef& m_soc;
IoBackend *m_io_backend;
};
@@ -28,7 +28,7 @@ public:
virtual QString GetName() = 0;
virtual bool SupportSoc(const QString& soc_name) = 0;
// return NULL of soc is not handled by the analyser
- virtual Analyser *Create(const soc_t& soc, IoBackend *backend) = 0;
+ virtual Analyser *Create(const SocRef& soc, IoBackend *backend) = 0;
private:
QString m_name;
@@ -51,9 +51,9 @@ public:
virtual QString GetName() { return m_name; }
virtual bool SupportSoc(const QString& soc_name) { return T::SupportSoc(soc_name); }
// return NULL of soc is not handled by the analyser
- virtual T *Create(const soc_t& soc, IoBackend *backend)
+ virtual T *Create(const SocRef& soc, IoBackend *backend)
{
- if(!T::SupportSoc(soc.name.c_str()))
+ if(!T::SupportSoc(soc.GetSoc().name.c_str()))
return 0;
return new T(soc, backend);
}