Arcane  v3.16.4.0
Documentation utilisateur
Chargement...
Recherche...
Aucune correspondance
XmlProperty.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/* XmlProperty.h (C) 2000-2025 */
9/* */
10/* Propriétés liée à un noeud XML. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_CORE_XMLPROPERTY_H
13#define ARCANE_CORE_XMLPROPERTY_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
17#include "arcane/core/IProperty.h"
18#include "arcane/core/XmlNode.h"
19
20/*---------------------------------------------------------------------------*/
21/*---------------------------------------------------------------------------*/
22
23namespace Arcane
24{
25
26/*---------------------------------------------------------------------------*/
27/*---------------------------------------------------------------------------*/
28/*!
29 * \brief Interface d'une valeur propriété.
30 */
31class XmlPropertyValue
32: public IPropertyValue
33{
34 public:
35
36 XmlPropertyValue(const XmlNode& node,IPropertyType* type,
37 IPropertyTypeInstance* type_instance);
38 XmlPropertyValue();
39
40 public:
41
42 void valueToString(String& str) const override;
43 void nameToString(String& str) const override;
44 void setValueFromString(const String& str) override;
45 bool isDefaultValue() const override;
46 bool isOriginalValue() const override;
47 void originalValueToString(String& str) const override;
48 bool canBeEdited() const override;
49 IPropertyType* type() override;
51
52 public:
53
54 XmlNode& node();
55 void setNode(const XmlNode& node);
56 void setType(IPropertyType* type);
57 void setTypeInstance(IPropertyTypeInstance* type_instance);
58
59 private:
60
61 XmlNode m_node;
62 IPropertyType* m_type = nullptr;
63 IPropertyTypeInstance* m_type_instance = nullptr;
64};
65
66/*---------------------------------------------------------------------------*/
67/*---------------------------------------------------------------------------*/
68
69} // namespace Arcane
70
71/*---------------------------------------------------------------------------*/
72/*---------------------------------------------------------------------------*/
73
74#endif
Chaîne de caractères unicode.
Noeud d'un arbre DOM.
Definition XmlNode.h:51
bool canBeEdited() const override
Retourne si la valeur peut être éditée.
void nameToString(String &str) const override
Stocke le nom de la propriété dans str.
bool isDefaultValue() const override
Retourne si la valeur actuelle est la valeur par défaut.
void originalValueToString(String &str) const override
Stocke la valeur originale de la propriété dans str.
void setValueFromString(const String &str) override
Positionne la nouvelle valeur de la propriété à str.
bool isOriginalValue() const override
Retourne si la valeur actuelle est la valeur originelle.
IPropertyTypeInstance * typeInstance() override
Retourne l'instance associé à cette valeur.
IPropertyType * type() override
Retourne le type de cette propriété.
void valueToString(String &str) const override
Stocke la valeur de la propriété dans str.
-*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-