WPILibC++ 2023.4.3-108-ge5452e3
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

 VersionTuple ()
 
 VersionTuple (unsigned Major)
 
 VersionTuple (unsigned Major, unsigned Minor)
 
 VersionTuple (unsigned Major, unsigned Minor, unsigned Subminor)
 
 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 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]

wpi::VersionTuple::VersionTuple ( )
inline

◆ VersionTuple() [2/5]

wpi::VersionTuple::VersionTuple ( unsigned  Major)
inlineexplicit

◆ VersionTuple() [3/5]

wpi::VersionTuple::VersionTuple ( unsigned  Major,
unsigned  Minor 
)
inlineexplicit

◆ VersionTuple() [4/5]

wpi::VersionTuple::VersionTuple ( unsigned  Major,
unsigned  Minor,
unsigned  Subminor 
)
inlineexplicit

◆ VersionTuple() [5/5]

wpi::VersionTuple::VersionTuple ( unsigned  Major,
unsigned  Minor,
unsigned  Subminor,
unsigned  Build 
)
inlineexplicit

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.

◆ 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: