summaryrefslogtreecommitdiffstats
path: root/api/logic/java/JavaInstall.h
blob: 64be40d190db251550195a6d397e97129ca5b61d (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
#pragma once

#include "BaseVersion.h"
#include "JavaVersion.h"

struct JavaInstall : public BaseVersion
{
    JavaInstall(){}
    JavaInstall(QString id, QString arch, QString path)
    : id(id), arch(arch), path(path)
    {
    }
    virtual QString descriptor()
    {
        return id.toString();
    }

    virtual QString name()
    {
        return id.toString();
    }

    virtual QString typeString() const
    {
        return arch;
    }

    bool operator<(const JavaInstall & rhs);
    bool operator==(const JavaInstall & rhs);
    bool operator>(const JavaInstall & rhs);

    JavaVersion id;
    QString arch;
    QString path;
    bool recommended = false;
};

typedef std::shared_ptr<JavaInstall> JavaInstallPtr;