Nui Engine
A game engine framework
Loading...
Searching...
No Matches
Nui::Components::ComponentBase Class Reference

Base class for all components. More...

#include <Common.h>

Inheritance diagram for Nui::Components::ComponentBase:
Nui::Components::Transform

Public Member Functions

 ComponentBase ()
 Constructor (sets dirty flag to true)
 
bool IsDirty () const
 Checks if the component is dirty.
 
bool IsActive () const
 Checks if the component is active.
 
void SetActive (bool isActive)
 Sets the active flag.
 

Protected Member Functions

void SetDirty (bool isDirty=true)
 Sets the dirty flag.
 

Protected Attributes

std::bitset< ComponentFlags::CF_COUNT > m_flags
 Bitset of component flags.
 

Detailed Description

Base class for all components.

Member Function Documentation

◆ IsActive()

bool Nui::Components::ComponentBase::IsActive ( ) const
inlinenodiscard

Checks if the component is active.

Returns
True if the component is active

◆ IsDirty()

bool Nui::Components::ComponentBase::IsDirty ( ) const
inlinenodiscard

Checks if the component is dirty.

Returns
True if the component is dirty

◆ SetActive()

void Nui::Components::ComponentBase::SetActive ( bool isActive)
inline

Sets the active flag.

Parameters
isActiveActive state to set

◆ SetDirty()

void Nui::Components::ComponentBase::SetDirty ( bool isDirty = true)
inlineprotected

Sets the dirty flag.

Parameters
isDirtyDirty state to set (defaults to true)

The documentation for this class was generated from the following file: