EPICS ARCHIVER V4
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups
HTMLPage.h
1 // --------------------------------------------------------
2 // $Id: HTMLPage.h,v 1.10 2006/07/13 14:11:13 kasemir Exp $
3 //
4 // Please refer to NOTICE.txt,
5 // included as part of this distribution,
6 // for legal information.
7 //
8 // Kay-Uwe Kasemir, kasemir@lanl.gov
9 // --------------------------------------------------------
10 
11 #ifndef __HTMLPAGE_H__
12 #define __HTMLPAGE_H__
13 
14 #include <cstring>
15 
16 // Tools
17 #include "tools/ToolsConfig.h"
18 
19 #ifdef solaris
20 // Hack around clash of struct map in inet headers with std::map
21 #define map xxxMapxxx
22 #endif
23 #include <osiSock.h>
24 #ifdef solaris
25 #undef map
26 #endif
27 
31 class HTMLPage
32 {
33 public:
38  HTMLPage (SOCKET socket, const char *title, int refresh=0);
39 
40  virtual ~HTMLPage ();
41 
43  void line (const char *line);
44 
46  void line (const stdString &line);
47 
49  void out (const char *line);
50 
52  void out (const char *line, size_t length);
53 
55  void out (const stdString &line);
56 
63  void openTable (int colspan, const char *column, ...);
64 
72  void tableLine (const char *item, ...);
73 
75  void closeTable ();
76 
78  static bool with_config;
79 protected:
80  SOCKET socket;
81  int refresh;
82 };
83 
84 #endif //__HTMLPAGE_H__
void out(const char *line)
Add verbatim output.
Helper for printing a web page to a socket.
Definition: HTMLPage.h:31
HTMLPage(SOCKET socket, const char *title, int refresh=0)
Create web page for socket with given title.
void tableLine(const char *item,...)
Add line to table.
static bool with_config
Should bottom menu include a &#39;config&#39; link?
Definition: HTMLPage.h:78
void closeTable()
End a table.
void openTable(int colspan, const char *column,...)
Start a table with column headers.
void line(const char *line)
Add a line.