Arcane  v4.1.2.0
Documentation développeur
Chargement...
Recherche...
Aucune correspondance
StringVariableReplace.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/* StringVariableReplace.h (C) 2000-2025 */
9/* */
10/* Classe permettant de remplacer les symboles d'une chaine de caractères */
11/* par une autre chaine de caractères définie dans les arguments de */
12/* lancement. */
13/* Un symbole est défini par une chaine de caractères entourée de @. */
14/* Exemple : @mon_symbole@ */
15/*---------------------------------------------------------------------------*/
16#ifndef ARCANE_CORE_INTERNAL_STRINGVARIABLEREPLACE_H
17#define ARCANE_CORE_INTERNAL_STRINGVARIABLEREPLACE_H
18/*---------------------------------------------------------------------------*/
19/*---------------------------------------------------------------------------*/
20
21#include "arcane/utils/ParameterList.h"
22#include "arcane/utils/internal/ParameterListWithCaseOption.h"
23
24/*---------------------------------------------------------------------------*/
25/*---------------------------------------------------------------------------*/
26
27namespace Arcane
28{
29
30/*---------------------------------------------------------------------------*/
31/*---------------------------------------------------------------------------*/
32
33class ARCANE_CORE_EXPORT StringVariableReplace
34{
35 public:
36
37 static String replaceWithCmdLineArgs(StringView string_with_symbols, bool fatal_if_not_found = false,
38 bool fatal_if_invalid = true);
39 static String replaceWithCmdLineArgs(const ParameterListWithCaseOption& parameter_list,
40 StringView string_with_symbols,
41 bool fatal_if_not_found = false,
42 bool fatal_if_invalid = true);
43
44 private:
45
46 static void _splitString(StringView str_view, ArrayView<StringView> str_view_array, char c);
47 static void _countChar(StringView str_view, char c, Integer& count_c, Integer& count_c_with_escape);
48};
49
50/*---------------------------------------------------------------------------*/
51/*---------------------------------------------------------------------------*/
52
53} // End namespace Arcane
54
55/*---------------------------------------------------------------------------*/
56/*---------------------------------------------------------------------------*/
57
58#endif
Vue modifiable d'un tableau d'un type T.
Liste de paramètres avec informations pour surcharger les options du jeu de données.
static void _countChar(StringView str_view, char c, Integer &count_c, Integer &count_c_with_escape)
Méthode permettant de compter le nombre de caractères séparateurs dans une chaine de caractères.
static void _splitString(StringView str_view, ArrayView< StringView > str_view_array, char c)
Méthode permettant de splitter la chaine "str_view" en plusieurs morceaux. Les splits seront entre le...
Vue sur une chaîne de caractères UTF-8.
Definition StringView.h:47
Chaîne de caractères unicode.
-*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
Int32 Integer
Type représentant un entier.