|
xoreos
0.0.5
|
#include <version.h>
Public Member Functions | |
| Version (Aurora::Platform platform) | |
| ~Version () | |
| bool | detect (const Common::UString &directory) |
| Try to detect the version of the NWN installation in this directory. More... | |
| bool | hasVersion () const |
| Did we detect a version? More... | |
| Aurora::Platform | getPlatform () const |
| Common::UString | getPlatformName () const |
| uint64 | getVersion () const |
| Return the combined version. More... | |
| uint16 | getVersionMajor () const |
| Return the major version. More... | |
| uint16 | getVersionMinor () const |
| Return the minor version. More... | |
| uint16 | getVersionBuild () const |
| Return the build number. More... | |
| Common::UString | getVersionString () const |
| bool | isTooOld () const |
| Is this version older than the optimum? More... | |
| bool | isTooNew () const |
| Is this version newer than the optimum? More... | |
Static Public Member Functions | |
| static uint64 | getOptimumVersion () |
| Return the optimum combined version. More... | |
| static uint16 | getOptimumVersionMajor () |
| Return the optimum major version. More... | |
| static uint16 | getOptimumVersionMinor () |
| Return the optimum minor version. More... | |
| static uint16 | getOptimumVersionBuild () |
| Return the optimum build number. More... | |
| static Common::UString | getOptimumVersionString () |
Private Member Functions | |
| bool | detectWindows (const Common::UString &directory) |
| bool | detectMacOSX (const Common::UString &directory) |
| bool | detectLinux (const Common::UString &directory) |
| byte * | readFile (const Common::UString &directory, const Common::UString &file, size_t &size) |
| byte * | readFile (const Common::UString &path, size_t &size) |
Private Attributes | |
| Aurora::Platform | _platform |
| uint16 | _versionMajor |
| v1.69.8109 -> 1 More... | |
| uint16 | _versionMinor |
| v1.69.8109 -> 69 More... | |
| uint16 | _versionBuild |
| v1.69.8109 -> 8109 More... | |
| uint64 | _version |
| The combined version number. More... | |
Static Private Attributes | |
| static const uint16 | kOptimumVersionMajor = 1 |
| static const uint16 | kOptimumVersionMinor = 69 |
| static const uint16 | kOptimumVersionBuild = 8109 |
| Engines::NWN::Version::Version | ( | Aurora::Platform | platform | ) |
Definition at line 58 of file version.cpp.
| Engines::NWN::Version::~Version | ( | ) |
Definition at line 63 of file version.cpp.
| bool Engines::NWN::Version::detect | ( | const Common::UString & | directory | ) |
Try to detect the version of the NWN installation in this directory.
Definition at line 130 of file version.cpp.
References _platform, _version, _versionBuild, _versionMajor, _versionMinor, detectLinux(), detectMacOSX(), detectWindows(), Aurora::kPlatformLinux, Aurora::kPlatformMacOSX, Aurora::kPlatformWindows, and MAKE_NWN_VERSION.

|
private |
Definition at line 283 of file version.cpp.
References _versionBuild, _versionMajor, _versionMinor, Common::ScopedPtrBase< T, Deallocator >::get(), kVersionUnix, and readFile().
Referenced by detect().


|
private |
Definition at line 224 of file version.cpp.
References _versionBuild, _versionMajor, _versionMinor, Common::UString::empty(), Common::FilePath::findSubDirectory(), Common::ScopedPtrBase< T, Deallocator >::get(), kVersionUnix, and readFile().
Referenced by detect().


|
private |
Definition at line 149 of file version.cpp.
References _versionBuild, _versionMajor, _versionMinor, Common::ScopedPtrBase< T, Deallocator >::get(), kBuildWin, kVersionWin, and readFile().
Referenced by detect().


|
static |
Return the optimum combined version.
Definition at line 98 of file version.cpp.
References kOptimumVersionBuild, kOptimumVersionMajor, kOptimumVersionMinor, and MAKE_NWN_VERSION.
Referenced by isTooNew(), and isTooOld().

