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