trader  v0.1a
A framework to build trading applications
fybconfig.h
1 
2 #pragma once
3 
4 
5 namespace trader {
6 
7  class FybConfig : public Poco::RefCountedObject {
8  public:
9 
10  FybConfig();
11 
12  ~FybConfig();
13 
14  void readFile(const std::string& _fileName);
15 
16  void read(Poco::Dynamic::Var val);
17 
18  struct DataArray {
19 
20  void SetConsumer_key(std::string val)
21  {
22  consumer_key = val;
23  }
24 
25  bool isSetConsumer_key() {
26  return (consumer_key != "Empty");
27  }
28 
29  std::string consumer_key;
30 
31  void SetConsumer_secret(std::string val)
32  {
33  consumer_secret = val;
34  }
35 
36  bool isSetConsumer_secret() {
37  return (consumer_secret != "Empty");
38  }
39 
40  std::string consumer_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(bool val)
54  {
55  read = val;
56  readSet = true;
57  }
58 
59  bool isSetRead() {
60  return (readSet != false);
61  }
62 
63  bool read;
64  bool readSet;
65 
66  void SetTrade(bool val)
67  {
68  trade = val;
69  tradeSet = true;
70  }
71 
72  bool isSetTrade() {
73  return (tradeSet != false);
74  }
75 
76  bool trade;
77  bool tradeSet;
78 
79  void SetWithdraw(bool val)
80  {
81  withdraw = val;
82  withdrawSet = true;
83  }
84 
85  bool isSetWithdraw() {
86  return (withdrawSet != false);
87  }
88 
89  bool withdraw;
90  bool withdrawSet;
91 
92  DataArray()
93  : consumer_key("Empty")
94  , consumer_secret("Empty")
95  , name("Empty")
96  , read(false)
97  , readSet(false)
98  , trade(false)
99  , tradeSet(false)
100  , withdraw(false)
101  , withdrawSet(false)
102  {
103  }
104 
105  };
106 
107  typedef std::vector<DataArray> Data;
108  Data data;
109  }; //FybConfig
110 
111 } //trader
Definition: fybconfig.h:18
Definition: fybconfig.h:7
Definition: app.h:7