Arcane  4.1.12.0
User documentation
Loading...
Searching...
No Matches
ModuleBuildInfo.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/* ModuleBuildInfo.h (C) 2000-2025 */
9/* */
10/* Parameters for building a module. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_CORE_MODULEBUILDINFO_H
13#define ARCANE_CORE_MODULEBUILDINFO_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
17#include "arcane/utils/String.h"
18#include "arcane/core/MeshHandle.h"
19
20/*---------------------------------------------------------------------------*/
21/*---------------------------------------------------------------------------*/
22
23namespace Arcane
24{
25
26/*---------------------------------------------------------------------------*/
27/*---------------------------------------------------------------------------*/
28
29/*!
30 * \brief Information for building a module.
31 *
32 * \a ModuleBuildInfo is usually used via \a BasicModule
33 * (basic module) and \a AbstractModule (any module) for
34 * the creation of different modules.
35 *
36 * \ingroup Module
37 */
38class ARCANE_CORE_EXPORT ModuleBuildInfo
39{
40 public:
41
42 /*!
43 * \brief Constructor from a subdomain, a mesh, and a
44 * module implementation name.
45 *
46 * \deprecated Use the overload that takes a MeshHandle instead.
47 */
48 ARCANE_DEPRECATED_REASON("Y2022: use overload with meshHandle() instead of mesh")
50
51 public:
52
53 //! Constructor from a subdomain, a mesh, and a module implementation name
54 ModuleBuildInfo(ISubDomain* sd, const MeshHandle& mesh_handle, const String& name);
55
56 /*!
57 * \brief Constructor from a subdomain and a module implementation name
58 *
59 * The mesh considered is then the default mesh \a ISubDomain::defautMesh()
60 */
62
63 //! Destructor
64 virtual ~ModuleBuildInfo() {}
65
66 public:
67
68 //! Access to the associated subdomain
69 ISubDomain* subDomain() const { return m_sub_domain; }
70
71 //! Access to the associated mesh
72 const MeshHandle& meshHandle() const { return m_mesh_handle; }
73
74 //! Name of the implementation sought
75 const String& name() const { return m_name; }
76
77 public:
78
79 /*!
80 * \brief Access to the associated mesh.
81 *
82 * The mesh does not always exist if the dataset has not
83 * been read yet.
84 *
85 * \deprecated You must use meshHandle() instead.
86 */
87 IMesh* mesh() const { return m_mesh_handle.mesh(); }
88
89 private:
90
91 //! Associated subdomain
92 ISubDomain* m_sub_domain;
93
94 //! Associated mesh
95 MeshHandle m_mesh_handle;
96
97 //! Name of the implementation sought
98 String m_name;
99};
100
101/*---------------------------------------------------------------------------*/
102/*---------------------------------------------------------------------------*/
103
104} // End namespace Arcane
105
106/*---------------------------------------------------------------------------*/
107/*---------------------------------------------------------------------------*/
108
109#endif
Interface of the subdomain manager.
Definition ISubDomain.h:75
Handle on a mesh.
Definition MeshHandle.h:48
const String & name() const
Name of the implementation sought.
virtual ~ModuleBuildInfo()
Destructor.
IMesh * mesh() const
Access to the associated mesh.
ISubDomain * subDomain() const
Access to the associated subdomain.
ModuleBuildInfo(ISubDomain *sd, IMesh *mesh, const String &name)
Constructor from a subdomain, a mesh, and a module implementation name.
const MeshHandle & meshHandle() const
Access to the associated mesh.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --