diff options
author | Miikka Heikkinen <miikka.heikkinen@digia.com> | 2014-05-21 13:37:11 +0300 |
---|---|---|
committer | Miikka Heikkinen <miikka.heikkinen@digia.com> | 2014-05-22 08:03:06 +0300 |
commit | cb79f11be1c0c379a1eccea62606a58b73442f2f (patch) | |
tree | 0e8409d491897b4fc9d1929ea1e13e575c6b7198 /src/datavisualization/utils/objecthelper_p.h | |
parent | 37a82fbeb7aa59260fe5f31b62228914ee4a44a3 (diff) |
Cache ObjectHelper instances
Task-number: QTRD-2792
Change-Id: I90d83bd9b73a0f337fd26f1b92000e72b3ec0607
Reviewed-by: Tomi Korpipää <tomi.korpipaa@digia.com>
Diffstat (limited to 'src/datavisualization/utils/objecthelper_p.h')
-rw-r--r-- | src/datavisualization/utils/objecthelper_p.h | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/datavisualization/utils/objecthelper_p.h b/src/datavisualization/utils/objecthelper_p.h index 0260dd05..93dc6c94 100644 --- a/src/datavisualization/utils/objecthelper_p.h +++ b/src/datavisualization/utils/objecthelper_p.h @@ -35,17 +35,26 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION +class Abstract3DRenderer; + class ObjectHelper : public AbstractObjectHelper { +private: + ObjectHelper(const QString &objectFile); public: - ObjectHelper(const QString &objectFile = QString()); ~ObjectHelper(); - void setObjectFile(const QString &objectFile); + static void resetObjectHelper(const Abstract3DRenderer *cacheId, ObjectHelper *&obj, + const QString &meshFile); + static void releaseObjectHelper(const Abstract3DRenderer *cacheId, ObjectHelper *&obj); - void load(); + inline const QString &objectFile() { return m_objectFile; } private: + static ObjectHelper *getObjectHelper(const Abstract3DRenderer *cacheId, + const QString &objectFile); + void load(); + QString m_objectFile; }; |