RType
Public Member Functions | List of all members
AComponent Class Reference

#include <AComponent.hpp>

Inheritance diagram for AComponent:
Inheritance graph
[legend]
Collaboration diagram for AComponent:
Collaboration graph
[legend]

Public Member Functions

 AComponent (ClientCore *clientCore)
 AComponent, constructor of AComponent. More...
 
 ~AComponent () override=default
 ~AComponent, destructor of AComponent More...
 
ComponentType getType () const override
 getType, get the type of the component More...
 
void addActionTarget (std::shared_ptr< IComponent > component) override
 addActionTarget, add a target to the action More...
 
void addSubComponent (std::shared_ptr< IComponent > component) override
 addSubComponent, add a sub component More...
 
void setAttribute (std::string attribute) override
 setAttribute, set the attribute More...
 
std::string getAttribute () override
 getAttribute, get the attribute More...
 
- Public Member Functions inherited from IComponent
 IComponent (ClientCore *clientCore)
 IComponent, constructor of IComponent. More...
 
virtual ~IComponent ()=default
 ~IComponent, destructor of IComponent More...
 
virtual void action ()=0
 action, action of the component More...
 
virtual void display (sf::RenderWindow &window)=0
 display, display the component More...
 
virtual void handleEvent (const sf::Event &event, sf::RenderWindow &window)=0
 handleEvent, handle the event More...
 

Additional Inherited Members

- Protected Attributes inherited from IComponent
std::string _attribute
 
ComponentType _type
 
std::vector< std::shared_ptr< IComponent > > action_target
 
std::vector< std::shared_ptr< IComponent > > sub_components
 
ClientCore_clientCore
 

Detailed Description

Definition at line 14 of file AComponent.hpp.

Constructor & Destructor Documentation

◆ AComponent()

AComponent::AComponent ( ClientCore clientCore)
inlineexplicit

AComponent, constructor of AComponent.

Definition at line 21 of file AComponent.hpp.

References IComponent::IComponent().

Referenced by ButtonComponent::ButtonComponent(), InputComponent::InputComponent(), MusicComponent::MusicComponent(), SoundComponent::SoundComponent(), SpriteComponent::SpriteComponent(), and TextComponent::TextComponent().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ~AComponent()

AComponent::~AComponent ( )
overridedefault

~AComponent, destructor of AComponent

Member Function Documentation

◆ addActionTarget()

void AComponent::addActionTarget ( std::shared_ptr< IComponent component)
overridevirtual

addActionTarget, add a target to the action

Parameters
component

Implements IComponent.

Definition at line 22 of file AComponent.cpp.

◆ addSubComponent()

void AComponent::addSubComponent ( std::shared_ptr< IComponent component)
overridevirtual

addSubComponent, add a sub component

Parameters
component

Implements IComponent.

Definition at line 31 of file AComponent.cpp.

◆ getAttribute()

std::string AComponent::getAttribute ( )
overridevirtual

getAttribute, get the attribute

Returns
attribute

Implements IComponent.

Definition at line 49 of file AComponent.cpp.

References IComponent::_attribute.

◆ getType()

ComponentType AComponent::getType ( ) const
overridevirtual

getType, get the type of the component

Implements IComponent.

Definition at line 13 of file AComponent.cpp.

References IComponent::_type.

◆ setAttribute()

void AComponent::setAttribute ( std::string  attribute)
overridevirtual

setAttribute, set the attribute

Parameters
attribute

Implements IComponent.

Definition at line 40 of file AComponent.cpp.

References IComponent::_attribute.


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