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 | |
---|
43 | public : void generate_file (void); |
---|
44 | public : void generate_file (string encoding); |
---|
45 | public : string get_body (void); |
---|
46 | public : string get_body (uint32_t depth); |
---|
47 | |
---|
48 | public : bool comment (string text); |
---|
49 | public : bool text (string text); |
---|
50 | |
---|
51 | private : string indent (uint32_t depth ); |
---|
52 | private : string indent (void); |
---|
53 | private : uint32_t depth (void); |
---|
54 | |
---|
55 | private : void header (string encoding); |
---|
56 | }; |
---|
57 | }; // end namespace behavioural |
---|
58 | }; // end namespace morpheo |
---|
59 | |
---|
60 | #endif |
---|