FMT 1.2.0
Forest management tools for forest planning
Loading...
Searching...
No Matches
FMTVersion.h
Go to the documentation of this file.
1
2/*
3Copyright (c) 2019 Gouvernement du Québec
4
5SPDX-License-Identifier: LiLiQ-R-1.1
6License-Filename: LICENSES/EN/LiLiQ-R11unicode.txt
7*/
8
9#ifndef FMTVERSION_Hm_included
10#define FMTVERSION_Hm_included
11
12#include <string>
13#include <vector>
14
15#ifndef FMT_MAJOR
16 #define FMT_MAJOR 0
17#endif
18
19#ifndef FMT_MINOR
20 #define FMT_MINOR 0
21#endif
22
23#ifndef FMT_PATCH
24 #define FMT_PATCH 0
25#endif
26
27#include "FMTObject.h"
28
30namespace Version
31{
32// DocString: FMTVersion
40 {
41 public:
42 // DocString: FMTVersion()
46 FMTVersion()=default;
47 // DocString: ~FMTVersion()
51 ~FMTVersion()=default;
52 // DocString: FMTVersion::getMajor
57 static int getMajor();
58 // DocString: FMTVersion::getMinor
63 static int getMinor();
64 // DocString: FMTVersion::getPatch
69 static int getPatch();
70 // DocString: FMTVersion::getVersion
75 static std::string getVersion();
76 // DocString: FMTVersion::getDateNow
81 static std::string getDateNow();
82 // DocString: FMTVersion::getBuildDate
87 static std::string getBuildDate();
88 // DocString: FMTVersion::isAtLeast
96 static bool isAtLeast(int major, int minor, int patch);
97 // DocString: FMTVersion::hasFeature
103 static bool hasFeature(const std::string& name);
104 // DocString: FMTVersion::getLicense
110 static std::string getLicense(bool french=false);
111 // DocString: FMTVersion::getChangelog
117 static std::string getChangelog(bool french=false);
118 };
119}
120
121#endif
#define FMTEXPORT
Definition: FMTutility.h:125
Base class of multiple FMT classes holding a shared exception handler pointer and logger.
Definition: FMTObject.h:49
Class exposing the version of FMT, its build date and the available features.
Definition: FMTVersion.h:40
static int getMajor()
Return the major version of FMT.
static std::string getChangelog(bool french=false)
Return the changelog as a string.
static std::string getVersion()
Return the version string of FMT (Major.Minor.Patch).
static std::string getLicense(bool french=false)
Return the license as a string.
static int getMinor()
Return the minor version of FMT.
static std::string getBuildDate()
Return the build date of FMT.
static bool hasFeature(const std::string &name)
Test if the FMT version has the named feature (GDAL, OSI, MOSEK, PYTHON, R).
static int getPatch()
Return the patch version of FMT.
static std::string getDateNow()
Return the actual date (Day Month date).
FMTVersion()=default
Default constructor for FMTVersion.
~FMTVersion()=default
Default destructor for FMTVersion.
static bool isAtLeast(int major, int minor, int patch)
Test if the FMT version is at least the given major, minor and patch.
Namespace for handling FMT versions and features.
Definition: FMTVersion.h:31