Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
xml
BaseXML.cxx
Go to the documentation of this file.
1
12
// for truncation warning
13
#ifdef _MSC_VER
14
#include "msdevstudio/MSconfig.h"
15
#endif
16
17
#include "
BaseXML.h
"
18
19
#include "
XmlController.h
"
20
#include "
XmlDocument.h
"
21
#include "
XmlElement.h
"
22
23
#include <cassert>
24
25
using
std::string;
26
using
std::swap;
27
28
namespace
hippodraw {
29
30
BaseXML::
31
BaseXML
(
const
std::string & tagname,
XmlController
* controller )
32
: m_tagname ( tagname ),
33
m_type (
"type"
),
34
m_id (
"id"
),
35
m_controller ( controller )
36
{
37
}
38
39
BaseXML::~BaseXML
( )
40
{
41
}
42
43
XmlElement
*
BaseXML::createElement
( )
44
{
45
return
XmlController::m_xml_doc
->
createElement
(
m_tagname
);
46
}
47
48
const
string
&
BaseXML::tagName
()
const
49
{
50
return
m_tagname
;
51
}
52
53
const
XmlElement
*
BaseXML::getNode
(
const
XmlElement
* parent )
const
54
{
55
return
parent->
getNode
(
m_tagname
);
56
}
57
58
void
BaseXML::fillNodeList
(
const
XmlElement
* element,
59
std::list < XmlElement * > & nodelist )
60
{
61
element->
fillNodeList
(
m_tagname
, nodelist );
62
}
63
64
void
BaseXML::setId
(
XmlElement
& tag,
int
id
)
65
{
66
tag.
setAttribute
(
m_id
,
id
);
67
}
68
69
}
// namespace hippodraw
70
Generated for HippoDraw Class Library by