NanoTekSpice
DigitalElectronics
Component.hpp
1 /*
2 ** EPITECH PROJECT, 2019
3 ** OOP_NanoTekSpice
4 ** File description:
5 ** Declaration of the Component class and its functions
6 */
7 
8 #if !defined(_COMPONENT_HPP)
9 #define _COMPONENT_HPP
10 
11 #include <vector>
12 #include <memory>
13 #include <string>
14 #include "IComponent.hpp"
15 #include "Type.hpp"
16 
17 namespace Component
18 {
20  {
21  public:
22  MyComponent(const nts::Type &type);
23  ~MyComponent();
24 
25  void createAllComponents(const std::vector<Component::ComponentSetting> &settings);
26  virtual void setState(const std::string &state);
27  virtual void setState(const std::string &name, const std::string &state);
28 
29  const std::string &getName() const noexcept final;
30  void setName(const std::string &name) noexcept final;
31 
32  const nts::Type &getType() const noexcept final;
33 
34  void displayState(std::size_t) const noexcept override;
35 
36  protected:
37  std::string _name;
38  nts::Type _type;
39  };
40 } // !Component
41 
42 
43 #endif // _COMPONENT_HPP
Definition: Component.hpp:19
Definition: IComponent.hpp:18
Definition: Component.hpp:17