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 getStr(
const MantidVersion::VersionInfo &self) {
return self.major +
"." + self.minor +
"." + self.patch; }
34 class_<MantidVersion::VersionInfo>(
"VersionInfo")
35 .add_property(
"major", make_function(&getMajor),
"The major release version")
36 .add_property(
"minor", make_function(&getMinor),
"The minor release version")
37 .add_property(
"patch", make_function(&getPatch),
"The patch release version")
38 .def(
"__str__", make_function(&getStr),
"The version in the standard form: Maj.Min.Pat");
41 "Returns the Mantid version string in the form \"major.minor.patch\"");
43 "Returns a data structure containing the major, minor, and patch parts of the version.");
45 "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.