Arcane  4.1.12.0
User documentation
Loading...
Searching...
No Matches
ServiceFactory.h File Reference

This file contains the various service factories and macros for registering services. More...

#include "arcane/utils/NotSupportedException.h"
#include "arcane/utils/TraceInfo.h"
#include "arcane/utils/ExternalRef.h"
#include "arcane/core/IApplication.h"
#include "arcane/core/ISession.h"
#include "arcane/core/ISubDomain.h"
#include "arcane/core/ServiceBuildInfo.h"
#include "arcane/core/IServiceFactory.h"
#include "arcane/core/ServiceRegisterer.h"
#include "arcane/core/ServiceInfo.h"
#include "arcane/core/IService.h"
#include "arcane/core/ServiceProperty.h"
#include "arcane/core/ServiceInstance.h"
Include dependency graph for ServiceFactory.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Arcane::Internal::DotNetServiceInstance
 Base class for a service instance in C#. More...
class  Arcane::Internal::ServiceInstanceT< InterfaceType >
class  Arcane::Internal::ServiceFactoryInfo
class  Arcane::Internal::IServiceInterfaceFactory< InterfaceType >
class  Arcane::Internal::ServiceFactory2TV2< InterfaceType >
class  Arcane::Internal::ServiceInterfaceFactory< ServiceType, InterfaceType >
class  Arcane::Internal::IServiceInstanceAdder
class  Arcane::Internal::SingletonServiceFactoryBase
class  Arcane::Internal::SingletonServiceFactory< ServiceType, Interfaces >
class  Arcane::Internal::ServiceInterfaceRegisterer< InterfaceType >
class  Arcane::Internal::ServiceAllInterfaceRegisterer< ServiceType >

Namespaces

namespace  Arcane
 -- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
namespace  Arcane::Internal
 Internal types of Arcane.

Macros

#define ARCANE_SERVICE_INTERFACE(ainterface)
 Macro to declare an interface when registering a service.
#define ARCANE_SERVICE_INTERFACE_NS(ainterface_ns, ainterface)
 Registers an interface with a namespace name.
#define ARCANE_REGISTER_SERVICE(aclass, a_service_property, ...)
 Macro for registering a service.
#define ARCANE_REGISTER_AXL_SERVICE(aclass, a_service_properties)
#define ARCANE_REGISTER_APPLICATION_FACTORY(aclass, ainterface, aname)
 Registers a factory service for the class aclass.
#define ARCANE_REGISTER_SUB_DOMAIN_FACTORY(aclass, ainterface, aname)
 Registers a factory service for the class aclass.
#define ARCANE_REGISTER_SUB_DOMAIN_FACTORY4(aclass, ainterface_ns, ainterface, aname)
 Registers a factory service for the class aclass.
#define ARCANE_REGISTER_CASE_OPTIONS_NOAXL_FACTORY(aclass, ainterface, aname)
 Registers a factory service for the class aclass.
#define ARCANE_REGISTER_CASE_OPTIONS_NOAXL_FACTORY4(aclass, ainterface_ns, ainterface, aname)
 Registers a factory service for the class aclass.

Detailed Description

This file contains the various service factories and macros for registering services.

Most types in this file are internal to Arcane. The only element useful for a user is the ARCANE_REGISTER_SERVICE() macro, which allows a service to be registered.

Definition in file ServiceFactory.h.

Macro Definition Documentation

◆ ARCANE_REGISTER_APPLICATION_FACTORY

#define ARCANE_REGISTER_APPLICATION_FACTORY ( aclass,
ainterface,
aname )
Value:
#define ARCANE_SERVICE_INTERFACE(ainterface)
Macro to declare an interface when registering a service.
Service creation properties.
#define ARCANE_REGISTER_SERVICE(aclass, a_service_property,...)
Macro for registering a service.
@ ST_Application
The service is used at the application level.

Registers a factory service for the class aclass.

The service is registered under the name aname and implements the ainterface interface.

Deprecated
Use ARCANE_REGISTER_SERVICE() instead.

Definition at line 636 of file ServiceFactory.h.

◆ ARCANE_REGISTER_AXL_SERVICE

#define ARCANE_REGISTER_AXL_SERVICE ( aclass,
a_service_properties )
Value:
namespace \
{ \
ARCANE_JOIN_WITH_LINE(arcaneCreateServiceInfo##aclass)(const Arcane::ServiceProperty& properties) \
{ \
Arcane::ServiceInfo* si = Arcane::ServiceInfo::create(properties, __FILE__, __LINE__); \
aclass ::fillServiceInfo<aclass>(si); \
return si; \
} \
} \
Arcane::ServiceRegisterer ARCANE_EXPORT ARCANE_JOIN_WITH_LINE(globalServiceRegisterer##aclass)(&ARCANE_JOIN_WITH_LINE(arcaneCreateServiceInfo##aclass), a_service_properties)
Interface for service or module information.

Definition at line 600 of file ServiceFactory.h.

◆ ARCANE_REGISTER_CASE_OPTIONS_NOAXL_FACTORY

#define ARCANE_REGISTER_CASE_OPTIONS_NOAXL_FACTORY ( aclass,
ainterface,
aname )
Value:
@ ST_CaseOption
The service is used at the dataset level.

Registers a factory service for the class aclass.

The service is registered under the name aname and implements the ainterface interface.

Deprecated
Use ARCANE_REGISTER_SERVICE() instead.

Definition at line 681 of file ServiceFactory.h.

◆ ARCANE_REGISTER_CASE_OPTIONS_NOAXL_FACTORY4

#define ARCANE_REGISTER_CASE_OPTIONS_NOAXL_FACTORY4 ( aclass,
ainterface_ns,
ainterface,
aname )
Value:
ARCANE_SERVICE_INTERFACE_NS(ainterface_ns, ainterface))
#define ARCANE_SERVICE_INTERFACE_NS(ainterface_ns, ainterface)
Registers an interface with a namespace name.

Registers a factory service for the class aclass.

The service is registered under the name aname and implements the ainterface interface.

Deprecated
Use ARCANE_REGISTER_SERVICE() instead.

Definition at line 696 of file ServiceFactory.h.

◆ ARCANE_REGISTER_SUB_DOMAIN_FACTORY

#define ARCANE_REGISTER_SUB_DOMAIN_FACTORY ( aclass,
ainterface,
aname )
Value:
@ ST_SubDomain
The service is used at the subdomain level.

Registers a factory service for the class aclass.

The service is registered under the name aname and implements the ainterface interface.

Deprecated
Use ARCANE_REGISTER_SERVICE() instead.

Definition at line 651 of file ServiceFactory.h.

◆ ARCANE_REGISTER_SUB_DOMAIN_FACTORY4

#define ARCANE_REGISTER_SUB_DOMAIN_FACTORY4 ( aclass,
ainterface_ns,
ainterface,
aname )
Value:

Registers a factory service for the class aclass.

The service is registered under the name aname and implements the ainterface interface from the namespace ainterface_ns.

Deprecated
Use ARCANE_REGISTER_SERVICE() instead.

Definition at line 666 of file ServiceFactory.h.

◆ ARCANE_SERVICE_INTERFACE

#define ARCANE_SERVICE_INTERFACE ( ainterface)
Value:

Macro to declare an interface when registering a service.

This macro is used within the ARCANE_REGISTER_SERVICE macro.

The call is as follows:

ainterface is the name of the interface (without quotes). It may contain a namespace. For example:

Interface of a unit test service.
Definition IUnitTest.h:35

Definition at line 538 of file ServiceFactory.h.

◆ ARCANE_SERVICE_INTERFACE_NS

#define ARCANE_SERVICE_INTERFACE_NS ( ainterface_ns,
ainterface )
Value:

Registers an interface with a namespace name.

Definition at line 542 of file ServiceFactory.h.