|
NAH 1.0.6
Native Application Host - Library API Reference
|
Semantic Versioning 2.0.0 support. More...
#include <cstdint>#include <semver/semver.hpp>#include <optional>#include <string>#include <vector>Go to the source code of this file.
Classes | |
| struct | nah::Constraint |
| A single comparator constraint (e.g., ">=1.0.0" or "<2.0.0") More... | |
| struct | nah::VersionRange |
| A version range is a union of comparator sets (OR) More... | |
Namespaces | |
| namespace | nah |
Typedefs | |
| using | nah::ComparatorSet = std::vector< Constraint > |
| using | nah::Version = semver::version |
| Semantic version type (MAJOR.MINOR.PATCH[-prerelease][+build]) | |
Enumerations | |
| enum class | nah::Comparator { nah::Eq , nah::Lt , nah::Le , nah::Gt , nah::Ge } |
| Comparator operators for range expressions. More... | |
Functions | |
| std::optional< VersionRange > | nah::parse_range (const std::string &str) |
| Parse a version range string. | |
| std::optional< Version > | nah::parse_version (const std::string &str) |
| Parse a SemVer 2.0.0 version string. | |
| bool | nah::satisfies (const Version &version, const ComparatorSet &set) |
| Check if a version satisfies a comparator set (all constraints) | |
| bool | nah::satisfies (const Version &version, const Constraint &constraint) |
| Check if a version satisfies a single constraint. | |
| bool | nah::satisfies (const Version &version, const VersionRange &range) |
| Check if a version satisfies a version range (any set) | |
Semantic Versioning 2.0.0 support.
NAH uses SemVer 2.0.0 (https://semver.org/spec/v2.0.0.html) for all version handling. This header provides:
Definition in file semver.hpp.