Library: OSP
Package: Core
Header: Poco/OSP/Version.h
This class represents a bundle version number in OSP. A version number consists of a major version number, a minor version number and a revision number. Optionally, a release designation can be specified.
A Version object can be formatted as a string. Also, a Version object can be constructed by parsing a string.
The string representation of a version number is <major>.<minor>.<revision>[-<designation>]
In a comparison, only major, minor and revision number are considered. The release designation is ignored.
Member Functions: designation, major, minor, operator !=, operator <, operator <=, operator =, operator ==, operator >, operator >=, parse, revision, swap, toString
Version();
Creates a Version with all numbers set to zero.
Version(
const Version & version
);
Creates a Version by copying another one.
Version(
const std::string & version
);
Creates a Version from its string representation.
Version(
int major,
int minor,
int revision
);
Creates a Version from a major, minor and revision number.
Version(
int major,
int minor,
int revision,
const std::string & designation
);
Creates a Version from a major, minor and revision number, as well as a release designation.
~Version();
Destroys the Version.
const std::string & designation() const;
Returns the release designation.
int major() const;
Returns the major version number.
int minor() const;
Returns the minor version number.
bool operator != (
const Version & version
) const;
bool operator < (
const Version & version
) const;
bool operator <= (
const Version & version
) const;
Version & operator = (
const Version & version
);
Assigns another version.
Version & operator = (
const std::string & version
);
Assigns a version parsed from a string.
bool operator == (
const Version & version
) const;
bool operator > (
const Version & version
) const;
bool operator >= (
const Version & version
) const;
int revision() const;
Returns the revision number.
void swap(
Version & version
);
Swaps the version with another one.
std::string toString() const;
Returns a string representation of the version.
void parse(
const std::string & str
);
Parses the version from a string.