Arcane  v3.14.10.0
Documentation développeur
Chargement...
Recherche...
Aucune correspondance
Properties.h
1// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2//-----------------------------------------------------------------------------
3// Copyright 2000-2022 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/* Properties.h (C) 2000-2022 */
9/* */
10/* Liste de propriétés. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_PROPERTIES_H
13#define ARCANE_PROPERTIES_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
18#include "arcane/utils/AutoRef.h"
19#include "arcane/SharedReference.h"
20#include "arcane/ArcaneTypes.h"
21
22/*---------------------------------------------------------------------------*/
23/*---------------------------------------------------------------------------*/
24
25namespace Arcane
26{
27
28/*---------------------------------------------------------------------------*/
29/*---------------------------------------------------------------------------*/
30
31class PropertiesImpl;
32class IPropertyMng;
33
35: public SharedReference
36{
37};
38
39/*---------------------------------------------------------------------------*/
40/*---------------------------------------------------------------------------*/
63class ARCANE_CORE_EXPORT Properties
64{
65 public:
66
68 Properties(IPropertyMng* pm,const String& name);
69
71 Properties(const Properties& parent_property,const String& name);
72
76 const Properties& operator=(const Properties& rhs);
78 virtual ~Properties();
79
80 public:
81
83 void setBool(const String& name,bool value);
84
86 void set(const String& name,bool value);
87
89 bool getBool(const String& name) const;
90
92 bool getBoolWithDefault(const String& name,bool default_value) const;
93
95 bool get(const String& name,bool& value) const;
96
98 void setInt32(const String& name,Int32 value);
99
101 void set(const String& name,Int32 value);
102
104 Int32 getInt32(const String& name) const;
105
107 Int32 getInt32WithDefault(const String& name,Int32 default_value) const;
108
110 bool get(const String& name,Int32& value) const;
111
113 void setInt64(const String& name,Int64 value);
114
116 void set(const String& name,Int64 value);
117
119 Int64 getInt64(const String& name) const;
120
122 Int64 getInt64WithDefault(const String& name,Int64 default_value) const;
123
125 bool get(const String& name,Int64& value) const;
126
128 void setInteger(const String& name,Integer value);
129
131 Integer getInteger(const String& name) const;
132
134 Integer getIntegerWithDefault(const String& name,Integer default_value) const;
135
137 void setReal(const String& name,Real value);
138
140 void set(const String& name,Real value);
141
143 Real getReal(const String& name) const;
144
146 Real getRealWithDefault(const String& name,Real default_value) const;
147
149 bool get(const String& name,Real& value) const;
150
152 void setString(const String& name,const String& value);
153
155 void set(const String& name,const String& value);
156
158 String getString(const String& name) const;
159
161 String getStringWithDefault(const String& name,const String& default_value) const;
162
164 bool get(const String& name,String& value) const;
165
167 void set(const String& name,BoolConstArrayView value);
168
170 void get(const String& name,BoolArray& value) const;
171
173 void set(const String& name,Int32ConstArrayView value);
174
176 void get(const String& name,Int32Array& value) const;
177
179 void set(const String& name,Int64ConstArrayView value);
180
182 void get(const String& name,Int64Array& value) const;
183
185 void set(const String& name,RealConstArrayView value);
186
188 void get(const String& name,RealArray& value) const;
189
191 void set(const String& name,StringConstArrayView value);
192
194 void get(const String& name,StringArray& value) const;
195
196 public:
197
199 void print(std::ostream& o) const;
200
202 void serialize(ISerializer* serializer);
203
205 const String& name() const;
206
208 const String& fullName() const;
209
210 IPropertyMng* propertyMng() const;
211
215 void destroy();
216
218 PropertiesImpl* impl() const { return m_p; }
219
221 PropertiesImplBase* baseImpl() const { return m_ref.get(); }
222
223 private:
224
225 PropertiesImpl* m_p;
227
228 private:
229
231};
232
233/*---------------------------------------------------------------------------*/
234/*---------------------------------------------------------------------------*/
235
236} // End namespace Arcane
237
238/*---------------------------------------------------------------------------*/
239/*---------------------------------------------------------------------------*/
240
241#endif
242
Déclarations des types utilisés dans Arcane.
Tableau d'items de types quelconques.
Interface du gestionnaire des propriétés.
Lecteur des fichiers de maillage via la bibliothèque LIMA.
Definition Lima.cc:120
Liste de propriétés.
Definition Properties.h:64
PropertiesImplBase * baseImpl() const
Definition Properties.h:221
PropertiesImpl * impl() const
Definition Properties.h:218
Implémentation d'un compteur de référence utilisant std::atomic.
Vue constante d'un tableau de type T.
Chaîne de caractères unicode.
-*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-