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;
71void ServiceRegisterer::
74 if (global_arcane_first_service ==
nullptr) {
75 global_arcane_first_service =
this;
82 global_arcane_first_service =
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.
void setPreviousService(ServiceRegisterer *s)
Positions the previous service.
ModuleProperty m_module_property
Module properties.
ServiceRegisterer * m_next
Next service.
ServiceRegisterer * m_previous
Previous service.
static ServiceRegisterer * firstService()
Access to the first element of the service registrar chain.
ServiceRegisterer * nextService() const
Next service (0 if the last).
ServiceInfoWithPropertyCreateFunc m_info_function_with_property
Function to create the IServiceInfo.
void setNextService(ServiceRegisterer *s)
Positions the next service.
static Integer nbService()
Number of service registrars in the chain.
ModuleFactoryWithPropertyFunc m_module_factory_with_property_functor
Function to create the IModuleFactory.
const char * m_name
Service name.
ServiceRegisterer(ServiceInfoWithPropertyCreateFunc func, const ServiceProperty &properties) ARCANE_NOEXCEPT
Creates a registrar for the service name and the function func.
ServiceProperty m_service_property
Service properties.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
Int32 Integer
Type representing an integer.