31 lines
712 B
C++
31 lines
712 B
C++
#pragma once
|
|
|
|
#include <compare>
|
|
#include <string>
|
|
#include <utility>
|
|
|
|
namespace XCEngine::UI::Editor::Windowing::Domain {
|
|
|
|
struct WindowId {
|
|
std::string value = {};
|
|
|
|
WindowId() = default;
|
|
explicit WindowId(std::string windowId)
|
|
: value(std::move(windowId)) {}
|
|
|
|
bool empty() const {
|
|
return value.empty();
|
|
}
|
|
|
|
auto operator<=>(const WindowId&) const = default;
|
|
};
|
|
|
|
} // namespace XCEngine::UI::Editor::Windowing::Domain
|
|
|
|
template <>
|
|
struct std::hash<XCEngine::UI::Editor::Windowing::Domain::WindowId> {
|
|
std::size_t operator()(const XCEngine::UI::Editor::Windowing::Domain::WindowId& value) const noexcept {
|
|
return std::hash<std::string>{}(value.value);
|
|
}
|
|
};
|