Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
Inkscape::Version Class Reference

#include <version.h>

Public Member Functions

 Version ()
 
 Version (unsigned major_version, unsigned minor_version)
 
 Version (unsigned major_version, unsigned minor_version, std::string_view suffix)
 
std::partial_ordering operator<=> (Version const &other) const
 
bool operator== (Version const &other) const
 
bool isInsideRangeInclusive (Version const &min_version, Version const &max_version) const
 
std::string const & str () const
 

Static Public Member Functions

static std::optional< Versionfrom_string (const char *version_string)
 Build a Version form a string, returning an empty optional in case of error.
 

Private Attributes

unsigned int _major = 0
 
unsigned int _minor = 0
 
std::string _suffix
 For example, for development version.
 
std::string _string_representation
 

Detailed Description

Definition at line 25 of file version.h.

Constructor & Destructor Documentation

◆ Version() [1/3]

Inkscape::Version::Version ( )

Definition at line 21 of file version.cpp.

◆ Version() [2/3]

Inkscape::Version::Version ( unsigned  major_version,
unsigned  minor_version 
)

Definition at line 31 of file version.cpp.

◆ Version() [3/3]

Inkscape::Version::Version ( unsigned  major_version,
unsigned  minor_version,
std::string_view  suffix 
)

Definition at line 25 of file version.cpp.

Member Function Documentation

◆ from_string()

std::optional< Version > Inkscape::Version::from_string ( const char *  version_string)
static

Build a Version form a string, returning an empty optional in case of error.

Definition at line 35 of file version.cpp.

References Inkscape::version_string.

Referenced by SPRoot::set().

◆ isInsideRangeInclusive()

bool Inkscape::Version::isInsideRangeInclusive ( Version const &  min_version,
Version const &  max_version 
) const
inline

Definition at line 42 of file version.h.

◆ operator<=>()

std::partial_ordering Inkscape::Version::operator<=> ( Version const &  other) const
inline

Definition at line 36 of file version.h.

References _major, and _minor.

◆ operator==()

bool Inkscape::Version::operator== ( Version const &  other) const
inline

Definition at line 40 of file version.h.

References _major, and _minor.

◆ str()

std::string const & Inkscape::Version::str ( ) const

Definition at line 66 of file version.cpp.

References _major, _minor, _string_representation, and _suffix.

Referenced by file_save().

Member Data Documentation

◆ _major

unsigned int Inkscape::Version::_major = 0
private

Definition at line 49 of file version.h.

Referenced by operator<=>(), operator==(), and str().

◆ _minor

unsigned int Inkscape::Version::_minor = 0
private

Definition at line 50 of file version.h.

Referenced by operator<=>(), operator==(), and str().

◆ _string_representation

std::string Inkscape::Version::_string_representation
mutableprivate

Definition at line 52 of file version.h.

Referenced by str().

◆ _suffix

std::string Inkscape::Version::_suffix
private

For example, for development version.

Definition at line 51 of file version.h.

Referenced by str().


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