PrismLauncher/launcher/java/JavaVersion.h

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

50 lines
885 B
C
Raw Normal View History

#pragma once
#include <QString>
// NOTE: apparently the GNU C library pollutes the global namespace with these... undef them.
#ifdef major
#undef major
#endif
#ifdef minor
#undef minor
#endif
class JavaVersion
{
friend class JavaVersionTest;
public:
JavaVersion() {}
JavaVersion(const QString & rhs);
2018-07-15 13:51:05 +01:00
JavaVersion & operator=(const QString & rhs);
2018-07-15 13:51:05 +01:00
bool operator<(const JavaVersion & rhs);
bool operator==(const JavaVersion & rhs);
bool operator>(const JavaVersion & rhs);
2018-07-15 13:51:05 +01:00
bool requiresPermGen();
2018-07-15 13:51:05 +01:00
QString toString();
2018-07-15 13:51:05 +01:00
int major()
{
return m_major;
}
int minor()
{
return m_minor;
}
int security()
{
return m_security;
}
private:
QString m_string;
int m_major = 0;
int m_minor = 0;
int m_security = 0;
bool m_parseable = false;
QString m_prerelease;
};