1 | #ifndef morpheo_behavioural_XML_h |
---|
2 | #define morpheo_behavioural_XML_h |
---|
3 | |
---|
4 | /* |
---|
5 | * $Id$ |
---|
6 | * |
---|
7 | * [ Description ] |
---|
8 | * |
---|
9 | */ |
---|
10 | |
---|
11 | #include <stdint.h> |
---|
12 | #include <iostream> |
---|
13 | #include <math.h> |
---|
14 | #include <list> |
---|
15 | #include "Include/ToString.h" |
---|
16 | |
---|
17 | using namespace std; |
---|
18 | |
---|
19 | namespace morpheo { |
---|
20 | namespace behavioural { |
---|
21 | |
---|
22 | // Virtual Class - Interface of each component |
---|
23 | class XML |
---|
24 | { |
---|
25 | // -----[ fields ]---------------------------------------------------- |
---|
26 | private : const string _name ; |
---|
27 | private : string _body ; |
---|
28 | private : list<string> _list_balise_name; |
---|
29 | |
---|
30 | // -----[ methods ]--------------------------------------------------- |
---|
31 | public : XML (string name); |
---|
32 | public : ~XML (void); |
---|
33 | |
---|
34 | public : bool balise_open (string name); // no attribut |
---|
35 | public : bool balise_open_begin (string name); |
---|
36 | public : bool balise_open_end (void); |
---|
37 | public : bool balise_close (void); |
---|
38 | public : bool singleton (string name); // no attribut |
---|
39 | public : bool singleton_begin (string name); |
---|
40 | public : bool singleton_end (void); |
---|
41 | public : bool attribut (string name, string value); |
---|
42 | public : bool insert_XML (XML xml ); |
---|
43 | |
---|
44 | public : void generate_file (void); |
---|
45 | public : void generate_file (string encoding); |
---|
46 | public : string get_body (void); |
---|
47 | public : string get_body (uint32_t depth); |
---|
48 | |
---|
49 | public : bool comment (string text); |
---|
50 | public : bool text (string text); |
---|
51 | |
---|
52 | private : string indent (uint32_t depth ); |
---|
53 | private : string indent (void); |
---|
54 | private : uint32_t depth (void); |
---|
55 | |
---|
56 | private : void header (string encoding); |
---|
57 | }; |
---|
58 | }; // end namespace behavioural |
---|
59 | }; // end namespace morpheo |
---|
60 | |
---|
61 | #endif |
---|