trader  v0.1a
A framework to build trading applications
cryptowatch.h
1 // <copyright file="cryptowatch.h" company="FinSec Systems">
3 // Copyright (c) 2018 finsec.systems. All rights reserved.
4 // </copyright>
5 // <author>Viknash</author>
6 // <date>12/5/2018</date>
7 // <summary>Declares Cryptowatch class</summary>
9 
10 #pragma once
11 
12 #include "api.h"
13 #include "cryptowatchapi.h"
14 #include "cryptowatchdatabase.h"
15 #include "db.h"
16 #include "interface.h"
17 
18 namespace trader
19 {
20 
21  namespace CryptowatchApi
22  {
23  class EndPoints;
24  };
25 
26  namespace CryptowatchDatabase
27  {
28  class Tables;
29  };
30 
31  class Cryptowatch;
32 
34  class CryptowatchConnection : public Interface::CallConnection, public Poco::Runnable
35  {
36  public:
43  CryptowatchConnection(const std::string &connectionid, Cryptowatch *_exchange)
44  : exchange(_exchange)
45  {
46  (void)connectionid;
47  }
48 
50  void run() {}
51 
52  private:
53  Cryptowatch *exchange;
54  };
55 
57  class Cryptowatch : public Api
58  {
59  public:
61  Cryptowatch();
62 
64  ~Cryptowatch();
65 
74  Poco::Dynamic::Var invoke(const std::string &httpMethod, Poco::URI &uri);
75 
83  static AutoPtr< Interface::Connection > getConnection(const std::string &connectionId);
84 
86 
87  Poco::AutoPtr< CryptowatchDatabase::Tables > dataBase;
88 
89  protected:
95  Cryptowatch(const Cryptowatch &);
96 
104  Cryptowatch &operator=(const Cryptowatch &);
105  };
106 
107 } // namespace trader
CryptowatchApi::EndPoints api
The API.
Definition: cryptowatch.h:85
Poco::AutoPtr< CryptowatchDatabase::Tables > dataBase
The data base.
Definition: cryptowatch.h:87
A cryptowatch.
Definition: cryptowatch.h:57
void run()
Runs this object.
Definition: cryptowatch.h:50
Definition: cryptowatchapi.h:196
CryptowatchConnection(const std::string &connectionid, Cryptowatch *_exchange)
Initializes a new instance of the CryptowatchConnection class.
Definition: cryptowatch.h:43
Definition: api.h:15
A cryptowatch connection.
Definition: cryptowatch.h:34
Definition: app.h:7
Definition: interface.h:18267