14#include "arcane/utils/ArcanePrecomp.h"
16#include "arcane/utils/Iostream.h"
18#include "arcane/core/ServiceRegisterer.h"
32static Integer global_arcane_nb_service = 0;
40: m_module_factory_with_property_functor(
nullptr)
41, m_info_function_with_property(func)
42, m_name(properties.name())
43, m_service_property(properties)
44, m_module_property(properties.name())
57: m_module_factory_with_property_functor(func)
58, m_info_function_with_property(
nullptr)
59, m_name(properties.name())
61, m_module_property(properties)
71void ServiceRegisterer::
74 if (global_arcane_first_service ==
nullptr) {
75 global_arcane_first_service =
this;
76 setPreviousService(
nullptr);
77 setNextService(
nullptr);
81 setNextService(global_arcane_first_service);
82 global_arcane_first_service =
this;
84 next->setPreviousService(
this);
86 ++global_arcane_nb_service;
90 Integer count = global_arcane_nb_service;
91 while (p && count > 0) {
96 cout <<
"Arcane Fatal Error: Service '" << m_name <<
"' conflict in service registration" << std::endl;
100 cout <<
"Arcane Fatal Error: Service '" << m_name <<
"' breaks service registration (inconsistent shortcut)" << std::endl;
112 return global_arcane_first_service;
121 return global_arcane_nb_service;
Module creation properties.
Service creation properties.
Service and module registrar.
static ServiceRegisterer * firstService()
Access to the first element of the service registrar chain.
ServiceRegisterer * nextService() const
Next service (0 if the last).
static Integer nbService()
Number of service registrars in the chain.
ServiceRegisterer(ServiceInfoWithPropertyCreateFunc func, const ServiceProperty &properties) ARCANE_NOEXCEPT
Creates a registrar for the service name and the function func.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
Int32 Integer
Type representing an integer.