Container for a module version.
| 91 | |
| 92 | /// Container for a module version. |
| 93 | struct ModuleVersion { |
| 94 | /// Type of module. |
| 95 | enum Type : unsigned char { PUBLIC, PRIVATE }; |
| 96 | |
| 97 | constexpr ModuleVersion(unsigned char major, unsigned char minor, Type type = PUBLIC); |
| 98 | constexpr ModuleVersion(ModuleVersion const &base, Type type); |
| 99 | |
| 100 | /** Check if @a that is a version compatible with @a this. |
| 101 | * |
| 102 | * @param that Version to check against. |
| 103 | * @return @a true if @a that is compatible with @a this, @c false otherwise. |
| 104 | */ |
| 105 | bool check(ModuleVersion const &that); |
| 106 | |
| 107 | Type _type = PUBLIC; ///< The numeric value of the module version. |
| 108 | unsigned char _major = 0; ///< Major version. |
| 109 | unsigned char _minor = 0; |
| 110 | }; |
| 111 | |
| 112 | inline constexpr ModuleVersion::ModuleVersion(unsigned char major, unsigned char minor, ts::ModuleVersion::Type type) |
| 113 | : _type(type), _major(major), _minor(minor) |
no outgoing calls
no test coverage detected