2#include "Core/Common/CommonHeaders.h"
5namespace Nui::Components
37 [[nodiscard]]
inline bool IsDirty()
const {
return m_flags.test(ComponentFlags::CF_IsDirty); }
43 [[nodiscard]]
inline bool IsActive()
const {
return m_flags.test(ComponentFlags::CF_IsActive); }
49 [[noreturn]]
inline void SetActive(
bool isActive) {
m_flags.set(ComponentFlags::CF_IsActive, isActive); }
56 [[noreturn]]
inline void SetDirty(
bool isDirty =
true) {
m_flags.set(ComponentFlags::CF_IsDirty, isDirty); }
62 std::bitset<ComponentFlags::CF_COUNT>
m_flags;
Base class for all components.
Definition Common.h:23
std::bitset< ComponentFlags::CF_COUNT > m_flags
Bitset of component flags.
Definition Common.h:62
bool IsDirty() const
Checks if the component is dirty.
Definition Common.h:37
void SetDirty(bool isDirty=true)
Sets the dirty flag.
Definition Common.h:56
void SetActive(bool isActive)
Sets the active flag.
Definition Common.h:49
ComponentBase()
Constructor (sets dirty flag to true)
Definition Common.h:28
bool IsActive() const
Checks if the component is active.
Definition Common.h:43