Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
VariableInfo.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/* VariableInfo.h (C) 2000-2025 */
9/* */
10/* Information characterizing a variable. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_CORE_VARIABLEINFO_H
13#define ARCANE_CORE_VARIABLEINFO_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
17#include "arcane/utils/String.h"
18
19#include "arcane/core/datatype/DataStorageTypeInfo.h"
20
22#include "arcane/core/IVariable.h"
23#include "arcane/core/VariableTypeInfo.h"
24
25/*---------------------------------------------------------------------------*/
26/*---------------------------------------------------------------------------*/
27
28namespace Arcane
29{
30
31/*---------------------------------------------------------------------------*/
32/*---------------------------------------------------------------------------*/
33
37class ARCANE_CORE_EXPORT VariableInfo
38{
39 public:
40
41 ARCCORE_DEPRECATED_2020("Use overload with 'DataStorageTypeInfo' argument")
42 VariableInfo(const String& local_name, const String& item_family_name,
43 const String& item_group_name,
44 const String& mesh_name, eItemKind item_kind,
45 Integer dimension, Integer multi_tag, eDataType type);
46
47 VariableInfo(const String& local_name, const String& item_family_name,
48 const String& item_group_name,
49 const String& mesh_name,
50 const VariableTypeInfo& var_type_info,
51 const DataStorageTypeInfo& storage_info);
52
53 public:
54
56 const String& localName() const { return m_local_name; }
58 const String& itemFamilyName() const { return m_item_family_name; }
60 const String& itemGroupName() const { return m_item_group_name; }
62 const String& meshName() const { return m_mesh_name; }
64 const String& fullName() const
65 {
66 if (m_full_name.null())
68 return m_full_name;
69 }
70
71 eItemKind itemKind() const { return m_variable_type_info.itemKind(); }
73 Integer dimension() const { return m_variable_type_info.dimension(); }
75 Integer multiTag() const { return m_variable_type_info.multiTag(); }
77 eDataType dataType() const { return m_variable_type_info.dataType(); }
79 bool isPartial() const { return m_variable_type_info.isPartial(); }
80
85 void setDefaultItemGroupName();
86
91
92 public:
93
95 _internalGetStorageTypeInfo(eDataType data_type, Integer dimension, Integer multi_tag);
96
97 private:
98
113
114 private:
115
116 String _defaultFamilyName();
117 void _computeFullName() const;
118};
119
120/*---------------------------------------------------------------------------*/
121/*---------------------------------------------------------------------------*/
122
123} // End namespace Arcane
124
125/*---------------------------------------------------------------------------*/
126/*---------------------------------------------------------------------------*/
127
128#endif
Declarations of Arcane's general types.
Type information for a data container.
String m_item_group_name
Name of the entity group to which the variable is associated.
bool isPartial() const
Indicates if the variable is partial.
DataStorageTypeInfo m_storage_type_info
Information about the variable data container.
const String & itemFamilyName() const
Name of the entity family to which the variable is associated.
const String & localName() const
Name of the variable.
VariableTypeInfo variableTypeInfo() const
Information about the variable type.
Integer multiTag() const
Multi-tag.
VariableTypeInfo m_variable_type_info
Information about the variable type.
eItemKind itemKind() const
Mesh entity type.
String m_full_name
Full name of the variable (associated with the family).
const String & itemGroupName() const
Name of the entity group to which the variable is associated.
DataStorageTypeInfo storageTypeInfo() const
Information about the variable container type.
Integer dimension() const
Dimension.
eDataType dataType() const
Element type.
String m_local_name
Name of the variable.
const String & meshName() const
Name of the mesh to which the variable is associated.
const String & fullName() const
Full name of the variable (associated with the family).
String m_mesh_name
Name of the mesh to which the variable is associated.
String m_item_family_name
Name of the entity family to which the variable is associated.
void _computeFullName() const
Calculates the full name of the variable.
Information characterizing the type of a variable.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
Int32 Integer
Type representing an integer.
eItemKind
Mesh entity type.
eDataType
Data type.
Definition DataTypes.h:41