MAGiC  V5.0
Mailleurs Automatiques de Géometries intégrés à la Cao
CAD4FE_HtmlText.h
Aller à la documentation de ce fichier.
1 //####//------------------------------------------------------------
2 //####//------------------------------------------------------------
3 //####// MAGiC
4 //####// Jean Christophe Cuilliere et Vincent FRANCOIS
5 //####// Departement de Genie Mecanique - UQTR
6 //####//------------------------------------------------------------
7 //####// MAGIC est un projet de recherche de l equipe ERICCA
8 //####// du departement de genie mecanique de l Universite du Quebec a Trois Rivieres
9 //####// http://www.uqtr.ca/ericca
10 //####// http://www.uqtr.ca/
11 //####//------------------------------------------------------------
12 //####//------------------------------------------------------------
13 //####//
14 //####// CAD4FE_HtmlText.h
15 //####//
16 //####//------------------------------------------------------------
17 //####//------------------------------------------------------------
18 //####// COPYRIGHT 2000-2024
19 //####// jeu 13 jun 2024 11:58:56 EDT
20 //####//------------------------------------------------------------
21 //####//------------------------------------------------------------
22 #ifndef CAD4FE_HtmlTextH
23 #define CAD4FE_HtmlTextH
24 
25 #include <string>
26 #include <vector>
27 
28 #include "CAD4FE_Common_platform.h"
29 
30 namespace CAD4FE {
31 
32 class HtmlText {
33 public:
34  virtual std::string GetHtml(){return "";}
35  operator std::string () {return GetHtml();}
36 };
37 
38 class HtmlText_Table : public HtmlText {
39 public:
40  HtmlText_Table(std::vector <std::string> & __head );
41  HtmlText_Table (std::vector <std::string> & __head, std::vector < std::vector <std::string> > & __rows);
42  void AddRow(std::vector<std::string> & __row );
43  void Close();
44  virtual std::string GetHtml();
45 protected:
46  std::string _nbCols;
47  std::vector <std::string> _head;
48  std::vector< std::vector < std::string> > _rows;
49 };
50 
51 class HtmlText_Page : public HtmlText {
52 public:
53  HtmlText_Page();
54  void operator << (const std::ostringstream & __os);
55  void Add(std::string __string);
56  void Close();
57  virtual std::string GetHtml();
58  void Show(std::string __filename);
59  void WriteFile(std::string __filename);
60  void Clear();
61 protected:
62  std::string _html;
63 };
64 
65 }
66 
67 
68 #endif
CAD4FE_Common_platform.h
CAD4FE::HtmlText_Page
Definition: CAD4FE_HtmlText.h:51
CAD4FE::HtmlText_Page::WriteFile
void WriteFile(std::string __filename)
Definition: CAD4FE_HtmlText.cpp:113
CAD4FE::HtmlText_Table::HtmlText_Table
HtmlText_Table(std::vector< std::string > &__head)
Definition: CAD4FE_HtmlText.cpp:43
CAD4FE::HtmlText_Table::GetHtml
virtual std::string GetHtml()
Definition: CAD4FE_HtmlText.cpp:59
CAD4FE::HtmlText_Table::_rows
std::vector< std::vector< std::string > > _rows
Definition: CAD4FE_HtmlText.h:48
CAD4FE::HtmlText_Page::operator<<
void operator<<(const std::ostringstream &__os)
Definition: CAD4FE_HtmlText.cpp:88
CAD4FE::HtmlText_Page::_html
std::string _html
Definition: CAD4FE_HtmlText.h:62
CAD4FE::HtmlText_Table::Close
void Close()
CAD4FE::HtmlText::GetHtml
virtual std::string GetHtml()
Definition: CAD4FE_HtmlText.h:34
CAD4FE::HtmlText_Page::Clear
void Clear()
Definition: CAD4FE_HtmlText.cpp:122
CAD4FE::HtmlText_Page::Close
void Close()
Definition: CAD4FE_HtmlText.cpp:93
CAD4FE::HtmlText
Definition: CAD4FE_HtmlText.h:32
CAD4FE::HtmlText_Page::Show
void Show(std::string __filename)
Definition: CAD4FE_HtmlText.cpp:103
CAD4FE::HtmlText_Table
Definition: CAD4FE_HtmlText.h:38
CAD4FE::HtmlText_Table::_head
std::vector< std::string > _head
Definition: CAD4FE_HtmlText.h:47
CAD4FE
Definition: CAD4FE_ClosestPoint_Segment_MG_ARETE.h:34
CAD4FE::HtmlText_Page::GetHtml
virtual std::string GetHtml()
Definition: CAD4FE_HtmlText.cpp:97
CAD4FE::HtmlText_Page::HtmlText_Page
HtmlText_Page()
Definition: CAD4FE_HtmlText.cpp:79
CAD4FE::HtmlText_Page::Add
void Add(std::string __string)
Definition: CAD4FE_HtmlText.cpp:83
CAD4FE::HtmlText_Table::AddRow
void AddRow(std::vector< std::string > &__row)
Definition: CAD4FE_HtmlText.cpp:54
CAD4FE::HtmlText_Table::_nbCols
std::string _nbCols
Definition: CAD4FE_HtmlText.h:46