🛰️航天仿真算法库 SpaceAST 0.0.1
载入中...
搜索中...
未找到
ast::Version类 参考

#include <Version.hpp>

Public 成员函数

 Version ()=default
 
 Version (StringView version)
 
 Version (int major, int minor, int patch=-1, StringView prerelease={}, StringView build={})
 
int compare (const Version &other) const
 
bool operator== (const Version &other) const
 
bool operator!= (const Version &other) const
 
bool operator< (const Version &other) const
 
bool operator> (const Version &other) const
 
bool operator<= (const Version &other) const
 
bool operator>= (const Version &other) const
 
bool valid () const
 
int major () const
 
void setMajor (int major)
 
int minor () const
 
void setMinor (int minor)
 
int patch () const
 
void setPatch (int patch)
 
const std::string & prerelease () const
 
void setPrerelease (StringView prerelease)
 
const std::string & build () const
 
void setBuild (StringView build)
 

静态 Public 成员函数

static Version Parse (StringView version)
 

详细描述

版本号

根据 Semantic Versioning 2.0.0 规范定义的版本号 版本号的格式为:主版本号.次版本号.修订版本号[-预发布版本号+构建版本号]

参见
https://semver.org/lang/zh-CN/

构造及析构函数说明

◆ Version() [1/2]

ast::Version::Version ( StringView version)
explicit
参数
version版本号字符串

◆ Version() [2/2]

ast::Version::Version ( int major,
int minor,
int patch = -1,
StringView prerelease = {},
StringView build = {} )
参数
major主版本号
minor次版本号
patch修订版本号,如果<0,则不包含修订版本号
prerelease预发布版本号,如果为空,则不包含预发布版本号
build构建版本号,如果为空,则不包含构建版本号

成员函数说明

◆ Parse()

Version ast::Version::Parse ( StringView version)
static

解析版本号字符串

参数
version版本号字符串
返回
版本号

该类的文档由以下文件生成: