rippled
Loading...
Searching...
No Matches
NodeObject.cpp
1#include <xrpl/nodestore/NodeObject.h>
2
3#include <memory>
4
5namespace xrpl {
6
7//------------------------------------------------------------------------------
8
10 : mType(type), mHash(hash), mData(std::move(data))
11{
12}
13
16{
17 return std::make_shared<NodeObject>(type, std::move(data), hash, PrivateAccess());
18}
19
22{
23 return mType;
24}
25
26uint256 const&
28{
29 return mHash;
30}
31
32Blob const&
34{
35 return mData;
36}
37
38} // namespace xrpl
Blob const mData
Definition NodeObject.h:76
NodeObject(NodeObjectType type, Blob &&data, uint256 const &hash, PrivateAccess)
Definition NodeObject.cpp:9
NodeObjectType getType() const
Returns the type of this object.
static std::shared_ptr< NodeObject > createObject(NodeObjectType type, Blob &&data, uint256 const &hash)
Create an object from fields.
uint256 const mHash
Definition NodeObject.h:75
NodeObjectType const mType
Definition NodeObject.h:74
uint256 const & getHash() const
Returns the hash of the data.
Blob const & getData() const
Returns the underlying data.
T is_same_v
STL namespace.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:5
NodeObjectType
The types of node objects.
Definition NodeObject.h:12