Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
ConfigurationReader.h
1// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2//-----------------------------------------------------------------------------
3// Copyright 2000-2026 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/* ConfigurationReader.h (C) 2000-2020 */
9/* */
10/* Configuration file readers. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_IMPL_CONFIGURATIONREADER_H
13#define ARCANE_IMPL_CONFIGURATIONREADER_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
17#include "arcane/utils/TraceAccessor.h"
18
19/*---------------------------------------------------------------------------*/
20/*---------------------------------------------------------------------------*/
21
22namespace Arcane
23{
24
25/*---------------------------------------------------------------------------*/
26/*---------------------------------------------------------------------------*/
27
28class XmlNode;
29class IConfiguration;
30
31/*---------------------------------------------------------------------------*/
32/*---------------------------------------------------------------------------*/
33
37class ARCANE_IMPL_EXPORT ConfigurationReader
38: public TraceAccessor
39{
40 public:
41
42 enum Priority
43 {
44 P_CaseDocument = 10,
45 P_TimeLoop = 50,
46 P_Global = 100,
47 P_GlobalRuntime = 110
48 };
49
50 public:
51
52 ConfigurationReader(ITraceMng* tm, IConfiguration* config)
53 : TraceAccessor(tm)
54 , m_configuration(config)
55 {}
56
67 void addValuesFromXmlNode(const XmlNode& element, Integer priority);
68
82 void addValuesFromJSON(const JSONValue& jv, Integer priority);
83
84 private:
85
86 IConfiguration* m_configuration;
87
88 private:
89
90 void _addValuesFromJSON(const JSONValue& jv, Integer priority, const String& base_name);
91};
92
93/*---------------------------------------------------------------------------*/
94/*---------------------------------------------------------------------------*/
95
96} // End namespace Arcane
97
98/*---------------------------------------------------------------------------*/
99/*---------------------------------------------------------------------------*/
100
101#endif
void addValuesFromXmlNode(const XmlNode &element, Integer priority)
Adds values to the configuration.
void addValuesFromJSON(const JSONValue &jv, Integer priority)
Adds values to the configuration.
Interface for a configuration.
TraceAccessor(ITraceMng *m)
Constructs an accessor via the trace manager m.
Node of a DOM tree.
Definition XmlNode.h:51
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
Int32 Integer
Type representing an integer.