Arcane  v3.14.10.0
Documentation développeur
Chargement...
Recherche...
Aucune correspondance
IFactoryService.h
1// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2//-----------------------------------------------------------------------------
3// Copyright 2000-2022 CEA (www.cea.fr) IFPEN (www.ifpenergiesnouvelles.com)
4// See the top-level COPYRIGHT file for details.
5// SPDX-License-Identifier: Apache-2.0
6//-----------------------------------------------------------------------------
7/*---------------------------------------------------------------------------*/
8/* IFactoryService.h (C) 2000-2006 */
9/* */
10/* Interface d'un service de fabrique. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_IFACTORYSERVICE_H
13#define ARCANE_IFACTORYSERVICE_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
17#include "arcane/IService.h"
18#include "arcane/ServiceBuildInfo.h"
19
20/*---------------------------------------------------------------------------*/
21/*---------------------------------------------------------------------------*/
22
23ARCANE_BEGIN_NAMESPACE
24
25/*---------------------------------------------------------------------------*/
26/*---------------------------------------------------------------------------*/
27
28class IService;
29
30/*---------------------------------------------------------------------------*/
31/*---------------------------------------------------------------------------*/
36template<typename InterfaceType>
38: public IService
39{
40 protected:
42 public:
43
45 virtual ~IFactoryServiceT() {}
46
47 public:
48
53 virtual InterfaceType* createInstance() =0;
54
61 virtual InterfaceType* createInstance(IMesh* mesh) =0;
62
68 virtual InterfaceType* singletonInstance() =0;
69};
70
71/*---------------------------------------------------------------------------*/
72/*---------------------------------------------------------------------------*/
73
74ARCANE_END_NAMESPACE
75
76/*---------------------------------------------------------------------------*/
77/*---------------------------------------------------------------------------*/
78
79#endif
80
Interface d'une fabrique sur une classe implémentant InterfaceType.
virtual InterfaceType * singletonInstance()=0
Créé une instance singleton.
virtual InterfaceType * createInstance()=0
Créé une instance.
virtual ~IFactoryServiceT()
Libère les ressources.
virtual InterfaceType * createInstance(IMesh *mesh)=0
Créé une instance pour le maillage mesh.
Interface d'un service.
Definition IService.h:45