Arcane  v3.15.3.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
17#ifndef ARCANE_CORE_INTERNAL_STRINGVARIABLEREPLACE_H
18#define ARCANE_CORE_INTERNAL_STRINGVARIABLEREPLACE_H
19
20/*---------------------------------------------------------------------------*/
21/*---------------------------------------------------------------------------*/
22
23#include "arcane/utils/ParameterList.h"
24
25#include "arcane/core/VariableTypes.h"
26
27/*---------------------------------------------------------------------------*/
28/*---------------------------------------------------------------------------*/
29
30namespace Arcane
31{
32
33/*---------------------------------------------------------------------------*/
34/*---------------------------------------------------------------------------*/
35
36class ARCANE_CORE_EXPORT StringVariableReplace
37{
38 public:
39
40 static String replaceWithCmdLineArgs(const ParameterList& parameter_list, StringView string_with_symbols, bool fatal_if_not_found = false, bool fatal_if_invalid = true);
41
42 private:
43
44 static void _splitString(StringView str_view, ArrayView<StringView> str_view_array, char c);
45 static void _countChar(StringView str_view, char c, Integer& count_c, Integer& count_c_with_escape);
46};
47
48/*---------------------------------------------------------------------------*/
49/*---------------------------------------------------------------------------*/
50
51} // End namespace Arcane
52
53/*---------------------------------------------------------------------------*/
54/*---------------------------------------------------------------------------*/
55
56#endif
Lecteur des fichiers de maillage via la bibliothèque LIMA.
Definition Lima.cc:149
Liste de paramètres.
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 -*-