Arcane  v3.14.10.0
Documentation développeur
Chargement...
Recherche...
Aucune correspondance
XmlProperty.cc
1// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2//-----------------------------------------------------------------------------
3// Copyright 2000-2022 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.cc (C) 2000-2005 */
9/* */
10/* Propriétés liée à un noeud XML. */
11/*---------------------------------------------------------------------------*/
12/*---------------------------------------------------------------------------*/
13
14
15#include "arcane/utils/ArcanePrecomp.h"
16
17#include "arcane/XmlProperty.h"
18
19/*---------------------------------------------------------------------------*/
20/*---------------------------------------------------------------------------*/
21
22ARCANE_BEGIN_NAMESPACE
23
24/*---------------------------------------------------------------------------*/
25/*---------------------------------------------------------------------------*/
26
27XmlPropertyValue::
28XmlPropertyValue(const XmlNode& node,IPropertyType* type,
29 IPropertyTypeInstance* type_instance)
30: m_node(node)
31, m_type(type)
32, m_type_instance(type_instance)
33{
34}
35
36XmlPropertyValue::
37XmlPropertyValue()
38: m_node(0)
39, m_type(0)
40, m_type_instance(0)
41{
42}
43
44void XmlPropertyValue::
45valueToString(String& str) const
46{
47 str = m_node.value();
48}
49
50void XmlPropertyValue::
51nameToString(String& str) const
52{
53 str = m_node.name();
54}
55
56void XmlPropertyValue::
57setValueFromString(const String& str)
58{
59 m_node.setValue(str);
60}
61
62bool XmlPropertyValue::
63isDefaultValue() const
64{
65 return false;
66}
67
68bool XmlPropertyValue::
69isOriginalValue() const
70{
71 return false;
72}
73
74void XmlPropertyValue::
75originalValueToString(String& str) const
76{
77 str = String();
78}
79
80bool XmlPropertyValue::
81canBeEdited() const
82{
83 return true;
84}
85
86IPropertyType* XmlPropertyValue::
87type()
88{
89 return m_type;
90}
91
92IPropertyTypeInstance* XmlPropertyValue::
93typeInstance()
94{
95 return m_type_instance;
96}
97
98void XmlPropertyValue::
99setType(IPropertyType* type)
100{
101 m_type = type;
102}
103
104void XmlPropertyValue::
105setTypeInstance(IPropertyTypeInstance* type_instance)
106{
107 m_type_instance = type_instance;
108}
109
110XmlNode& XmlPropertyValue::
111node()
112{
113 return m_node;
114}
115
116void XmlPropertyValue::
117setNode(const XmlNode& node)
118{
119 m_node = node;
120}
121
122/*---------------------------------------------------------------------------*/
123/*---------------------------------------------------------------------------*/
124
125ARCANE_END_NAMESPACE
126
127/*---------------------------------------------------------------------------*/
128/*---------------------------------------------------------------------------*/
129
Interface d'une instance d'un type de propriété.
Definition IProperty.h:148
Interface d'un type de propriété.
Definition IProperty.h:105
Chaîne de caractères unicode.