PhoenixPresentation  2.0.0
Set of cmake function to automate presentation generation
PXml.h
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 #ifndef __PXML_H__
12 #define __PXML_H__
13 
14 #include <vector>
15 #include <stdio.h>
16 #include <stdlib.h>
17 #include <string.h>
18 #include <iostream>
19 #include "PPath.h"
20 
21 #define VERSION_PXMLATTR 0lu
22 #define VERSION_PXML 0lu
23 
24 
25 class PXmlAttr;
26 class PXml;
27 
28 
30 class PXmlAttr{
31  public:
32  PXmlAttr();
33  PXmlAttr(const PXmlAttr & other);
34  virtual ~PXmlAttr();
35  PXmlAttr & operator =(const PXmlAttr & other);
36  void setName(const PString & name);
37  void setValue(const PString & value);
38  const PString & getName() const;
39  PString & getName();
40  const PString & getValue() const;
41  PString & getValue();
42  private:
44  size_t p_flag;
46  void copyPXmlAttr(const PXmlAttr & other);
51 };
52 
54 class PXml{
55  public:
56  PXml();
57  PXml(const PXml & other);
58  virtual ~PXml();
59  PXml & operator =(const PXml & other);
60  void setName(const PString & name);
61  void setIsCompact(bool isCompact);
62  void setValue(const PString & value);
63  void setIsText(bool isText);
64  void setVecAttr(const std ::vector<PXmlAttr> & vecAttr);
65  void setVecChild(const std ::vector<PXml> & vecChild);
66  const PString & getName() const;
67  PString & getName();
68  bool getIsCompact() const;
69  bool & getIsCompact();
70  const PString & getValue() const;
71  PString & getValue();
72  bool getIsText() const;
73  bool & getIsText();
74  const std ::vector<PXmlAttr> & getVecAttr() const;
75  std ::vector<PXmlAttr> & getVecAttr();
76  const std ::vector<PXml> & getVecChild() const;
77  std ::vector<PXml> & getVecChild();
78  private:
80  size_t p_flag;
81  void initialisationPXml();
82  void copyPXml(const PXml & other);
90  bool p_isText;
92  std ::vector<PXmlAttr> p_vecAttr;
94  std ::vector<PXml> p_vecChild;
95 };
96 
97 
98 
99 
100 
101 #endif
102 
103 
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