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 
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 
40 {
41 }
42 
44 {
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 doxygen