Mitsuba Renderer  0.5.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Version Struct Reference

A simple data structure for representing and comparing Mitsuba version strings. More...

#include <mitsuba/core/version.h>

Public Member Functions

 Version ()
 Default constructor: initialize to an invalid version (0.0.0) More...
 
 Version (int major, int minor, int release)
 Initialize with the specified version number. More...
 
 Version (const std::string &versionString)
 Parse a version string of the form "major.minor.release" and turn it into a Version structure. More...
 
bool operator< (const Version &other) const
 Check if this program version is older than other. More...
 
bool operator<= (const Version &other) const
 Check if this program version is older than or equal to other. More...
 
bool operator== (const Version &other) const
 Check if two program versions match. More...
 
bool isValid ()
 Is this a valid version number? More...
 
bool isCompatible (const Version &other) const
 Are the following two versions compatible? More...
 
std::string toString () const
 Turn into a string of the form "major.minor.release". More...
 
std::string toStringComplete () const
 Turn into a string of the form "major.minor.release (Architecture)". More...
 
int getMajorVersion () const
 Return the major version. More...
 
int getMinorVersion () const
 Return the minor version. More...
 
int getRelease () const
 Return the release. More...
 

Detailed Description

A simple data structure for representing and comparing Mitsuba version strings.

Constructor & Destructor Documentation

Version::Version ( )
inline

Default constructor: initialize to an invalid version (0.0.0)

Version::Version ( int  major,
int  minor,
int  release 
)
inline

Initialize with the specified version number.

Version::Version ( const std::string &  versionString)

Parse a version string of the form "major.minor.release" and turn it into a Version structure.

Member Function Documentation

int Version::getMajorVersion ( ) const
inline

Return the major version.

int Version::getMinorVersion ( ) const
inline

Return the minor version.

int Version::getRelease ( ) const
inline

Return the release.

bool Version::isCompatible ( const Version other) const
inline

Are the following two versions compatible?

bool Version::isValid ( )
inline

Is this a valid version number?

bool Version::operator< ( const Version other) const
inline

Check if this program version is older than other.

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

Check if this program version is older than or equal to other.

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

Check if two program versions match.

std::string Version::toString ( ) const

Turn into a string of the form "major.minor.release".

std::string Version::toStringComplete ( ) const

Turn into a string of the form "major.minor.release (Architecture)".


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