|
static |
Return the optimum build number.
Definition at line 110 of file version.cpp.
References kOptimumVersionBuild.
|
static |
Return the optimum major version.
Definition at line 102 of file version.cpp.
References kOptimumVersionMajor.
|
static |
Return the optimum minor version.
Definition at line 106 of file version.cpp.
References kOptimumVersionMinor.
|
static |
Definition at line 114 of file version.cpp.
References Common::UString::format(), kOptimumVersionBuild, kOptimumVersionMajor, and kOptimumVersionMinor.

| Aurora::Platform Engines::NWN::Version::getPlatform | ( | ) | const |
Definition at line 70 of file version.cpp.
References _platform.
| Common::UString Engines::NWN::Version::getPlatformName | ( | ) | const |
Definition at line 74 of file version.cpp.
References _platform, and Aurora::getPlatformDescription().

| uint64 Engines::NWN::Version::getVersion | ( | ) | const |
| uint16 Engines::NWN::Version::getVersionBuild | ( | ) | const |
| uint16 Engines::NWN::Version::getVersionMajor | ( | ) | const |
| uint16 Engines::NWN::Version::getVersionMinor | ( | ) | const |
| Common::UString Engines::NWN::Version::getVersionString | ( | ) | const |
Definition at line 94 of file version.cpp.
References _versionBuild, _versionMajor, _versionMinor, and Common::UString::format().
Referenced by Engines::NWN::IngameMainMenu::initWidget(), and Engines::NWN::OptionsMenu::initWidget().


| bool Engines::NWN::Version::hasVersion | ( | ) | const |
Did we detect a version?
Definition at line 66 of file version.cpp.
References _version.
Referenced by Engines::NWN::OptionsMenu::initWidget().

| bool Engines::NWN::Version::isTooNew | ( | ) | const |
Is this version newer than the optimum?
Definition at line 123 of file version.cpp.
References _version, and getOptimumVersion().

| bool Engines::NWN::Version::isTooOld | ( | ) | const |
Is this version older than the optimum?
Definition at line 119 of file version.cpp.
References _version, and getOptimumVersion().

|
private |
Definition at line 331 of file version.cpp.
References Common::FileList::addDirectory(), and Common::FileList::findFirst().
Referenced by detectLinux(), detectMacOSX(), and detectWindows().


|
private |
Definition at line 340 of file version.cpp.
References Common::UString::empty(), Common::ScopedPtrBase< T, Deallocator >::get(), Common::ReadFile::open(), Common::ReadFile::read(), Common::ScopedPtrBase< T, Deallocator >::release(), and Common::ReadFile::size().

|
private |
Definition at line 77 of file version.h.
Referenced by detect(), getPlatform(), and getPlatformName().
|
private |
The combined version number.
Definition at line 82 of file version.h.
Referenced by detect(), getVersion(), hasVersion(), isTooNew(), and isTooOld().
|
private |
v1.69.8109 -> 8109
Definition at line 81 of file version.h.
Referenced by detect(), detectLinux(), detectMacOSX(), detectWindows(), getVersionBuild(), and getVersionString().
|
private |
v1.69.8109 -> 1
Definition at line 79 of file version.h.
Referenced by detect(), detectLinux(), detectMacOSX(), detectWindows(), getVersionMajor(), and getVersionString().
|
private |
v1.69.8109 -> 69
Definition at line 80 of file version.h.
Referenced by detect(), detectLinux(), detectMacOSX(), detectWindows(), getVersionMinor(), and getVersionString().
|
staticprivate |
Definition at line 75 of file version.h.
Referenced by getOptimumVersion(), getOptimumVersionBuild(), and getOptimumVersionString().
|
staticprivate |
Definition at line 73 of file version.h.
Referenced by getOptimumVersion(), getOptimumVersionMajor(), and getOptimumVersionString().
|
staticprivate |
Definition at line 74 of file version.h.
Referenced by getOptimumVersion(), getOptimumVersionMinor(), and getOptimumVersionString().
1.8.14