ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/REPOS_ERICCA/magic/lib/CAD4FE/src/CAD4FE_HtmlText.h
Revision: 27
Committed: Thu Jul 5 15:26:40 2007 UTC (17 years, 10 months ago) by foucault
Content type: text/plain
Original Path: magic/lib/CAD4FE/CAD4FE/src/CAD4FE_HtmlText.h
File size: 1193 byte(s)
Log Message:

File Contents

# User Rev Content
1 foucault 27 #ifndef CAD4FE_HtmlTextH
2     #define CAD4FE_HtmlTextH
3    
4     #include <string>
5     #include <vector>
6    
7     #include "CAD4FE_Common_platform.h"
8    
9     namespace CAD4FE {
10    
11     class CAD4FE_COMMON_ITEM HtmlText {
12     public:
13     virtual std::string GetHtml(){return "";}
14     operator std::string () {return GetHtml();}
15     };
16    
17     class CAD4FE_COMMON_ITEM HtmlText_Table : public HtmlText {
18     public:
19     HtmlText_Table(std::vector <std::string> & __head );
20     HtmlText_Table (std::vector <std::string> & __head, std::vector < std::vector <std::string> > & __rows);
21     void AddRow(std::vector<std::string> & __row );
22     void Close();
23     virtual std::string GetHtml();
24     protected:
25     std::string _nbCols;
26     std::vector <std::string> _head;
27     std::vector< std::vector < std::string> > _rows;
28     };
29    
30     class CAD4FE_COMMON_ITEM HtmlText_Page : public HtmlText {
31     public:
32     HtmlText_Page();
33     void operator << (const std::ostringstream & __os);
34     void Add(std::string __string);
35     void Close();
36     virtual std::string GetHtml();
37     void Show(std::string __filename);
38     void WriteFile(std::string __filename);
39     void Clear();
40     protected:
41     std::string _html;
42     };
43    
44     }
45    
46    
47     #endif