mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Format first-party source according to .clang-format
This commit is contained in:
committed by
manojsdoshi
parent
65dfc5d19e
commit
50760c6935
@@ -27,56 +27,62 @@ namespace ripple {
|
||||
|
||||
class Invariants_test;
|
||||
|
||||
class STLedgerEntry final
|
||||
: public STObject
|
||||
, public CountedObject <STLedgerEntry>
|
||||
class STLedgerEntry final : public STObject, public CountedObject<STLedgerEntry>
|
||||
{
|
||||
friend Invariants_test; // this test wants access to the private type_
|
||||
friend Invariants_test; // this test wants access to the private type_
|
||||
|
||||
public:
|
||||
static char const* getCountedObjectName () { return "STLedgerEntry"; }
|
||||
static char const*
|
||||
getCountedObjectName()
|
||||
{
|
||||
return "STLedgerEntry";
|
||||
}
|
||||
|
||||
using pointer = std::shared_ptr<STLedgerEntry>;
|
||||
using ref = const std::shared_ptr<STLedgerEntry>&;
|
||||
using ref = const std::shared_ptr<STLedgerEntry>&;
|
||||
|
||||
/** Create an empty object with the given key and type. */
|
||||
explicit
|
||||
STLedgerEntry (Keylet const& k);
|
||||
explicit STLedgerEntry(Keylet const& k);
|
||||
|
||||
STLedgerEntry (LedgerEntryType type,
|
||||
uint256 const& key)
|
||||
STLedgerEntry(LedgerEntryType type, uint256 const& key)
|
||||
: STLedgerEntry(Keylet(type, key))
|
||||
{
|
||||
}
|
||||
|
||||
STLedgerEntry (SerialIter & sit, uint256 const& index);
|
||||
STLedgerEntry(SerialIter& sit, uint256 const& index);
|
||||
STLedgerEntry(SerialIter&& sit, uint256 const& index)
|
||||
: STLedgerEntry(sit, index) {}
|
||||
: STLedgerEntry(sit, index)
|
||||
{
|
||||
}
|
||||
|
||||
STLedgerEntry (STObject const& object, uint256 const& index);
|
||||
STLedgerEntry(STObject const& object, uint256 const& index);
|
||||
|
||||
STBase*
|
||||
copy (std::size_t n, void* buf) const override
|
||||
copy(std::size_t n, void* buf) const override
|
||||
{
|
||||
return emplace(n, buf, *this);
|
||||
}
|
||||
|
||||
STBase*
|
||||
move (std::size_t n, void* buf) override
|
||||
move(std::size_t n, void* buf) override
|
||||
{
|
||||
return emplace(n, buf, std::move(*this));
|
||||
}
|
||||
|
||||
SerializedTypeID getSType () const override
|
||||
SerializedTypeID
|
||||
getSType() const override
|
||||
{
|
||||
return STI_LEDGERENTRY;
|
||||
}
|
||||
|
||||
std::string getFullText () const override;
|
||||
std::string
|
||||
getFullText() const override;
|
||||
|
||||
std::string getText () const override;
|
||||
std::string
|
||||
getText() const override;
|
||||
|
||||
Json::Value getJson (JsonOptions options) const override;
|
||||
Json::Value
|
||||
getJson(JsonOptions options) const override;
|
||||
|
||||
/** Returns the 'key' (or 'index') of this item.
|
||||
The key identifies this entry's position in
|
||||
@@ -88,25 +94,29 @@ public:
|
||||
return key_;
|
||||
}
|
||||
|
||||
LedgerEntryType getType () const
|
||||
LedgerEntryType
|
||||
getType() const
|
||||
{
|
||||
return type_;
|
||||
}
|
||||
|
||||
// is this a ledger entry that can be threaded
|
||||
bool isThreadedType() const;
|
||||
bool
|
||||
isThreadedType() const;
|
||||
|
||||
bool thread (
|
||||
bool
|
||||
thread(
|
||||
uint256 const& txID,
|
||||
std::uint32_t ledgerSeq,
|
||||
uint256 & prevTxID,
|
||||
std::uint32_t & prevLedgerID);
|
||||
uint256& prevTxID,
|
||||
std::uint32_t& prevLedgerID);
|
||||
|
||||
private:
|
||||
/* Make STObject comply with the template for this SLE type
|
||||
Can throw
|
||||
*/
|
||||
void setSLEType ();
|
||||
void
|
||||
setSLEType();
|
||||
|
||||
private:
|
||||
uint256 key_;
|
||||
@@ -115,6 +125,6 @@ private:
|
||||
|
||||
using SLE = STLedgerEntry;
|
||||
|
||||
} // ripple
|
||||
} // namespace ripple
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user