summaryrefslogtreecommitdiffstats
path: root/logic/profiler/BaseProfiler.h
blob: 2986c8e155abb46ac6babb75986b707d14cddb0b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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;
};