Dash Core  0.12.2.1
P2P Digital Currency
masternodeconfig.h
Go to the documentation of this file.
1 
2 // Copyright (c) 2014-2017 The Dash Core developers
3 // Distributed under the MIT/X11 software license, see the accompanying
4 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
5 
6 #ifndef SRC_MASTERNODECONFIG_H_
7 #define SRC_MASTERNODECONFIG_H_
8 
11 
13 {
14 
15 public:
16 
18 
19  private:
20  std::string alias;
21  std::string ip;
22  std::string privKey;
23  std::string txHash;
24  std::string outputIndex;
25  public:
26 
27  CMasternodeEntry(std::string alias, std::string ip, std::string privKey, std::string txHash, std::string outputIndex) {
28  this->alias = alias;
29  this->ip = ip;
30  this->privKey = privKey;
31  this->txHash = txHash;
32  this->outputIndex = outputIndex;
33  }
34 
35  const std::string& getAlias() const {
36  return alias;
37  }
38 
39  void setAlias(const std::string& alias) {
40  this->alias = alias;
41  }
42 
43  const std::string& getOutputIndex() const {
44  return outputIndex;
45  }
46 
47  void setOutputIndex(const std::string& outputIndex) {
48  this->outputIndex = outputIndex;
49  }
50 
51  const std::string& getPrivKey() const {
52  return privKey;
53  }
54 
55  void setPrivKey(const std::string& privKey) {
56  this->privKey = privKey;
57  }
58 
59  const std::string& getTxHash() const {
60  return txHash;
61  }
62 
63  void setTxHash(const std::string& txHash) {
64  this->txHash = txHash;
65  }
66 
67  const std::string& getIp() const {
68  return ip;
69  }
70 
71  void setIp(const std::string& ip) {
72  this->ip = ip;
73  }
74  };
75 
77  entries = std::vector<CMasternodeEntry>();
78  }
79 
80  void clear();
81  bool read(std::string& strErr);
82  void add(std::string alias, std::string ip, std::string privKey, std::string txHash, std::string outputIndex);
83 
84  std::vector<CMasternodeEntry>& getEntries() {
85  return entries;
86  }
87 
88  int getCount() {
89  return (int)entries.size();
90  }
91 
92 private:
93  std::vector<CMasternodeEntry> entries;
94 
95 
96 };
97 
98 
99 #endif /* SRC_MASTERNODECONFIG_H_ */
std::vector< CMasternodeEntry > & getEntries()
const std::string & getOutputIndex() const
void setTxHash(const std::string &txHash)
CMasternodeEntry(std::string alias, std::string ip, std::string privKey, std::string txHash, std::string outputIndex)
bool read(std::string &strErr)
const std::string & getTxHash() const
const std::string & getIp() const
std::vector< CMasternodeEntry > entries
void setAlias(const std::string &alias)
CMasternodeConfig masternodeConfig
void add(std::string alias, std::string ip, std::string privKey, std::string txHash, std::string outputIndex)
void setIp(const std::string &ip)
const std::string & getAlias() const
const std::string & getPrivKey() const
void setOutputIndex(const std::string &outputIndex)
void setPrivKey(const std::string &privKey)
FDELT_TYPE alias("__fdelt_warn")))