Arcane  4.1.12.0
User documentation
Loading...
Searching...
No Matches
Arcane::Internal::ServiceFinderBase2T< InterfaceType > Class Template Reference

Public Types

typedef IServiceFactory2T< InterfaceType > FactoryType

Public Member Functions

 ServiceFinderBase2T (IApplication *app, const ServiceBuildInfoBase &sbi)
virtual InterfaceType * create (const String &name)
 Creates an instance of the service name.
virtual Ref< InterfaceType > createReference (const String &name)
 Creates a reference to the service name.
virtual InterfaceType * create (const String &name, IMesh *mesh)
 Creates an instance of the service name for the mesh mesh.
virtual Ref< InterfaceType > createReference (const String &name, IMesh *mesh)
 Creates a reference to the service name for the mesh mesh.
virtual InterfaceType * getSingleton ()
 Singleton instance of the service having the InterfaceType interface.
virtual void createAll (Array< InterfaceType * > &instances)
 Creates an instance of every service that implements InterfaceType.
virtual UniqueArray< Ref< InterfaceType > > createAll ()
 Creates an instance of every service that implements InterfaceType.
SharedArray< FactoryType * > factories ()
void getServicesNames (Array< String > &names) const

Protected Member Functions

InterfaceType * _create (const String &name, const ServiceBuildInfoBase &sbib)
Ref< InterfaceType > _createReference (const String &name, const ServiceBuildInfoBase &sbib)
void _createAll (Array< InterfaceType * > &instances, const ServiceBuildInfoBase &sbib)
UniqueArray< Ref< InterfaceType > > _createAll (const ServiceBuildInfoBase &sbib)

Protected Attributes

IApplicationm_application
ServiceBuildInfoBase m_service_build_info_base

Detailed Description

template<typename InterfaceType>
class Arcane::Internal::ServiceFinderBase2T< InterfaceType >

Definition at line 47 of file ServiceFinder2.h.

Member Typedef Documentation

◆ FactoryType

template<typename InterfaceType>
typedef IServiceFactory2T<InterfaceType> Arcane::Internal::ServiceFinderBase2T< InterfaceType >::FactoryType

Definition at line 51 of file ServiceFinder2.h.

Constructor & Destructor Documentation

◆ ServiceFinderBase2T()

template<typename InterfaceType>
Arcane::Internal::ServiceFinderBase2T< InterfaceType >::ServiceFinderBase2T ( IApplication * app,
const ServiceBuildInfoBase & sbi )
inline

Definition at line 55 of file ServiceFinder2.h.

◆ ~ServiceFinderBase2T()

template<typename InterfaceType>
virtual Arcane::Internal::ServiceFinderBase2T< InterfaceType >::~ServiceFinderBase2T ( )
inlinevirtual

Definition at line 61 of file ServiceFinder2.h.

Member Function Documentation

◆ _create()

template<typename InterfaceType>
InterfaceType * Arcane::Internal::ServiceFinderBase2T< InterfaceType >::_create ( const String & name,
const ServiceBuildInfoBase & sbib )
inlineprotected

Definition at line 201 of file ServiceFinder2.h.

◆ _createAll() [1/2]

template<typename InterfaceType>
void Arcane::Internal::ServiceFinderBase2T< InterfaceType >::_createAll ( Array< InterfaceType * > & instances,
const ServiceBuildInfoBase & sbib )
inlineprotected

Definition at line 224 of file ServiceFinder2.h.

◆ _createAll() [2/2]

template<typename InterfaceType>
UniqueArray< Ref< InterfaceType > > Arcane::Internal::ServiceFinderBase2T< InterfaceType >::_createAll ( const ServiceBuildInfoBase & sbib)
inlineprotected

Definition at line 231 of file ServiceFinder2.h.

◆ _createReference()

template<typename InterfaceType>
Ref< InterfaceType > Arcane::Internal::ServiceFinderBase2T< InterfaceType >::_createReference ( const String & name,
const ServiceBuildInfoBase & sbib )
inlineprotected

Definition at line 206 of file ServiceFinder2.h.

