9 |
|
#include "InputType.hpp" |
10 |
|
|
11 |
|
#ifdef _WIN32 |
12 |
< |
#pragma warning(disable:4267) |
12 |
> |
#pragma warning(disable:4267 4288) |
13 |
|
#endif |
14 |
|
|
15 |
|
#include <menes-app/simple.hpp> |
17 |
|
#include <menes-xml/nodeset.hpp> |
18 |
|
#include <menes-xml/parse.hpp> |
19 |
|
|
20 |
+ |
struct Environment |
21 |
+ |
{ |
22 |
+ |
ext::String get(const ext::String& name) { try { return api::TheEnvironment.Get(name); } catch (ext::Exception) { return ext::String(); } } |
23 |
+ |
} env; |
24 |
+ |
|
25 |
+ |
struct Item |
26 |
+ |
{ |
27 |
+ |
DataType type; |
28 |
+ |
ext::String data; |
29 |
+ |
InputType input; |
30 |
+ |
Item(const DataType& type, const ext::String& data, const InputType& input_) : type(type), data(data), input(input_) {} |
31 |
+ |
}; |
32 |
+ |
|
33 |
|
int Main(const app::Options& options) |
34 |
|
{ |
35 |
|
Represent represent; |
62 |
|
api::Cout << after << ios::Flush; |
63 |
|
} |
64 |
|
|
52 |
– |
struct Represent::Item |
53 |
– |
{ |
54 |
– |
DataType type; |
55 |
– |
ext::String data; |
56 |
– |
InputType input; |
57 |
– |
Item(const DataType& type, const ext::String& data, const InputType& input) : type(type), data(data), input(input) {} |
58 |
– |
}; |
59 |
– |
|
65 |
|
void Represent::parse() |
66 |
|
{ |
67 |
|
ext::String query(env.get("QUERY_STRING")); |