source: trunk/IPs/systemC/processor/Morpheo/Behavioural/include/XML.h @ 2

Last change on this file since 2 was 2, checked in by kane, 17 years ago

Import Morpheo

File size: 2.1 KB
Line 
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
17using namespace std;
18
19namespace morpheo     {
20namespace behavioural {
21
22  // Virtual Class - Interface of each component
23  class XML
24  {
25    typedef enum {_none     ,
26                  _balise   ,
27                  _singleton,
28                  _comment  } balise_t;
29   
30    // -----[ fields ]----------------------------------------------------
31  private  : const string     _filename        ;
32  private  : string           _body            ;
33  private  : list<string>     _list_balise_name;
34   
35    // -----[ methods ]---------------------------------------------------
36  public   :                  XML                 (string filename);
37  public   :                  XML                 (string filename, string encoding);
38  public   :                  ~XML                (void);
39       
40  public   : bool             balise_open         (string name); // no attribut
41  public   : bool             balise_open_begin   (string name);
42  public   : bool             balise_open_end     (void);     
43  public   : bool             balise_close        (void);     
44  public   : bool             singleton           (string name); // no attribut
45  public   : bool             singleton_begin     (string name);
46  public   : bool             singleton_end       (void);
47  public   : bool             attribut            (string name, string value);
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  public   : void             generate_file       (void);
59  public   : string           get_body            (void);
60  };
61}; // end namespace behavioural         
62}; // end namespace morpheo             
63
64#endif
Note: See TracBrowser for help on using the repository browser.