aboutsummaryrefslogtreecommitdiff
path: root/src/openvic/Types.hpp
diff options
context:
space:
mode:
author Hop311 <Hop3114@gmail.com>2023-05-22 17:54:15 +0200
committer GitHub <noreply@github.com>2023-05-22 17:54:15 +0200
commit08ec6fe5fbf52d814d88c235aac84bb95ad4e322 (patch)
tree136a221eb5e7c895c8219778b3d206f2ed9e8e7f /src/openvic/Types.hpp
parent15e960f93ced8c94a6a45ebb2b44d0705ff7f8f6 (diff)
parent7874702f30d5855319faf197b10aed31f07f5e27 (diff)
Merge pull request #5 from OpenVicProject/bmp
BMP palette parser + code style cleanup
Diffstat (limited to 'src/openvic/Types.hpp')
-rw-r--r--src/openvic/Types.hpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/openvic/Types.hpp b/src/openvic/Types.hpp
index c528ac0..fe22dc9 100644
--- a/src/openvic/Types.hpp
+++ b/src/openvic/Types.hpp
@@ -1,11 +1,11 @@
#pragma once
-#include <vector>
-#include <cstdint>
#include <algorithm>
+#include <cstdint>
#include <map>
+#include <vector>
-#include "Logger.hpp"
+#include "utility/Logger.hpp"
namespace OpenVic {
// Represents a 24-bit RGB integer OR a 32-bit ARGB integer
@@ -44,8 +44,10 @@ namespace OpenVic {
*/
class HasIdentifier {
const std::string identifier;
+
protected:
HasIdentifier(std::string const& new_identifier);
+
public:
HasIdentifier(HasIdentifier const&) = delete;
HasIdentifier(HasIdentifier&&) = default;
@@ -60,8 +62,10 @@ namespace OpenVic {
*/
class HasColour {
const colour_t colour;
+
protected:
HasColour(colour_t const new_colour, bool can_be_null = false);
+
public:
HasColour(HasColour const&) = delete;
HasColour(HasColour&&) = default;
@@ -87,6 +91,7 @@ namespace OpenVic {
std::vector<T> items;
bool locked = false;
identifier_index_map_t identifier_index_map;
+
public:
IdentifierRegistry(std::string const& new_name) : name(new_name) {}
return_t add_item(T&& item) {