10MMIND_API_EXPORT std::string getApiVersionInfo();
27 Version(
int major,
int minor,
int patch) : _major(major), _minor(minor), _patch(patch) {}
49 return _major > other._major ||
50 (_major == other._major &&
51 (_minor > other._minor || (_minor == other._minor && _patch >= other._patch)));
70 snprintf(buff,
sizeof(buff),
"%d.%d.%d", _major, _minor, _patch);
79 std::regex rege(R
"((\d+).(\d+).(\d+))");
81 if (std::regex_search(version, result, rege)) {
82 _major = std::stoi(result.str(1));
83 _minor = std::stoi(result.str(2));
84 _patch = std::stoi(result.str(3));
Version(const std::string &version)
Constructor with a string input parameter.
bool operator==(const Version &other) const
Overloads the == operator to determine if two Version objects are equal.
Version()=default
Default constructor.
void fromString(const std::string &version)
Converts a string of version to a Version object.
bool operator!=(const Version &other) const
Overloads the != operator to determine if two Version objects are unequal.
bool operator<=(const Version &other) const
Overloads the <= operator to determine if one Version object is smaller than or equal to another.
bool operator>=(const Version &other) const
Overloads the >= operator to determine if one Version object is greater than or equal to the other.
std::string toString() const
Converts a Version object to string.
bool operator<(const Version &other) const
Overloads the < operator to determine if one Version object is smaller than the other.
bool isEmpty() const
Checks if a Version object is empty.
Version(int major, int minor, int patch)
Constructor with three integer input parameters.