MySQL 8.4.2
Source Code Documentation
Version Class Reference

Class representing a version. More...

#include <designator.h>

Public Member Functions

 Version (int x, int y, int z=0)
 
 Version ()
 
 Version (unsigned long ver)
 
std::string str () const
 

Public Attributes

long ver_major
 
long ver_minor
 
long ver_patch
 

Friends

std::ostream & operator<< (std::ostream &out, const Version &ver)
 
bool operator< (const Version &lhs, const Version &rhs)
 
bool operator== (const Version &lhs, const Version &rhs)
 
bool operator!= (const Version &lhs, const Version &rhs)
 
bool operator<= (const Version &lhs, const Version &rhs)
 
bool operator> (const Version &lhs, const Version &rhs)
 
bool operator>= (const Version &lhs, const Version &rhs)
 

Detailed Description

Class representing a version.

Versions consist of a three-position dotted pair MAJOR.MINOR.PATCH where MAJOR is the major version number, MINOR is the minor version number, and PATCH is the patch number. Version comparison is done lexicographically in the normal manner so that 1.1.5 < 1.2.1 < 1.2.3.

Constructor & Destructor Documentation

◆ Version() [1/3]

Version::Version ( int  x,
int  y,
int  z = 0 
)
inline

◆ Version() [2/3]

Version::Version ( )
inline

◆ Version() [3/3]

Version::Version ( unsigned long  ver)
inlineexplicit

Member Function Documentation

◆ str()

std::string Version::str ( ) const
inline

Friends And Related Function Documentation

◆ operator!=

bool operator!= ( const Version lhs,
const Version rhs 
)
friend

◆ operator<

bool operator< ( const Version lhs,
const Version rhs 
)
friend

◆ operator<<

std::ostream & operator<< ( std::ostream &  out,
const Version ver 
)
friend

◆ operator<=

bool operator<= ( const Version lhs,
const Version rhs 
)
friend

◆ operator==

bool operator== ( const Version lhs,
const Version rhs 
)
friend

◆ operator>

bool operator> ( const Version lhs,
const Version rhs 
)
friend

◆ operator>=

bool operator>= ( const Version lhs,
const Version rhs 
)
friend

Member Data Documentation

◆ ver_major

long Version::ver_major

◆ ver_minor

long Version::ver_minor

◆ ver_patch

long Version::ver_patch

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