EHS/include/ehs/Version.h

41 lines
1.2 KiB
C
Raw Normal View History

2024-02-05 22:25:30 -08:00
#pragma once
#include "Types.h"
namespace ehs
{
/// A helper class for storing version major, minor and patch.
2024-07-24 01:36:20 -07:00
class EHS_LIB_IO Version
2024-02-05 22:25:30 -08:00
{
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);
};
}