◆ create() [1/2]

template<typename InterfaceType>
virtual InterfaceType * Arcane::Internal::ServiceFinderBase2T< InterfaceType >::create ( const String & name)
inlinevirtual

Creates an instance of the service name.

Returns null if no service with this name exists.

Deprecated
Use createReference() instead.

Definition at line 73 of file ServiceFinder2.h.

References create().

Referenced by create(), and create().

◆ create() [2/2]

template<typename InterfaceType>
virtual InterfaceType * Arcane::Internal::ServiceFinderBase2T< InterfaceType >::create ( const String & name,
IMesh * mesh )
inlinevirtual

Creates an instance of the service name for the mesh mesh.

This is only valid for subdomain services. For others, it has no effect. The caller must destroy these services. Returns null if no service with this name exists.

Deprecated
Use createReference() instead.

Definition at line 99 of file ServiceFinder2.h.

References create().

◆ createAll() [1/2]

template<typename InterfaceType>
virtual UniqueArray< Ref< InterfaceType > > Arcane::Internal::ServiceFinderBase2T< InterfaceType >::createAll ( )
inlinevirtual

Creates an instance of every service that implements InterfaceType.

Definition at line 166 of file ServiceFinder2.h.

◆ createAll() [2/2]

template<typename InterfaceType>
virtual void Arcane::Internal::ServiceFinderBase2T< InterfaceType >::createAll ( Array< InterfaceType * > & instances)
inlinevirtual

Creates an instance of every service that implements InterfaceType.

The caller must destroy these services via the call to 'operator delete'.

Deprecated
Use the overload taking an array of references instead.

Definition at line 158 of file ServiceFinder2.h.

References createAll().

Referenced by createAll().

◆ createReference() [1/2]

template<typename InterfaceType>
virtual Ref< InterfaceType > Arcane::Internal::ServiceFinderBase2T< InterfaceType >::createReference ( const String & name)
inlinevirtual

Creates a reference to the service name.

Returns a null reference if no service with this name exists.

Definition at line 83 of file ServiceFinder2.h.

◆ createReference() [2/2]

template<typename InterfaceType>
virtual Ref< InterfaceType > Arcane::Internal::ServiceFinderBase2T< InterfaceType >::createReference ( const String & name,
IMesh * mesh )
inlinevirtual

Creates a reference to the service name for the mesh mesh.

This is only valid for subdomain services. For others, it has no effect. The caller must destroy these services. Returns null if no service with this name exists.

Definition at line 117 of file ServiceFinder2.h.

◆ factories()

template<typename InterfaceType>
SharedArray< FactoryType * > Arcane::Internal::ServiceFinderBase2T< InterfaceType >::factories ( )
inline

Definition at line 173 of file ServiceFinder2.h.

◆ getServicesNames()

template<typename InterfaceType>
void Arcane::Internal::ServiceFinderBase2T< InterfaceType >::getServicesNames ( Array< String > & names) const
inline

Definition at line 187 of file ServiceFinder2.h.

◆ getSingleton()

template<typename InterfaceType>
virtual InterfaceType * Arcane::Internal::ServiceFinderBase2T< InterfaceType >::getSingleton ( )
inlinevirtual

Singleton instance of the service having the InterfaceType interface.

Returns null if no service is found

Definition at line 132 of file ServiceFinder2.h.

References Arcane::RefImpl< InstanceType, RefClassType, ImplTagId >::get(), Arcane::ISingletonServiceInstance::interfaceInstances(), and Arcane::IServiceMng::singletonServices().

Member Data Documentation

◆ m_application

template<typename InterfaceType>
IApplication* Arcane::Internal::ServiceFinderBase2T< InterfaceType >::m_application
protected

Definition at line 249 of file ServiceFinder2.h.

◆ m_service_build_info_base

template<typename InterfaceType>
ServiceBuildInfoBase Arcane::Internal::ServiceFinderBase2T< InterfaceType >::m_service_build_info_base
protected

Definition at line 250 of file ServiceFinder2.h.


The documentation for this class was generated from the following file: