ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
Version Struct Reference

Simple representation of a SemVer version. More...

#include <PythonConfig.h>

Collaboration diagram for Version:

Public Member Functions

constexpr Version ()=default
 
constexpr Version (uint16_t major_, uint16_t minor_, uint16_t patch_)
 
 Version (const QtCompatStringRef &versionStr)
 
bool isCompatibleWithCompiledVersion () const
 
bool isNull () const
 
bool operator== (const Version &other) const
 

Public Attributes

uint16_t versionMajor {0}
 
uint16_t versionMinor {0}
 
uint16_t versionPatch {0}
 

Detailed Description

Simple representation of a SemVer version.

Definition at line 27 of file PythonConfig.h.

Constructor & Destructor Documentation

◆ Version() [1/3]

constexpr Version::Version ( )
constexprdefault

◆ Version() [2/3]

constexpr Version::Version ( uint16_t  major_,
uint16_t  minor_,
uint16_t  patch_ 
)
inlineconstexpr

Definition at line 31 of file PythonConfig.h.

◆ Version() [3/3]

Version::Version ( const QtCompatStringRef versionStr)
explicit

Member Function Documentation

◆ isCompatibleWithCompiledVersion()

bool Version::isCompatibleWithCompiledVersion ( ) const

Checks whether the Python version number described by this instance is compatible with the Python version the plugin was compiled with.

As explained in https://docs.python.org/3/c-api/stable.html#stable: CPython’s Application Binary Interface (ABI) is forward- and backwards-compatible across a minor release. So, code compiled for Python 3.10.0 will work on 3.10.8 and vice versa, but will need to be compiled separately for 3.9.x and 3.10.x.

Returns
True if the version is compatible.

Definition at line 64 of file PythonConfig.cpp.

References PythonVersion(), versionMajor, and versionMinor.

Referenced by PythonConfig::validateAndDisplayErrors().

◆ isNull()

bool Version::isNull ( ) const
inline

Definition at line 51 of file PythonConfig.h.

References versionMajor, versionMinor, and versionPatch.

Referenced by PythonConfig::validateAndDisplayErrors().

◆ operator==()

bool Version::operator== ( const Version other) const

Definition at line 69 of file PythonConfig.cpp.

References versionMajor, versionMinor, and versionPatch.

Member Data Documentation

◆ versionMajor

◆ versionMinor

◆ versionPatch

uint16_t Version::versionPatch {0}

Definition at line 60 of file PythonConfig.h.

Referenced by isNull(), operator==(), PythonConfig::validateAndDisplayErrors(), and Version().


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