Arcane  v3.16.0.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
14#ifndef ARCANE_UTILS_PARAMETERCASEOPTION_H
15#define ARCANE_UTILS_PARAMETERCASEOPTION_H
16
17/*---------------------------------------------------------------------------*/
18/*---------------------------------------------------------------------------*/
19
21
22/*---------------------------------------------------------------------------*/
23/*---------------------------------------------------------------------------*/
24
25namespace Arcane
26{
27
28/*---------------------------------------------------------------------------*/
29/*---------------------------------------------------------------------------*/
30
32
33/*---------------------------------------------------------------------------*/
34/*---------------------------------------------------------------------------*/
35
40class ARCANE_UTILS_EXPORT
41ParameterCaseOption
42{
43
44 public:
45
46 ParameterCaseOption(ParameterOptionElementsCollection* parameter_options, const String& lang);
47
48 public:
49
75 String getParameterOrNull(const String& xpath_before_index, const String& xpath_after_index, Integer index) const;
76
102 String getParameterOrNull(const String& xpath_before_index, Integer index, bool allow_elems_after_index) const;
103
119 String getParameterOrNull(const String& full_xpath) const;
120
136 bool exist(const String& full_xpath) const;
137
163 bool existAnyIndex(const String& xpath_before_index, const String& xpath_after_index) const;
164
185 bool existAnyIndex(const String& full_xpath) const;
186
213 void indexesInParam(const String& xpath_before_index, const String& xpath_after_index, UniqueArray<Integer>& indexes) const;
214
241 void indexesInParam(const String& xpath_before_index, UniqueArray<Integer>& indexes, bool allow_elems_after_index) const;
242
268 Integer count(const String& xpath_before_index, const String& xpath_after_index) const;
269
290 Integer count(const String& xpath_before_index) const;
291
292 private:
293
294 inline StringView _removeUselessPartInXpath(StringView xpath) const;
295
296 private:
297
298 bool m_is_fr;
300};
301
302/*---------------------------------------------------------------------------*/
303/*---------------------------------------------------------------------------*/
304
305} // End namespace Arcane
306
307/*---------------------------------------------------------------------------*/
308/*---------------------------------------------------------------------------*/
309
310#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.