EHS/include/Version.h
2023-12-17 03:29:08 -08:00

41 lines
1.1 KiB
C++

#pragma once
#include "Types.h"
namespace lwe
{
/// 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);
};
}