From f87d1bfcb760ee92ad0a71d150ee7f1deab0d830 Mon Sep 17 00:00:00 2001 From: JoelKatz Date: Sun, 8 Jan 2012 21:38:24 -0800 Subject: [PATCH] A class to track a local transaction through its life cycle. --- LocalTransaction.h | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 LocalTransaction.h diff --git a/LocalTransaction.h b/LocalTransaction.h new file mode 100644 index 000000000..853c00d22 --- /dev/null +++ b/LocalTransaction.h @@ -0,0 +1,43 @@ +#ifndef __LOCALTRANSACTION__ +#define __LOCALTRANSACTION__ + +// A structure to represent a local transaction + +#include + +#include + +#include "uint256.h" +#include "Transaction.h" + +class LocalTransaction +{ +public: + typedef boost::shared_ptr pointer; + +protected: + + // core specifications + uint160 mDestAcctID; + uint64 mAmount; + uint32 mTag; + std::string mComment; + + Transaction::pointer mTransaction; + +public: + + LocalTransaction(const uint160 &dest, uint64 amount, uint32 tag) : + mDestAcctID(dest), mAmount(amount), mTag(tag) { ; } + void setComment(const std::string& comment) { mComment=comment; } + + const uint160& getDestinationAccount() const { return mDestAcctID; } + uint64 getAmount() const { return mAmount; } + uint32 getTag() const { return mTag; } + const std::string& getComment() const { return mComment; } + Transaction::pointer getTransaction() { return mTransaction; } + + bool makeTransaction(void); +}; + +#endif