8#include <boost/python/class.hpp>
9#include <boost/python/def.hpp>
10#include <boost/python/docstring_options.hpp>
11#include <boost/python/make_function.hpp>
12#include <boost/python/module.hpp>
13#include <boost/python/type_id.hpp>
22std::string getMajor(
const MantidVersion::VersionInfo &self) {
return self.major; }
24std::string getMinor(
const MantidVersion::VersionInfo &self) {
return self.minor; }
26std::string getPatch(
const MantidVersion::VersionInfo &self) {
return self.patch; }
28std::string getTweak(
const MantidVersion::VersionInfo &self) {
return self.tweak; }
30std::string getStr(
const MantidVersion::VersionInfo &self) {
31 return self.major +
"." + self.minor +
"." + self.patch + self.tweak;
38 class_<MantidVersion::VersionInfo>(
"VersionInfo")
39 .add_property(
"major", make_function(&getMajor),
"The major release version")
40 .add_property(
"minor", make_function(&getMinor),
"The minor release version")
41 .add_property(
"patch", make_function(&getPatch),
"The patch release version")
42 .add_property(
"tweak", make_function(&getTweak),
"The tweak release version")
43 .def(
"__str__", make_function(&getStr),
"The version in the standard form: {Major}.{Minor}.{Patch}{Tweak}");
46 "Returns the Mantid version string in the form \"{Major}.{Minor}.{Patch}{Tweak}\"");
48 "Returns a data structure containing the major, minor, patch, and tweak parts of the version.");
50 "Returns the url to the most applicable release notes");
void export_MantidVersion()
Class containing static methods to return the Mantid version number and date.
static const VersionInfo versionInfo()
A data structure containing the full version info.
static const char * version()
The full version number.
static std::string doi()
The DOI for this release of Mantid.
static std::string releaseNotes()
The url to the most applicable release notes.
static std::string paperCitation()
The citation for the Mantid paper.
static const char * revisionFull()
The full SHA-1 of the last commit.
static const char * releaseDate()
The date of the last commit.
static const char * revision()
The abbreviated SHA-1 of the last commit.