libexpatpp 0.1.8
generator.hpp
Go to the documentation of this file.
1
6#ifndef xmlpp_generator_hpp
7#define xmlpp_generator_hpp
8
9#include <string>
10#include <list>
11#include <memory>
12#include <iostream>
13
14namespace xmlpp {
16namespace generator {
17struct attribute {
18 std::string name; //< name/ key of attribute
19 std::string value; //< value of attribute
20};
21
22struct node {
23 virtual void serialize(std::ostream& os) = 0;
24};
25
26struct element: public node {
27 std::list<attribute> attributes;
28 std::string name;
29protected:
30 void serialize(std::ostream& os) override;
31};
32
33struct composite_element: public element {
34 std::list<std::shared_ptr<node>> children;
35protected:
36 void serialize(std::ostream& os) override;
37};
38
39struct text: public node {
40 std::string value;
41protected:
42 void serialize(std::ostream& os) override;
43};
44} // end namespace generator
45} // end: namespace xmlpp
46#endif // #ifndef xmlpp_generator_hpp
Definition generator.hpp:17
Definition generator.hpp:33
Definition generator.hpp:26
Definition generator.hpp:22
Definition generator.hpp:39