rippled
Public Types | Public Member Functions | Public Attributes | List of all members
beast::SemanticVersion Class Reference

A Semantic Version number. More...

Collaboration diagram for beast::SemanticVersion:
Collaboration graph
[legend]

Public Types

using identifier_list = std::vector< std::string >
 

Public Member Functions

 SemanticVersion ()
 
 SemanticVersion (std::string const &version)
 
bool parse (std::string const &input)
 Parse a semantic version string. More...
 
std::string print () const
 Produce a string from semantic version components. More...
 
bool isRelease () const noexcept
 
bool isPreRelease () const noexcept
 

Public Attributes

int majorVersion
 
int minorVersion
 
int patchVersion
 
identifier_list preReleaseIdentifiers
 
identifier_list metaData
 

Detailed Description

A Semantic Version number.

Identifies the build of a particular version of software using the Semantic Versioning Specification described here:

http://semver.org/

Definition at line 35 of file SemanticVersion.h.

Member Typedef Documentation

◆ identifier_list

Definition at line 38 of file SemanticVersion.h.

Constructor & Destructor Documentation

◆ SemanticVersion() [1/2]

beast::SemanticVersion::SemanticVersion ( )

Definition at line 156 of file SemanticVersion.cpp.

◆ SemanticVersion() [2/2]

beast::SemanticVersion::SemanticVersion ( std::string const &  version)

Definition at line 161 of file SemanticVersion.cpp.

Member Function Documentation

◆ parse()

bool beast::SemanticVersion::parse ( std::string const &  input)

Parse a semantic version string.

The parsing is as strict as possible.

Returns
true if the string was parsed.

Definition at line 168 of file SemanticVersion.cpp.

◆ print()

std::string beast::SemanticVersion::print ( ) const

Produce a string from semantic version components.

Definition at line 236 of file SemanticVersion.cpp.

◆ isRelease()

bool beast::SemanticVersion::isRelease ( ) const
noexcept

Definition at line 63 of file SemanticVersion.h.

◆ isPreRelease()

bool beast::SemanticVersion::isPreRelease ( ) const
noexcept

Definition at line 68 of file SemanticVersion.h.

Member Data Documentation

◆ majorVersion

int beast::SemanticVersion::majorVersion

Definition at line 40 of file SemanticVersion.h.

◆ minorVersion

int beast::SemanticVersion::minorVersion

Definition at line 41 of file SemanticVersion.h.

◆ patchVersion

int beast::SemanticVersion::patchVersion

Definition at line 42 of file SemanticVersion.h.

◆ preReleaseIdentifiers

identifier_list beast::SemanticVersion::preReleaseIdentifiers

Definition at line 44 of file SemanticVersion.h.

◆ metaData

identifier_list beast::SemanticVersion::metaData

Definition at line 45 of file SemanticVersion.h.