libDwm-0.6.0
DwmXmlElement.hh
Go to the documentation of this file.
1 //===========================================================================
2 // @(#) $DwmPath: dwm/libDwm/tags/libDwm-0.6.0/include/DwmXmlElement.hh 8401 $
3 // @(#) $Id: DwmXmlElement.hh 8401 2016-04-17 06:44:31Z dwm $
4 //===========================================================================
5 // Copyright (c) Daniel W. McRobb 2008
6 // All rights reserved.
7 //===========================================================================
8 
9 //---------------------------------------------------------------------------
12 //---------------------------------------------------------------------------
13 
14 #ifndef _DWMXMLELEMENT_HH_
15 #define _DWMXMLELEMENT_HH_
16 
17 #include <iostream>
18 #include <map>
19 #include <string>
20 
21 #include "DwmXmlAttribute.hh"
22 
23 namespace Dwm {
24 
25  namespace Xml {
26 
27  //------------------------------------------------------------------------
29  //------------------------------------------------------------------------
30  class Element
31  {
32  public:
33  Element(const std::string & name, const std::string & value = "");
34  const std::string & Name() const;
35  const std::string & Value() const;
36  const std::string & Value(const std::string & value);
37  const std::map<std::string,Attribute> & Attributes() const;
38  const std::multimap<std::string,Element> & Children() const;
39 
40  bool AddAttribute(const Attribute & attribute);
41  bool RemoveAttribute(const std::string & attributeName);
42  bool AddElement(const Element & element);
43 
44  friend std::ostream & operator << (std::ostream & os,
45  const Element & element);
46 
47  protected:
48  std::string _name;
49  std::string _value;
50  std::map<std::string,Attribute> _attributes;
51  std::multimap<std::string,Element> _children;
52  };
53 
54 
55  } // namespace Xml
56 
57 } // namespace Dwm
58 
59 #endif // _DWMXMLELEMENT_HH_
NOT YET DOCUMENTED.
Definition: DwmBZ2IO.hh:67