mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Moved cpp code to src/cpp and js code to src/js.
This commit is contained in:
57
src/cpp/ripple/TransactionMeta.h
Normal file
57
src/cpp/ripple/TransactionMeta.h
Normal file
@@ -0,0 +1,57 @@
|
||||
#ifndef __TRANSACTIONMETA__
|
||||
#define __TRANSACTIONMETA__
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include <boost/ptr_container/ptr_vector.hpp>
|
||||
|
||||
#include "../json/value.h"
|
||||
|
||||
#include "uint256.h"
|
||||
#include "Serializer.h"
|
||||
#include "SerializedTypes.h"
|
||||
#include "SerializedObject.h"
|
||||
#include "TransactionErr.h"
|
||||
|
||||
class TransactionMetaSet
|
||||
{
|
||||
public:
|
||||
typedef boost::shared_ptr<TransactionMetaSet> pointer;
|
||||
|
||||
protected:
|
||||
uint256 mTransactionID;
|
||||
uint32 mLedger;
|
||||
int mResult;
|
||||
|
||||
STArray mNodes;
|
||||
|
||||
public:
|
||||
TransactionMetaSet() : mLedger(0), mResult(255) { ; }
|
||||
TransactionMetaSet(const uint256& txID, uint32 ledger) : mTransactionID(txID), mLedger(ledger), mResult(255) { ; }
|
||||
TransactionMetaSet(const uint256& txID, uint32 ledger, const std::vector<unsigned char>&);
|
||||
|
||||
void init(const uint256& transactionID, uint32 ledger);
|
||||
void clear() { mNodes.clear(); }
|
||||
void swap(TransactionMetaSet&);
|
||||
|
||||
const uint256& getTxID() { return mTransactionID; }
|
||||
uint32 getLgrSeq() { return mLedger; }
|
||||
|
||||
bool isNodeAffected(const uint256&) const;
|
||||
void setAffectedNode(const uint256&, SField::ref type);
|
||||
STObject& getAffectedNode(const uint256&, SField::ref type);
|
||||
STObject& getAffectedNode(const uint256&);
|
||||
const STObject& peekAffectedNode(const uint256&) const;
|
||||
|
||||
Json::Value getJson(int p) const { return getAsObject().getJson(p); }
|
||||
void addRaw(Serializer&, TER);
|
||||
|
||||
STObject getAsObject() const;
|
||||
|
||||
static bool thread(STObject& node, const uint256& prevTxID, uint32 prevLgrID);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
// vim:ts=4
|
||||
Reference in New Issue
Block a user