WPILibC++ 2024.1.1-beta-4
wpi::VersionTuple Class Reference

Represents a version number in the form major[.minor[.subminor[.build]]]. More...

#include </home/runner/work/allwpilib/allwpilib/wpiutil/src/main/native/thirdparty/llvm/include/wpi/VersionTuple.h>

Public Member Functions

constexpr VersionTuple ()
 
constexpr VersionTuple (unsigned Major)
 
constexpr VersionTuple (unsigned Major, unsigned Minor)
 
constexpr VersionTuple (unsigned Major, unsigned Minor, unsigned Subminor)
 
constexpr VersionTuple (unsigned Major, unsigned Minor, unsigned Subminor, unsigned Build)
 
bool empty () const
 Determine whether this version information is empty (e.g., all version components are zero). More...
 
unsigned getMajor () const
 Retrieve the major version number. More...
 
std::optional< unsigned > getMinor () const
 Retrieve the minor version number, if provided. More...
 
std::optional< unsigned > getSubminor () const
 Retrieve the subminor version number, if provided. More...
 
std::optional< unsigned > getBuild () const
 Retrieve the build version number, if provided. More...
 
VersionTuple withoutBuild () const
 Return a version tuple that contains only the first 3 version components. More...
 
VersionTuple withMajorReplaced (unsigned NewMajor) const
 Return a version tuple that contains a different major version but everything else is the same. More...
 
VersionTuple normalize () const
 Return a version tuple that contains only components that are non-zero. More...
 

Friends

bool operator== (const VersionTuple &X, const VersionTuple &Y)
 Determine if two version numbers are equivalent. More...
 
bool operator!= (const VersionTuple &X, const VersionTuple &Y)
 Determine if two version numbers are not equivalent. More...
 
bool operator< (const VersionTuple &X, const VersionTuple &Y)
 Determine whether one version number precedes another. More...
 
bool operator> (const VersionTuple &X, const VersionTuple &Y)
 Determine whether one version number follows another. More...
 
bool operator<= (const VersionTuple &X, const VersionTuple &Y)
 Determine whether one version number precedes or is equivalent to another. More...
 
bool operator>= (const VersionTuple &X, const VersionTuple &Y)
 Determine whether one version number follows or is equivalent to another. More...
 

Detailed Description

Represents a version number in the form major[.minor[.subminor[.build]]].

Constructor & Destructor Documentation

◆ VersionTuple() [1/5]

constexpr wpi::VersionTuple::VersionTuple ( )
inlineconstexpr

◆ VersionTuple() [2/5]

constexpr wpi::VersionTuple::VersionTuple ( unsigned  Major)
inlineexplicitconstexpr

◆ VersionTuple() [3/5]

constexpr wpi::VersionTuple::VersionTuple ( unsigned  Major,
unsigned  Minor 
)
inlineexplicitconstexpr

◆ VersionTuple() [4/5]

constexpr wpi::VersionTuple::VersionTuple ( unsigned  Major,
unsigned  Minor,
unsigned  Subminor 
)
inlineexplicitconstexpr

◆ VersionTuple() [5/5]

constexpr wpi::VersionTuple::VersionTuple ( unsigned  Major,
unsigned  Minor,
unsigned  Subminor,
unsigned  Build 
)
inlineexplicitconstexpr

Member Function Documentation

◆ empty()

bool wpi::VersionTuple::empty ( ) const
inline

Determine whether this version information is empty (e.g., all version components are zero).

◆ getBuild()

std::optional< unsigned > wpi::VersionTuple::getBuild ( ) const
inline

Retrieve the build version number, if provided.

◆ getMajor()

unsigned wpi::VersionTuple::getMajor ( ) const
inline

Retrieve the major version number.

◆ getMinor()

std::optional< unsigned > wpi::VersionTuple::getMinor ( ) const
inline

Retrieve the minor version number, if provided.

◆ getSubminor()

std::optional< unsigned > wpi::VersionTuple::getSubminor ( ) const
inline

Retrieve the subminor version number, if provided.

◆ normalize()

VersionTuple wpi::VersionTuple::normalize ( ) const
inline

Return a version tuple that contains only components that are non-zero.

◆ withMajorReplaced()

VersionTuple wpi::VersionTuple::withMajorReplaced ( unsigned  NewMajor) const
inline

Return a version tuple that contains a different major version but everything else is the same.

◆ withoutBuild()

VersionTuple wpi::VersionTuple::withoutBuild ( ) const
inline

Return a version tuple that contains only the first 3 version components.

Friends And Related Function Documentation

◆ operator!=

bool operator!= ( const VersionTuple X,
const VersionTuple Y 
)
friend

Determine if two version numbers are not equivalent.

If not provided, minor and subminor version numbers are considered to be zero.

◆ operator<

bool operator< ( const VersionTuple X,
const VersionTuple Y 
)
friend

Determine whether one version number precedes another.

If not provided, minor and subminor version numbers are considered to be zero.

◆ operator<=

bool operator<= ( const VersionTuple X,
const VersionTuple Y 
)
friend

Determine whether one version number precedes or is equivalent to another.

If not provided, minor and subminor version numbers are considered to be zero.

◆ operator==

bool operator== ( const VersionTuple X,
const VersionTuple Y 
)
friend

Determine if two version numbers are equivalent.

If not provided, minor and subminor version numbers are considered to be zero.

◆ operator>

bool operator> ( const VersionTuple X,
const VersionTuple Y 
)
friend

Determine whether one version number follows another.

If not provided, minor and subminor version numbers are considered to be zero.

◆ operator>=

bool operator>= ( const VersionTuple X,
const VersionTuple Y 
)
friend

Determine whether one version number follows or is equivalent to another.

If not provided, minor and subminor version numbers are considered to be zero.


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