1 #ifndef ARBITER_VERSION_H 2 #define ARBITER_VERSION_H 8 #include <arbiter/Value.h> 23 ArbiterSemanticVersion *
ArbiterCreateSemanticVersion (
unsigned major,
unsigned minor,
unsigned patch,
const char *prereleaseVersion,
const char *buildMetadata);
85 typedef struct ArbiterSelectedVersion ArbiterSelectedVersion;
119 typedef struct ArbiterSelectedVersionList ArbiterSelectedVersionList;
const char * ArbiterGetBuildMetadata(const ArbiterSemanticVersion *version)
Returns the build metadata string from a semantic version, or NULL if there is not one associated wit...
const void * ArbiterSelectedVersionMetadata(const ArbiterSelectedVersion *version)
Returns any metadata pointer which was provided to ArbiterCreateSelectedVersion().
unsigned ArbiterGetMinorVersion(const ArbiterSemanticVersion *version)
Returns the minor version number (x.Y.z) from a semantic version.
const ArbiterSemanticVersion * ArbiterSelectedVersionSemanticVersion(const ArbiterSelectedVersion *version)
Returns the semantic version which corresponds to the given selected version, or NULL if there is no ...
unsigned ArbiterGetPatchVersion(const ArbiterSemanticVersion *version)
Returns the patch version number (x.y.Z) from a semantic version.
int ArbiterCompareVersionOrdering(const ArbiterSemanticVersion *lhs, const ArbiterSemanticVersion *rhs)
Orders two semantic versions relative to each other.
bool operator>=(const ArbiterSemanticVersion &other) const noexcept
unsigned ArbiterGetMajorVersion(const ArbiterSemanticVersion *version)
Returns the major version number (X.y.z) from a semantic version.
ArbiterSelectedVersion * ArbiterCreateSelectedVersion(const ArbiterSemanticVersion *semanticVersion, ArbiterUserValue metadata)
Creates a selected version which corresponds to the given semantic version.
ArbiterSemanticVersion * ArbiterCreateSemanticVersionFromString(const char *string)
Attempts to parse the given NUL-terminated string into a semantic version, returning NULL if a parse ...
ArbiterSemanticVersion * ArbiterCreateSemanticVersion(unsigned major, unsigned minor, unsigned patch, const char *prereleaseVersion, const char *buildMetadata)
Creates a semantic version with the given components.
const char * ArbiterGetPrereleaseVersion(const ArbiterSemanticVersion *version)
Returns the prerelease version string from a semantic version, or NULL if there is not one associated...
ArbiterSelectedVersionList * ArbiterCreateSelectedVersionList(const ArbiterSelectedVersion *const *versions, size_t count)
Creates a version list which wraps a C array of ArbiterSelectedVersion objects.