Arcane  v4.1.2.0
Documentation développeur
Chargement...
Recherche...
Aucune correspondance
ParameterCaseOption.h
1// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2//-----------------------------------------------------------------------------
3// Copyright 2000-2025 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/* ParameterCaseOption.h (C) 2000-2025 */
9/* */
10/* Classe permettant d'interroger les paramètres pour savoir si des options */
11/* du jeu de données doivent être modifiées par ceux-ci. */
12/*---------------------------------------------------------------------------*/
13#ifndef ARCANE_UTILS_INTERNAL_PARAMETERCASEOPTION_H
14#define ARCANE_UTILS_INTERNAL_PARAMETERCASEOPTION_H
15/*---------------------------------------------------------------------------*/
16/*---------------------------------------------------------------------------*/
17
19
20/*---------------------------------------------------------------------------*/
21/*---------------------------------------------------------------------------*/
22
23namespace Arcane
24{
25
26/*---------------------------------------------------------------------------*/
27/*---------------------------------------------------------------------------*/
28
30
31/*---------------------------------------------------------------------------*/
32/*---------------------------------------------------------------------------*/
37class ARCANE_UTILS_EXPORT ParameterCaseOption
38{
39
40 public:
41
42 ParameterCaseOption(ParameterOptionElementsCollection* parameter_options, const String& lang);
43
44 public:
45
71 String getParameterOrNull(const String& xpath_before_index, const String& xpath_after_index, Integer index) const;
72
98 String getParameterOrNull(const String& xpath_before_index, Integer index, bool allow_elems_after_index) const;
99
115 String getParameterOrNull(const String& full_xpath) const;
116
132 bool exist(const String& full_xpath) const;
133
159 bool existAnyIndex(const String& xpath_before_index, const String& xpath_after_index) const;
160
181 bool existAnyIndex(const String& full_xpath) const;
182
209 void indexesInParam(const String& xpath_before_index, const String& xpath_after_index, UniqueArray<Integer>& indexes) const;
210
237 void indexesInParam(const String& xpath_before_index, UniqueArray<Integer>& indexes, bool allow_elems_after_index) const;
238
264 Integer count(const String& xpath_before_index, const String& xpath_after_index) const;
265
286 Integer count(const String& xpath_before_index) const;
287
288 private:
289
290 inline StringView _removeUselessPartInXpath(StringView xpath) const;
291
292 private:
293
294 bool m_is_fr = false;
295 ParameterOptionElementsCollection* m_lines = nullptr;
296};
297
298/*---------------------------------------------------------------------------*/
299/*---------------------------------------------------------------------------*/
300
301} // End namespace Arcane
302
303/*---------------------------------------------------------------------------*/
304/*---------------------------------------------------------------------------*/
305
306#endif
Déclarations des types utilisés dans Arcane.
bool existAnyIndex(const String &xpath_before_index, const String &xpath_after_index) const
Méthode permettant de savoir si une option est présente.
void indexesInParam(const String &xpath_before_index, const String &xpath_after_index, UniqueArray< Integer > &indexes) const
Méthode permettant de récupérer le ou les indices de l'option.
Integer count(const String &xpath_before_index, const String &xpath_after_index) const
Méthode permettant de connaitre le nombre d'indices de l'option.
bool exist(const String &full_xpath) const
Méthode permettant de savoir si une option est présente.
String getParameterOrNull(const String &xpath_before_index, const String &xpath_after_index, Integer index) const
Méthode permettant de récupérer la valeur d'une option.
Classe représentant un ensemble d'éléments XML (un ensemble d'options Arcane).
Vue sur une chaîne de caractères UTF-8.
Definition StringView.h:47
Chaîne de caractères unicode.
Vecteur 1D de données avec sémantique par valeur (style STL).
-*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
Int32 Integer
Type représentant un entier.