compiling; ready to impl MoneroTransfer copy()

This commit is contained in:
woodser
2019-07-28 16:12:05 -04:00
parent 7d33ba450b
commit 14dbe5d9de
4 changed files with 48 additions and 9 deletions
+7 -3
View File
@@ -183,9 +183,9 @@ namespace monero {
throw runtime_error("MoneroTx deep copy constructor not implemented");
}
// shared_ptr<MoneroTx> MoneroTx::copy() const {
// return MoneroTx(this);
// }
shared_ptr<MoneroTx> MoneroTx::copy() const {
return make_shared<MoneroTx>();
}
boost::property_tree::ptree MoneroTx::toPropertyTree() const {
boost::property_tree::ptree node;
@@ -386,6 +386,10 @@ namespace monero {
throw runtime_error("MoneroOutput deep copy not implemented");
}
shared_ptr<MoneroOutput> MoneroOutput::copy() const {
return make_shared<MoneroOutput>();
}
boost::property_tree::ptree MoneroOutput::toPropertyTree() const {
boost::property_tree::ptree node;
if (keyImage != boost::none) node.add_child("keyImage", (*keyImage)->toPropertyTree());
+2 -1
View File
@@ -194,7 +194,7 @@ namespace monero {
MoneroTx(); // default constructor
MoneroTx(const MoneroTx& tx); // deep copy constructor
//shared_ptr<MoneroTx> MoneroTx::copy() const;
shared_ptr<MoneroTx> copy() const;
boost::property_tree::ptree toPropertyTree() const;
virtual void merge(const shared_ptr<MoneroTx>& self, const shared_ptr<MoneroTx>& other);
boost::optional<uint64_t> getHeight() const;
@@ -224,6 +224,7 @@ namespace monero {
MoneroOutput();
MoneroOutput(const MoneroOutput& output); // deep copy constructor
shared_ptr<MoneroOutput> copy() const;
boost::property_tree::ptree toPropertyTree() const;
virtual void merge(const shared_ptr<MoneroOutput>& self, const shared_ptr<MoneroOutput>& other);
};