trader  v0.1a
A framework to build trading applications
endpoint.h
1 #pragma once
2 
3 #include "fileoutputstream.h"
4 
5 namespace trader
6 {
7 
8  using Poco::DirectoryIterator;
9  using Poco::File;
10  using Poco::Path;
11  using Poco::Util::AbstractConfiguration;
12  using Poco::Util::Application;
13  using Poco::Util::HelpFormatter;
14  using Poco::Util::Option;
15  using Poco::Util::OptionCallback;
16  using Poco::Util::OptionSet;
17  using namespace Poco::JSON;
18  using namespace Poco;
19  using namespace std;
20 
21  struct Config;
22 
23  struct EndPoint
24  {
25  enum Method
26  {
27  POST,
28  GET
29  };
30 
31  EndPoint(Config &config)
32  : _config(config)
33  {
34  }
35 
36  void read(JSON::Object::Ptr obj);
37  void writeHeader(ApiFileOutputStream &header);
38  void writeResponseSchema(ApiFileOutputStream &cpp, UInt32 idx);
39  void writeCpp(ApiFileOutputStream &cpp);
40 
41  string url;
42  Method method;
43  string description;
44  string name;
45  vector< string > responseSchemaNames;
46  string inputSchemaName;
47  Config &_config;
48  };
49 } // namespace trader
Definition: fileoutputstream.h:61
Definition: fileoutputstream.h:3
Definition: config.h:10
Definition: endpoint.h:23
Definition: app.h:7