IOFormat 1.12.0
Loading...
Searching...
No Matches
ioformat::PluginVersion Struct Reference

Hold information about a plugin's version. More...

#include <ioformat/plugin/PluginVersion.h>

Public Member Functions

 PluginVersion ()
 Default constructor.
 
 PluginVersion (uint32_t major, uint32_t minor, uint32_t patch)
 Three segment initialisation.
 
 PluginVersion (const std::string &version)
 Parse a version string.
 
bool operator== (const PluginVersion &other) const
 Equality operator.
 
bool operator!= (const PluginVersion &other) const
 Inequality operator.
 
std::string toString () const
 The version as a string.
 
uint32_t major () const
 Get the major version number.
 
uint32_t minor () const
 Get the minor version number.
 
uint32_t patch () const
 Get the patch version number.
 

Detailed Description

Hold information about a plugin's version.

Constructor & Destructor Documentation

◆ PluginVersion() [1/3]

ioformat::PluginVersion::PluginVersion ( )

Default constructor.

All segments will be set to zero.

◆ PluginVersion() [2/3]

ioformat::PluginVersion::PluginVersion ( uint32_t  major,
uint32_t  minor,
uint32_t  patch 
)

Three segment initialisation.

Parameters
majorMajor version number.
minorMinor version number.
patchPatch version number.

◆ PluginVersion() [3/3]

ioformat::PluginVersion::PluginVersion ( const std::string &  version)

Parse a version string.

Parameters
versionVersion string in the format "major.minor.patch".
Exceptions
InvalidArgumentif the version string is not in the correct format.

Member Function Documentation

◆ toString()

std::string ioformat::PluginVersion::toString ( ) const

The version as a string.

Returns
The version as a string in the format "major.minor.patch".

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