Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
MeshMaterialInfo.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/* MeshMaterialInfo.h (C) 2000-2022 */
9/* */
10/* Information about a material of a mesh. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_MATERIALS_MESHMATERIALINFO_H
13#define ARCANE_MATERIALS_MESHMATERIALINFO_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
17#include "arcane/utils/String.h"
18#include "arcane/utils/Array.h"
20
21/*---------------------------------------------------------------------------*/
22/*---------------------------------------------------------------------------*/
23
24namespace Arcane::Materials
25{
26
27/*---------------------------------------------------------------------------*/
28/*---------------------------------------------------------------------------*/
29
38class MeshMaterialInfo
39{
40 friend class MeshMaterialMng;
41
42 private:
43
44 MeshMaterialInfo(IMeshMaterialMng* mng, const String& name);
45 virtual ~MeshMaterialInfo() = default;
46
47 public:
48
50 IMeshMaterialMng* materialMng() { return m_material_mng; }
51
53 String name() const { return m_name; }
54
57
58 protected:
59
60 void _addEnvironment(const String& env_name)
61 {
62 m_environments_name.add(env_name);
63 }
64
65 private:
66
67 IMeshMaterialMng* m_material_mng;
68 String m_name;
71};
72
73/*---------------------------------------------------------------------------*/
74/*---------------------------------------------------------------------------*/
75
76} // End namespace Arcane::Materials
77
78/*---------------------------------------------------------------------------*/
79/*---------------------------------------------------------------------------*/
80
81#endif
void add(ConstReferenceType val)
Adds element val to the end of the array.
Constant view of an array of type T.
Interface for the material and environment manager of a mesh.
ConstArrayView< String > environmentsName() const
Names of the environments in which this material is present.
IMeshMaterialMng * materialMng()
Associated manager.
String name() const
Material name.
UniqueArray< String > m_environments_name
List of environments to which the material belongs.
1D data vector with value semantics (STL style).
Always enables tracing in Arcane parts concerning materials.