mirror of
https://github.com/UltimMC/Launcher.git
synced 2025-12-14 04:32:14 +00:00
Profiler support. Currently JProfiler and JVisualVM are implemented.
This commit is contained in:
39
logic/profiler/BaseProfiler.h
Normal file
39
logic/profiler/BaseProfiler.h
Normal file
@@ -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;
|
||||
};
|
||||
Reference in New Issue
Block a user