PhoenixInkscape  2.0.0
Generate multiple png files with svg inkscape files
PXml.cpp
Go to the documentation of this file.
1 /***************************************
2  Auteur : Pierre Aubert
3  Mail : pierre.aubert@lapp.in2p3.fr
4  Licence : CeCILL-C
5 ****************************************/
6 
7 
8 
9 //You should not modify this file
10 
11 // You can print the configuration of the data format on saved files with :
12 // sed '/ENDOFCONFIG/q' fileName
13 
14 #include "PXml.h"
15 
16 
17 /***********************************************************************
18 * *
19 * Public functions of class PXmlAttr *
20 * *
21 ************************************************************************/
22 
23 
27 }
28 
30 
34  copyPXmlAttr(other);
35 }
36 
39 
40 }
41 
43 
47  copyPXmlAttr(other);
48  return *this;
49 }
50 
52 
54 void PXmlAttr::setName(const PString & name){
55  p_name = name;
56 }
57 
59 
61 void PXmlAttr::setValue(const PString & value){
62  p_value = value;
63 }
64 
66 
68 const PString & PXmlAttr::getName() const{
69  return p_name;
70 }
71 
73 
76  return p_name;
77 }
78 
80 
82 const PString & PXmlAttr::getValue() const{
83  return p_value;
84 }
85 
87 
90  return p_value;
91 }
92 
93 /***********************************************************************
94 * *
95 * Private functions of class PXmlAttr *
96 * *
97 ************************************************************************/
98 
99 
102  p_flag = 0lu;
103 
104 }
105 
107 
109 void PXmlAttr::copyPXmlAttr(const PXmlAttr & other){
110  p_name = other.p_name;
111  p_value = other.p_value;
112 
113 }
114 
115 /***********************************************************************
116 * *
117 * Public functions of class PXml *
118 * *
119 ************************************************************************/
120 
121 
125 }
126 
128 
130 PXml::PXml(const PXml & other){
132  copyPXml(other);
133 }
134 
137 
138 }
139 
141 
144 PXml & PXml::operator =(const PXml & other){
145  copyPXml(other);
146  return *this;
147 }
148 
150 
152 void PXml::setName(const PString & name){
153  p_name = name;
154 }
155 
157 
159 void PXml::setIsCompact(bool isCompact){
160  p_isCompact = isCompact;
161 }
162 
164 
166 void PXml::setValue(const PString & value){
167  p_value = value;
168 }
169 
171 
173 void PXml::setIsText(bool isText){
174  p_isText = isText;
175 }
176 
178 
180 void PXml::setVecAttr(const std ::vector<PXmlAttr> & vecAttr){
181  p_vecAttr = vecAttr;
182 }
183 
185 
187 void PXml::setVecChild(const std ::vector<PXml> & vecChild){
188  p_vecChild = vecChild;
189 }
190 
192 
194 const PString & PXml::getName() const{
195  return p_name;
196 }
197 
199 
202  return p_name;
203 }
204 
206 
208 bool PXml::getIsCompact() const{
209  return p_isCompact;
210 }
211 
213 
216  return p_isCompact;
217 }
218 
220 
222 const PString & PXml::getValue() const{
223  return p_value;
224 }
225 
227 
230  return p_value;
231 }
232 
234 
236 bool PXml::getIsText() const{
237  return p_isText;
238 }
239 
241 
244  return p_isText;
245 }
246 
248 
250 const std ::vector<PXmlAttr> & PXml::getVecAttr() const{
251  return p_vecAttr;
252 }
253 
255 
257 std ::vector<PXmlAttr> & PXml::getVecAttr(){
258  return p_vecAttr;
259 }
260 
262 
264 const std ::vector<PXml> & PXml::getVecChild() const{
265  return p_vecChild;
266 }
267 
269 
271 std ::vector<PXml> & PXml::getVecChild(){
272  return p_vecChild;
273 }
274 
275 /***********************************************************************
276 * *
277 * Private functions of class PXml *
278 * *
279 ************************************************************************/
280 
281 
284  p_flag = 0lu;
286  p_isCompact = 0;
288  p_isText = 0;
289 
290 }
291 
293 
295 void PXml::copyPXml(const PXml & other){
296  p_name = other.p_name;
297  p_isCompact = other.p_isCompact;
298  p_value = other.p_value;
299  p_isText = other.p_isText;
300  p_vecAttr = other.p_vecAttr;
301  p_vecChild = other.p_vecChild;
302 
303 }
304 
305 
306 
Extends the std::string.
Definition: PString.h:16
Attribute from xml.
Definition: PXml.h:30
const PString & getName() const
Get the variable p_name.
Definition: PXml.cpp:68
void setName(const PString &name)
Set the variable p_name, of type 'PString'.
Definition: PXml.cpp:54
const PString & getValue() const
Get the variable p_value.
Definition: PXml.cpp:82
virtual ~PXmlAttr()
Destructor of the class PXmlAttr.
Definition: PXml.cpp:38
PString p_value
Value of the attribute.
Definition: PXml.h:50
PXmlAttr & operator=(const PXmlAttr &other)
Equal operator of the class PXmlAttr.
Definition: PXml.cpp:46
void copyPXmlAttr(const PXmlAttr &other)
Copy function of the class PXmlAttr.
Definition: PXml.cpp:109
size_t p_flag
Flag of the PXmlAttr.
Definition: PXml.h:44
void initialisationPXmlAttr()
Initialisation function of the class PXmlAttr.
Definition: PXml.cpp:101
PXmlAttr()
Constructor of the class PXmlAttr.
Definition: PXml.cpp:25
void setValue(const PString &value)
Set the variable p_value, of type 'PString'.
Definition: PXml.cpp:61
PString p_name
Name of the attribute.
Definition: PXml.h:48
Class used to parse xml.
Definition: PXml.h:54
bool p_isText
Say if the balise contains text only.
Definition: PXml.h:90
bool getIsText() const
Get the variable p_isText.
Definition: PXml.cpp:236
void setVecChild(const std ::vector< PXml > &vecChild)
Set the variable p_vecChild, of type 'std ::vector<PXml>'.
Definition: PXml.cpp:187
void setVecAttr(const std ::vector< PXmlAttr > &vecAttr)
Set the variable p_vecAttr, of type 'std ::vector<PXmlAttr>'.
Definition: PXml.cpp:180
void setValue(const PString &value)
Set the variable p_value, of type 'PString'.
Definition: PXml.cpp:166
PString p_name
Name of the class.
Definition: PXml.h:84
const std ::vector< PXml > & getVecChild() const
Get the variable p_vecChild.
Definition: PXml.cpp:264
void setIsText(bool isText)
Set the variable p_isText, of type 'bool'.
Definition: PXml.cpp:173
void setIsCompact(bool isCompact)
Set the variable p_isCompact, of type 'bool'.
Definition: PXml.cpp:159
size_t p_flag
Flag of the PXml.
Definition: PXml.h:80
const PString & getValue() const
Get the variable p_value.
Definition: PXml.cpp:222
bool p_isCompact
Say if the balise is compact or not.
Definition: PXml.h:86
void copyPXml(const PXml &other)
Copy function of the class PXml.
Definition: PXml.cpp:295
std ::vector< PXmlAttr > p_vecAttr
Vector of attribute.
Definition: PXml.h:92
std ::vector< PXml > p_vecChild
Child of the current PXml.
Definition: PXml.h:94
PXml()
Constructor of the class PXml.
Definition: PXml.cpp:123
bool getIsCompact() const
Get the variable p_isCompact.
Definition: PXml.cpp:208
const std ::vector< PXmlAttr > & getVecAttr() const
Get the variable p_vecAttr.
Definition: PXml.cpp:250
virtual ~PXml()
Destructor of the class PXml.
Definition: PXml.cpp:136
PString p_value
Value between the chevron
Definition: PXml.h:88
void initialisationPXml()
Initialisation function of the class PXml.
Definition: PXml.cpp:283
PXml & operator=(const PXml &other)
Equal operator of the class PXml.
Definition: PXml.cpp:144
void setName(const PString &name)
Set the variable p_name, of type 'PString'.
Definition: PXml.cpp:152
const PString & getName() const
Get the variable p_name.
Definition: PXml.cpp:194