SDEngine
Game Engine
Loading...
Searching...
No Matches
sd::LayerList Class Reference

#include <LayerList.hpp>

Public Types

using iterator = std::vector< std::unique_ptr< Layer > >::iterator
 
using const_iterator = std::vector< std::unique_ptr< Layer > >::const_iterator
 

Public Member Functions

 LayerList ()=default
 
 LayerList (const LayerList &)=delete
 
LayerListoperator= (const LayerList &)=delete
 
 LayerList (LayerList &&) noexcept=default
 
LayerListoperator= (LayerList &&) noexcept=default
 
iterator begin ()
 
iterator end ()
 
const_iterator begin () const
 
const_iterator end () const
 
 ~LayerList ()
 
void update (const float dt) const
 
void on_fixed_update (double dt) const
 
void gui_render ()
 
void on_imGui_menu_bar ()
 
void on_event (Event &e)
 
template<IsLayer T, typename... Args>
T & push_layer (Args &&... args)
 
template<IsLayer T, typename... Args>
T & push_bottom (Args &&... args)
 
template<IsLayer T>
T & attach_layer (std::unique_ptr< T > layer)
 
template<IsLayer T>
T * Get ()
 
template<IsLayer T>
std::unique_ptr< T > pop_layer ()
 
void clear ()
 
void on_swapchain_recreated ()
 
void on_render (vk::CommandBuffer &cmd) const
 

Private Attributes

std::vector< std::unique_ptr< Layer > > m_layers {}
 

Member Typedef Documentation

◆ const_iterator

using sd::LayerList::const_iterator = std::vector<std::unique_ptr<Layer> >::const_iterator

◆ iterator

using sd::LayerList::iterator = std::vector<std::unique_ptr<Layer> >::iterator

Constructor & Destructor Documentation

◆ LayerList() [1/3]

sd::LayerList::LayerList ( )
default

◆ LayerList() [2/3]

sd::LayerList::LayerList ( const LayerList )
delete

◆ LayerList() [3/3]

sd::LayerList::LayerList ( LayerList &&  )
defaultnoexcept

◆ ~LayerList()

sd::LayerList::~LayerList ( )
inline

Member Function Documentation

◆ attach_layer()

template<IsLayer T>
T & sd::LayerList::attach_layer ( std::unique_ptr< T >  layer)
inline

◆ begin() [1/2]

iterator sd::LayerList::begin ( )
inline

◆ begin() [2/2]

const_iterator sd::LayerList::begin ( ) const
inline

◆ clear()

void sd::LayerList::clear ( )
inline

◆ end() [1/2]

iterator sd::LayerList::end ( )
inline

◆ end() [2/2]

const_iterator sd::LayerList::end ( ) const
inline

◆ Get()

template<IsLayer T>
T * sd::LayerList::Get ( )
inline

◆ gui_render()

void sd::LayerList::gui_render ( )
inline

◆ on_event()

void sd::LayerList::on_event ( Event e)
inline

◆ on_fixed_update()

void sd::LayerList::on_fixed_update ( double  dt) const
inline

◆ on_imGui_menu_bar()

void sd::LayerList::on_imGui_menu_bar ( )
inline

◆ on_render()

void sd::LayerList::on_render ( vk::CommandBuffer &  cmd) const
inline

◆ on_swapchain_recreated()

void sd::LayerList::on_swapchain_recreated ( )
inline

◆ operator=() [1/2]

LayerList & sd::LayerList::operator= ( const LayerList )
delete

◆ operator=() [2/2]

LayerList & sd::LayerList::operator= ( LayerList &&  )
defaultnoexcept

◆ pop_layer()

template<IsLayer T>
std::unique_ptr< T > sd::LayerList::pop_layer ( )
inline

◆ push_bottom()

template<IsLayer T, typename... Args>
T & sd::LayerList::push_bottom ( Args &&...  args)
inline

◆ push_layer()

template<IsLayer T, typename... Args>
T & sd::LayerList::push_layer ( Args &&...  args)
inline

◆ update()

void sd::LayerList::update ( const float  dt) const
inline

Member Data Documentation

◆ m_layers

std::vector<std::unique_ptr<Layer> > sd::LayerList::m_layers {}
private

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