Arbiter
Dependency manager library that supports decentralization
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
ArbiterSemanticVersion Struct Referencefinal

Represents a semantic version, as defined by semver.org. More...

Collaboration diagram for ArbiterSemanticVersion:
[legend]

Public Member Functions

 ArbiterSemanticVersion (unsigned major, unsigned minor, unsigned patch, Arbiter::Optional< std::string > prereleaseVersion=Arbiter::Optional< std::string >(), Arbiter::Optional< std::string > buildMetadata=Arbiter::Optional< std::string >())
 
std::unique_ptr< Arbiter::Baseclone () const override
 
std::ostream & describe (std::ostream &os) const override
 
bool operator!= (const Base &other) const
 
bool operator< (const ArbiterSemanticVersion &other) const noexcept
 
bool operator<= (const ArbiterSemanticVersion &other) const noexcept
 
bool operator== (const Arbiter::Base &other) const override
 
bool operator> (const ArbiterSemanticVersion &other) const noexcept
 
bool operator>= (const ArbiterSemanticVersion &other) const noexcept
 

Static Public Member Functions

static Arbiter::Optional< ArbiterSemanticVersionfromString (const std::string &versionString)
 Attempts to parse a well-formed semantic version from a string. More...
 

Public Attributes

Arbiter::Optional< std::string > _buildMetadata
 
unsigned _major
 
unsigned _minor
 
unsigned _patch
 
Arbiter::Optional< std::string > _prereleaseVersion
 

Detailed Description

Represents a semantic version, as defined by semver.org.

Definition at line 17 of file Version.h.

Constructor & Destructor Documentation

§ ArbiterSemanticVersion()

ArbiterSemanticVersion::ArbiterSemanticVersion ( unsigned  major,
unsigned  minor,
unsigned  patch,
Arbiter::Optional< std::string >  prereleaseVersion = Arbiter::Optional<std::string>(),
Arbiter::Optional< std::string >  buildMetadata = Arbiter::Optional<std::string>() 
)

Definition at line 27 of file Version.h.

Member Function Documentation

§ clone()

std::unique_ptr<Arbiter::Base> ArbiterSemanticVersion::clone ( ) const
overridevirtual

Implements Arbiter::Base.

§ describe()

std::ostream& ArbiterSemanticVersion::describe ( std::ostream &  os) const
overridevirtual

Implements Arbiter::Base.

§ fromString()

static Arbiter::Optional<ArbiterSemanticVersion> ArbiterSemanticVersion::fromString ( const std::string &  versionString)
static

Attempts to parse a well-formed semantic version from a string.

§ operator!=()

bool Arbiter::Base::operator!= ( const Base other) const
inherited

Definition at line 28 of file Types.h.

§ operator<()

bool ArbiterSemanticVersion::operator< ( const ArbiterSemanticVersion other) const
noexcept

§ operator<=()

bool ArbiterSemanticVersion::operator<= ( const ArbiterSemanticVersion other) const
noexcept

Definition at line 57 of file Version.h.

§ operator==()

bool ArbiterSemanticVersion::operator== ( const Arbiter::Base other) const
overridevirtual

Implements Arbiter::Base.

§ operator>()

bool ArbiterSemanticVersion::operator> ( const ArbiterSemanticVersion other) const
noexcept

Definition at line 47 of file Version.h.

§ operator>=()

bool ArbiterSemanticVersion::operator>= ( const ArbiterSemanticVersion other) const
noexcept

Definition at line 52 of file Version.h.

Member Data Documentation

§ _buildMetadata

Arbiter::Optional<std::string> ArbiterSemanticVersion::_buildMetadata

Definition at line 25 of file Version.h.

§ _major

unsigned ArbiterSemanticVersion::_major

Definition at line 20 of file Version.h.

§ _minor

unsigned ArbiterSemanticVersion::_minor

Definition at line 21 of file Version.h.

§ _patch

unsigned ArbiterSemanticVersion::_patch

Definition at line 22 of file Version.h.

§ _prereleaseVersion

Arbiter::Optional<std::string> ArbiterSemanticVersion::_prereleaseVersion

Definition at line 24 of file Version.h.


The documentation for this struct was generated from the following file: