mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-20 02:55:50 +00:00
56 lines
1.0 KiB
C++
56 lines
1.0 KiB
C++
//------------------------------------------------------------------------------
|
|
/*
|
|
Copyright (c) 2011-2013, OpenCoin, Inc.
|
|
*/
|
|
//==============================================================================
|
|
|
|
#ifndef RIPPLE_OFFER_H
|
|
#define RIPPLE_OFFER_H
|
|
|
|
class Offer : public AccountItem
|
|
{
|
|
public:
|
|
Offer () {}
|
|
|
|
virtual ~Offer () {}
|
|
|
|
AccountItem::pointer makeItem (const uint160&, SerializedLedgerEntry::ref ledgerEntry);
|
|
|
|
LedgerEntryType getType ()
|
|
{
|
|
return (ltOFFER);
|
|
}
|
|
|
|
const STAmount& getTakerPays ()
|
|
{
|
|
return (mTakerPays);
|
|
}
|
|
const STAmount& getTakerGets ()
|
|
{
|
|
return (mTakerGets);
|
|
}
|
|
const RippleAddress& getAccount ()
|
|
{
|
|
return (mAccount);
|
|
}
|
|
int getSeq ()
|
|
{
|
|
return (mSeq);
|
|
}
|
|
Json::Value getJson (int);
|
|
|
|
private:
|
|
// For accounts in a ledger
|
|
explicit Offer (SerializedLedgerEntry::pointer ledgerEntry);
|
|
|
|
private:
|
|
RippleAddress mAccount;
|
|
STAmount mTakerGets;
|
|
STAmount mTakerPays;
|
|
int mSeq;
|
|
};
|
|
|
|
#endif
|
|
|
|
// vim:ts=4
|