libqasm
library for handling cQASM files
|
Version number primitive used within the AST and semantic trees. More...
Public Member Functions | |
Version (const std::string &version="1.0") | |
Constructs a version object from a string, defaulting to 1.0. More... | |
int | compare (const Version &other) const |
Compares this version against the other version. More... | |
int | compare (const std::string &other) const |
Compares this version against the other version. More... | |
Version number primitive used within the AST and semantic trees.
Definition at line 22 of file cqasm-version.hpp.
#include <cqasm-version.hpp>
|
explicit |
Constructs a version object from a string, defaulting to 1.0.
Definition at line 16 of file cqasm-version.cpp.
int cqasm::version::Version::compare | ( | const Version & | other | ) | const |
Compares this version against the other version.
Returns 1 if this version is newer than the other, returns -1 if this version is older than the other, or returns 0 if both versions are the same. When there is a mismatch in the number of components between the versions, missing components are interpreted as 0.
Definition at line 40 of file cqasm-version.cpp.
int cqasm::version::Version::compare | ( | const std::string & | other | ) | const |
Compares this version against the other version.
Returns 1 if this version is newer than the other, returns -1 if this version is older than the other, or returns 0 if both versions are the same. When there is a mismatch in the number of components between the versions, missing components are interpreted as 0.
Definition at line 57 of file cqasm-version.cpp.