Bomberman
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
BBM::ButtonComponent< T > Class Template Reference

#include <ButtonComponent.hpp>

Inheritance diagram for BBM::ButtonComponent< T >:
Collaboration diagram for BBM::ButtonComponent< T >:

Public Member Functions

WAL::Componentclone (WAL::Entity &entity) const override
 Clone a component for another or the same entity. More...
 
 ButtonComponent (WAL::Entity &entity)
 Initialize a new Button component. More...
 
 ButtonComponent (WAL::Entity &entity, WAL::Callback< WAL::Entity &, WAL::Wal & > callback)
 Constructor with the 3 callback. More...
 
ButtonComponentsetButtonLinks (WAL::Entity *up=nullptr, WAL::Entity *down=nullptr, WAL::Entity *left=nullptr, WAL::Entity *right=nullptr)
 
 ButtonComponent (const ButtonComponent< T > &)=default
 A Controllable component is copy constructable. More...
 
 ~ButtonComponent () override=default
 default destructor More...
 
ButtonComponent< T > & operator= (const ButtonComponent< T > &)=default
 A Button component default assign operator. More...
 
- Public Member Functions inherited from WAL::Component
Componentoperator= (const Component &)=delete
 A component can't be assigned. More...
 
virtual ~Component ()=default
 A virtual destructor. More...
 
virtual void onStart ()
 The entity or this component has just been enabled. More...
 
virtual void onStop ()
 The entity or this component has just been disable. More...
 

Static Public Member Functions

static void emptyButtonCallback (WAL::Entity &)
 Empty button callback. More...
 

Public Attributes

WAL::Callback< WAL::Entity &, WAL::Wal & > onEvent
 onEvent callback More...
 
WAL::Entity_up
 button which is at the top of this button More...
 
WAL::Entity_down
 button which is below of this button More...
 
WAL::Entity_right
 button which is on the right of this button More...
 
WAL::Entity_left
 button which is on the left of this button More...
 

Additional Inherited Members

- Protected Member Functions inherited from WAL::Component
 Component (Entity &entity)
 A component can't be instantiated, it should be derived. More...
 
 Component (const Component &)=default
 A component can't be instantiated, it should be derived. More...
 
- Protected Attributes inherited from WAL::Component
Entity_entity
 The entity that own this component. More...
 

Constructor & Destructor Documentation

◆ ButtonComponent() [1/3]

template<enum ButtonComponentType T>
BBM::ButtonComponent< T >::ButtonComponent ( WAL::Entity entity)
inlineexplicit

Initialize a new Button component.

◆ ButtonComponent() [2/3]

template<enum ButtonComponentType T>
BBM::ButtonComponent< T >::ButtonComponent ( WAL::Entity entity,
WAL::Callback< WAL::Entity &, WAL::Wal & >  callback 
)
inline

Constructor with the 3 callback.

◆ ButtonComponent() [3/3]

template<enum ButtonComponentType T>
BBM::ButtonComponent< T >::ButtonComponent ( const ButtonComponent< T > &  )
default

A Controllable component is copy constructable.

◆ ~ButtonComponent()

template<enum ButtonComponentType T>
BBM::ButtonComponent< T >::~ButtonComponent ( )
overridedefault

default destructor

Member Function Documentation

◆ clone()

template<enum ButtonComponentType T>
WAL::Component* BBM::ButtonComponent< T >::clone ( WAL::Entity entity) const
inlineoverridevirtual

Clone a component for another or the same entity.

Parameters
entityThe entity that owns the ne component.

Implements WAL::Component.

◆ emptyButtonCallback()

template<enum ButtonComponentType T>
static void BBM::ButtonComponent< T >::emptyButtonCallback ( WAL::Entity )
inlinestatic

Empty button callback.

◆ operator=()

template<enum ButtonComponentType T>
ButtonComponent<T>& BBM::ButtonComponent< T >::operator= ( const ButtonComponent< T > &  )
default

A Button component default assign operator.

◆ setButtonLinks()

template<enum ButtonComponentType T>
ButtonComponent& BBM::ButtonComponent< T >::setButtonLinks ( WAL::Entity up = nullptr,
WAL::Entity down = nullptr,
WAL::Entity left = nullptr,
WAL::Entity right = nullptr 
)
inline

Member Data Documentation

◆ _down

template<enum ButtonComponentType T>
WAL::Entity* BBM::ButtonComponent< T >::_down

button which is below of this button

◆ _left

template<enum ButtonComponentType T>
WAL::Entity* BBM::ButtonComponent< T >::_left

button which is on the left of this button

◆ _right

template<enum ButtonComponentType T>
WAL::Entity* BBM::ButtonComponent< T >::_right

button which is on the right of this button

◆ _up

template<enum ButtonComponentType T>
WAL::Entity* BBM::ButtonComponent< T >::_up

button which is at the top of this button

◆ onEvent

template<enum ButtonComponentType T>
WAL::Callback<WAL::Entity &, WAL::Wal &> BBM::ButtonComponent< T >::onEvent

onEvent callback


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