Arcane  4.1.12.0
User documentation
Loading...
Searching...
No Matches
IModule.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/* IModule.h (C) 2000-2025 */
9/* */
10/* Interface of the Module class. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_CORE_IMODULE_H
13#define ARCANE_CORE_IMODULE_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
18
19/*---------------------------------------------------------------------------*/
20/*---------------------------------------------------------------------------*/
21
22namespace Arcane
23{
24
25/*---------------------------------------------------------------------------*/
26/*---------------------------------------------------------------------------*/
27
28class IVariableRef;
29class IParallelMng;
30class CaseOptionsMain;
31
32/*---------------------------------------------------------------------------*/
33/*---------------------------------------------------------------------------*/
34
35/*!
36 * \brief Interface of a module.
37 * \ingroup Module
38 */
39class ARCANE_CORE_EXPORT IModule
40{
41 public:
42
43 //! Destructor
44 virtual ~IModule() {}
45
46 public:
47
48 //! Module name
49 virtual String name() const = 0;
50
51 //! Module version
52 virtual VersionInfo versionInfo() const = 0;
53
54 public:
55
56 //! Module session
57 virtual ISession* session() const = 0;
58
59 //! Sub-domain manager.
60 virtual ISubDomain* subDomain() const = 0;
61
62 //! Associated mesh. Can be null. Use defaultMeshHandle() instead
63 virtual IMesh* defaultMesh() const = 0;
64
65 //! Associated mesh
66 virtual MeshHandle defaultMeshHandle() const = 0;
67
68 //! Message passing parallelism manager
69 virtual IParallelMng* parallelMng() const = 0;
70
71 //! Accelerator manager
72 virtual IAcceleratorMng* acceleratorMng() const = 0;
73
74 //! Trace manager.
75 virtual ITraceMng* traceMng() const = 0;
76
77 public:
78
79 /*!
80 * \brief Indicates whether a module is used or not (internal).
81 *
82 * A module is used if and only if at least one of its
83 * entry points is used in the time loop.
84 */
85 virtual void setUsed(bool v) = 0;
86
87 //! \a true if the module is used.
88 virtual bool used() const = 0;
89
90 /*!
91 * \brief Temporarily activates or deactivates the module (internal).
92 *
93 * When a module is disabled, its calculation loop entry points are
94 * no longer called (but others like initialization or termination
95 * ones still are).
96 */
97 virtual void setDisabled(bool v) = 0;
98
99 //! \a true if the module is disabled
100 virtual bool disabled() const = 0;
101
102 /*! \internal
103 * \brief Indicates if the module is managed by a garbage collector,
104 * in which case the delete operator should not be called on it.
105 */
106 virtual bool isGarbageCollected() const = 0;
107};
108
109/*---------------------------------------------------------------------------*/
110/*---------------------------------------------------------------------------*/
111
112} // End namespace Arcane
113
114/*---------------------------------------------------------------------------*/
115/*---------------------------------------------------------------------------*/
116
117#endif
Declarations of Arcane's general types.
Interface of a module.
Definition IModule.h:40
virtual ~IModule()
Destructor.
Definition IModule.h:44
virtual MeshHandle defaultMeshHandle() const =0
Associated mesh.
virtual void setUsed(bool v)=0
Indicates whether a module is used or not (internal).
virtual VersionInfo versionInfo() const =0
Module version.
virtual IMesh * defaultMesh() const =0
Associated mesh. Can be null. Use defaultMeshHandle() instead.
virtual String name() const =0
Module name.
virtual ISubDomain * subDomain() const =0
Sub-domain manager.
virtual IAcceleratorMng * acceleratorMng() const =0
Accelerator manager.
virtual ISession * session() const =0
Module session.
virtual ITraceMng * traceMng() const =0
Trace manager.
virtual bool disabled() const =0
true if the module is disabled
virtual void setDisabled(bool v)=0
Temporarily activates or deactivates the module (internal).
virtual IParallelMng * parallelMng() const =0
Message passing parallelism manager.
virtual bool used() const =0
true if the module is used.
Interface of the parallelism manager for a subdomain.
Interface for a case execution session.
Definition ISession.h:38
Interface of the subdomain manager.
Definition ISubDomain.h:75
Handle on a mesh.
Definition MeshHandle.h:48
Information about a version.
Definition VersionInfo.h:47
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --