diff options
author | Jan Dalheimer <jan@dalheimer.de> | 2014-02-15 14:19:35 +0100 |
---|---|---|
committer | Jan Dalheimer <jan@dalheimer.de> | 2014-02-15 14:19:35 +0100 |
commit | efa8e26a3f3f7ba5e536cd10e86303b4fe1baba0 (patch) | |
tree | 4fcd3e9f210c92dbeac9f820f2ab1fd2d6dd9e58 /logic/profiler/BaseProfiler.h | |
parent | 5cf599673db88b39100ffca78e10bbe5e10200d7 (diff) | |
download | PrismLauncher-efa8e26a3f3f7ba5e536cd10e86303b4fe1baba0.tar.gz PrismLauncher-efa8e26a3f3f7ba5e536cd10e86303b4fe1baba0.tar.bz2 PrismLauncher-efa8e26a3f3f7ba5e536cd10e86303b4fe1baba0.zip |
Profiler support. Currently JProfiler and JVisualVM are implemented.
Diffstat (limited to 'logic/profiler/BaseProfiler.h')
-rw-r--r-- | logic/profiler/BaseProfiler.h | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/logic/profiler/BaseProfiler.h b/logic/profiler/BaseProfiler.h new file mode 100644 index 00000000..2986c8e1 --- /dev/null +++ b/logic/profiler/BaseProfiler.h @@ -0,0 +1,39 @@ +#pragma once + +#include <QObject> + +class OneSixInstance; +class SettingsObject; +class MinecraftProcess; + +class BaseProfiler : public QObject +{ + Q_OBJECT +public: + explicit BaseProfiler(OneSixInstance *instance, QObject *parent = 0); + virtual ~BaseProfiler(); + +public +slots: + void beginProfiling(MinecraftProcess *process); + +protected: + OneSixInstance *m_instance; + + virtual void beginProfilingImpl(MinecraftProcess *process) = 0; + +signals: + void readyToLaunch(const QString &message); +}; + +class BaseProfilerFactory +{ +public: + virtual ~BaseProfilerFactory(); + + virtual void registerSettings(SettingsObject *settings) = 0; + + virtual BaseProfiler *createProfiler(OneSixInstance *instance, QObject *parent = 0) = 0; + + virtual bool check(const QString &path, QString *error) = 0; +}; |