EHS/include/ehs/Version.h
karutoh 1a4a1ecd9c
Some checks failed
Build & Release / Linux-x86_64-Build (push) Successful in 40s
Build & Release / Linux-AARCH64-Build (push) Has been cancelled
First commit.
2024-01-31 22:28:19 -08:00

41 lines
1.1 KiB
C++

#pragma once
#include "Types.h"
namespace ehs
{
/// A helper class for storing version major, minor and patch.
class Version
{
public:
UInt_32 major;
UInt_32 minor;
UInt_32 patch;
/// Default members initialization.
Version();
/// Initializes members with given major, minor and patch.
/// @param [in] major The major version.
/// @param [in] minor The minor version.
/// @param [in] patch The patch version.
Version(const UInt_32 major, const UInt_32 minor, const UInt_32 patch);
/// Copies all members from the given version object.
/// @param [in] version The version object to copy from.
Version(const Version& version);
/// Copies all members from the given version object.
/// @param [in] version The version object to copy from.
/// @returns The version object that has been assigned to.
Version& operator=(const Version& version);
bool operator==(const Version& version) const;
bool operator!=(const Version& version) const;
unsigned int operator[](const UInt_32 i) const;
unsigned int& operator[](const UInt_32 i);
};
}