Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
IFactoryService.h
1// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2//-----------------------------------------------------------------------------
3// Copyright 2000-2026 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-2025 */
9/* */
10/* Factory service interface. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_CORE_IFACTORYSERVICE_H
13#define ARCANE_CORE_IFACTORYSERVICE_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
17#include "arcane/core/IService.h"
18#include "arcane/core/ServiceBuildInfo.h"
19
20/*---------------------------------------------------------------------------*/
21/*---------------------------------------------------------------------------*/
22
23namespace Arcane
24{
25
26/*---------------------------------------------------------------------------*/
27/*---------------------------------------------------------------------------*/
28
33template <typename InterfaceType>
34class IFactoryServiceT
35: public IService
36{
37 protected:
38
39 IFactoryServiceT() = default;
40
41 public:
42
48 virtual InterfaceType* createInstance() = 0;
49
57 virtual InterfaceType* createInstance(IMesh* mesh) = 0;
58
64 virtual InterfaceType* singletonInstance() = 0;
65};
66
67/*---------------------------------------------------------------------------*/
68/*---------------------------------------------------------------------------*/
69
70} // namespace Arcane
71
72/*---------------------------------------------------------------------------*/
73/*---------------------------------------------------------------------------*/
74
75#endif
virtual InterfaceType * singletonInstance()=0
Create a singleton instance.
virtual InterfaceType * createInstance()=0
Create an instance.
virtual InterfaceType * createInstance(IMesh *mesh)=0
Create an instance for the mesh mesh.
IService()
Constructor.
Definition IService.h:44
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --