12#ifndef ARCANE_CORE_AXLOPTIONSBUILDER_H
13#define ARCANE_CORE_AXLOPTIONSBUILDER_H
17#include "arcane/utils/String.h"
26namespace Arcane::AxlOptionsBuilder
43 friend DocumentXmlWriter;
44 friend DocumentJSONWriter;
51 explicit OptionList(
const std::initializer_list<OneOption>& options);
57 OptionList& add(
const std::initializer_list<OneOption>& options);
65 std::shared_ptr<OneOptionImpl> m_p;
74class ARCANE_CORE_EXPORT OneOption
76 friend class OptionList;
77 friend class OneOptionImpl;
78 friend DocumentXmlWriter;
79 friend DocumentJSONWriter;
94 OneOption() =
default;
98 OneOption(Type type,
const String& name,
const String& value)
103 OneOption(Type type,
const String& name,
const OptionList& option);
107 Type m_type = Type::CO_Simple;
112 std::shared_ptr<OneOptionImpl> m_sub_option;
121class ARCANE_CORE_EXPORT Simple
127 : OneOption(Type::CO_Simple, name, String::fromNumber(value))
131 : OneOption(Type::CO_Simple, name, String::fromNumber(value))
136 : OneOption(Type::CO_Simple, name, String::fromNumber(value))
141 : OneOption(Type::CO_Simple, name, value)
147 Simple& addFunction(
const String& func_name)
149 m_function_name = func_name;
160class ARCANE_CORE_EXPORT Enumeration
166 : OneOption(Type::CO_Enumeration, name, value)
177class ARCANE_CORE_EXPORT Extended
183 : OneOption(Type::CO_Extended, name, value)
194class ARCANE_CORE_EXPORT Complex
199 Complex(
const String& name,
const std::initializer_list<OneOption>& options);
200 Complex(
const String& name,
const OptionList& option);
209class ARCANE_CORE_EXPORT ServiceInstance
214 ServiceInstance(
const String& option_name,
const String& service_name,
215 const std::initializer_list<OneOption>& options);
216 ServiceInstance(
const String& option_name,
const String& service_name,
217 const OptionList& options);
218 ServiceInstance(
const String& option_name,
const String& service_name);
227class ARCANE_CORE_EXPORT Document
229 friend DocumentXmlWriter;
230 friend DocumentJSONWriter;
241 const String& language()
const {
return m_language; }
Declarations of Arcane's general types.
JSON writer for a data set.
XML writer for a data set.
Base class for a dynamic option.
String m_value
Option name.
String m_service_name
Option value (if CO_Simple option).
OptionList()
Constructs an empty set of options.
Unicode character string.
GenericDocument< UTF8<> > Document
GenericDocument with UTF8 encoding.
std::int64_t Int64
Signed integer type of 64 bits.
double Real
Type representing a real number.
std::int32_t Int32
Signed integer type of 32 bits.