trader  v0.1a
A framework to build trading applications
bittrexconfig.h
1 
2 #pragma once
3 
4 
5 namespace trader {
6 
7  class BittrexConfig : public Poco::RefCountedObject {
8  public:
9 
10  BittrexConfig();
11 
12  ~BittrexConfig();
13 
14  void readFile(const std::string& _fileName);
15 
16  void read(Poco::Dynamic::Var val);
17 
18  struct DataArray {
19 
20  void SetApi_key(std::string val)
21  {
22  api_key = val;
23  }
24 
25  bool isSetApi_key() {
26  return (api_key != "Empty");
27  }
28 
29  std::string api_key;
30 
31  void SetApi_secret(std::string val)
32  {
33  api_secret = val;
34  }
35 
36  bool isSetApi_secret() {
37  return (api_secret != "Empty");
38  }
39 
40  std::string api_secret;
41 
42  void SetName(std::string val)
43  {
44  name = val;
45  }
46 
47  bool isSetName() {
48  return (name != "Empty");
49  }
50 
51  std::string name;
52 
53  void SetRead_info(bool val)
54  {
55  read_info = val;
56  read_infoSet = true;
57  }
58 
59  bool isSetRead_info() {
60  return (read_infoSet != false);
61  }
62 
63  bool read_info;
64  bool read_infoSet;
65 
66  void SetRequests_per_minute(Poco::Int32 val)
67  {
68  requests_per_minute = val;
69  }
70 
71  bool isSetRequests_per_minute() {
72  return (requests_per_minute != std::numeric_limits<Poco::Int32>::max());
73  }
74 
75  Poco::Int32 requests_per_minute;
76 
77  void SetTrade_limit(bool val)
78  {
79  trade_limit = val;
80  trade_limitSet = true;
81  }
82 
83  bool isSetTrade_limit() {
84  return (trade_limitSet != false);
85  }
86 
87  bool trade_limit;
88  bool trade_limitSet;
89 
90  void SetTrade_market(bool val)
91  {
92  trade_market = val;
93  trade_marketSet = true;
94  }
95 
96  bool isSetTrade_market() {
97  return (trade_marketSet != false);
98  }
99 
100  bool trade_market;
101  bool trade_marketSet;
102 
103  void SetWithdraw(bool val)
104  {
105  withdraw = val;
106  withdrawSet = true;
107  }
108 
109  bool isSetWithdraw() {
110  return (withdrawSet != false);
111  }
112 
113  bool withdraw;
114  bool withdrawSet;
115 
116  DataArray()
117  : api_key("Empty")
118  , api_secret("Empty")
119  , name("Empty")
120  , read_info(false)
121  , read_infoSet(false)
122  , requests_per_minute(std::numeric_limits<Poco::Int32>::max())
123  , trade_limit(false)
124  , trade_limitSet(false)
125  , trade_market(false)
126  , trade_marketSet(false)
127  , withdraw(false)
128  , withdrawSet(false)
129  {
130  }
131 
132  };
133 
134  typedef std::vector<DataArray> Data;
135  Data data;
136  }; //BittrexConfig
137 
138 } //trader
Definition: bittrexconfig.h:18
Definition: bittrexconfig.h:7
Definition: app.h:7