1 |
douglas |
370 |
// Represent |
2 |
|
|
// |
3 |
|
|
// Douglas Thrift |
4 |
|
|
// |
5 |
|
|
// $Id$ |
6 |
|
|
|
7 |
|
|
#ifndef _Represent_hpp_ |
8 |
|
|
#define _Represent_hpp_ |
9 |
|
|
|
10 |
|
|
#include <menes/platform.hpp> |
11 |
|
|
|
12 |
|
|
#ifdef MENES_PRAGMA_ONCE |
13 |
|
|
#pragma once |
14 |
|
|
#endif |
15 |
|
|
|
16 |
|
|
#include <menes-api/console.hpp> |
17 |
douglas |
384 |
#include <menes-api/environment.hpp> |
18 |
douglas |
370 |
#include <menes-ios/string.hpp> |
19 |
douglas |
379 |
#include <menes-xml/textwriter.hpp> |
20 |
douglas |
370 |
|
21 |
douglas |
379 |
#include <map> |
22 |
douglas |
373 |
|
23 |
douglas |
384 |
struct Environment |
24 |
|
|
{ |
25 |
|
|
ext::String get(const ext::String& name) { try { return api::TheEnvironment.Get(name); } catch (ext::Exception) { return ext::String(); } } |
26 |
|
|
}; |
27 |
|
|
|
28 |
|
|
extern Environment env; |
29 |
|
|
|
30 |
douglas |
370 |
class Represent |
31 |
|
|
{ |
32 |
|
|
private: |
33 |
douglas |
379 |
std::multimap<std::string, std::string> cgi; |
34 |
|
|
void parse(); |
35 |
douglas |
380 |
void headings(xml::TextWriter& xhtml); |
36 |
|
|
void form(xml::TextWriter& xhtml); |
37 |
douglas |
370 |
public: |
38 |
|
|
Represent(); |
39 |
|
|
}; |
40 |
|
|
|
41 |
|
|
#endif // _Represent_hpp_ |