18 #ifndef MAUVE_RUNTIME_ARCHITECTURE_HPP 19 #define MAUVE_RUNTIME_ARCHITECTURE_HPP 24 #include "Configurable.hpp" 25 #include "WithHook.hpp" 26 #include "WithLogger.hpp" 27 #include "AbstractDeployer.hpp" 32 class AbstractComponent;
33 template <
typename S,
typename C,
typename F>
37 template <
typename S,
typename C,
typename I>
54 inline bool is_configured() const override final {
return _configured; };
66 std::size_t get_components_size()
const {
return components.size(); }
73 std::size_t get_resources_size()
const {
return resources.size(); }
81 int get_resource_index(
const std::string & name)
const;
91 template <
typename COMPONENT>
92 COMPONENT & mk_component(std::string
const & name);
94 template <
typename COMPONENT,
typename ...P>
95 COMPONENT & mk_component(std::string
const & name, P... parameters);
97 template <
typename COMPONENT>
98 COMPONENT & mk_empty_component(std::string
const & name);
100 template <
typename SHELL,
typename CORE,
typename FSM>
103 template <
typename SHELL,
typename CORE,
typename FSM,
typename ...P>
106 template <
typename SHELL,
typename CORE,
typename FSM>
111 template <
typename RESOURCE>
112 RESOURCE & mk_resource(std::string
const & name);
114 template <
typename RESOURCE,
typename ...P>
115 RESOURCE & mk_resource(std::string
const & name, P... parameters);
117 template <
typename RESOURCE>
118 RESOURCE & mk_empty_resource(std::string
const & name);
120 template <
typename SHELL,
typename CORE,
typename INTERFACE>
123 template <
typename SHELL,
typename CORE,
typename INTERFACE,
typename ...P>
126 template <
typename SHELL,
typename CORE,
typename INTERFACE>
134 std::vector<AbstractComponent*> components;
135 std::vector<AbstractResource *> resources;
142 #include "ipp/Architecture.ipp" const std::vector< AbstractResource * > get_resources()
Get the set of architecture resources.
bool configure_hook() override
Hook function called when configuring the shell.
Architecture class.
Definition: Architecture.hpp:41
void cleanup_hook() override
Hook function called when cleaning the shell.
Objects with hooks.
Definition: WithHook.hpp:27
Object with a Logger.
Definition: WithLogger.hpp:27
Component class.
Definition: Architecture.hpp:34
Class of a generic MAUVE logger.
Definition: logger.hpp:39
The MAUVE namespace.
Definition: tracing.hpp:24
Definition: Architecture.hpp:38
Configurable trait.
Definition: Configurable.hpp:25
bool is_configured() const overridefinal
Check if the architecture is configured.
Definition: Architecture.hpp:54
const std::vector< AbstractComponent * > get_components()
Get the set of architecture components.
void cleanup() overridefinal
Cleanup the architecture.
AbstractLogger & logger() const override
Get the logger.
Definition: Architecture.hpp:85
bool configure() overridefinal
Configure the architecture.
Abstract Resource class.
Definition: AbstractResource.hpp:37
Abstract Component class.
Definition: AbstractComponent.hpp:43
std::string type_name() const
Architecture type name.