3#include <xrpl/basics/Slice.h>
4#include <xrpl/beast/utility/instrumentation.h>
89 p_ = std::move(other.p_);
112 "xrpl::Buffer::operator=(Slice) : input not a subset");
234 if (lhs.size() != rhs.size())
240 return std::memcmp(lhs.data(), rhs.data(), lhs.size()) == 0;
Like std::vector<char> but better.
const_iterator end() const noexcept
Buffer(std::size_t size)
Create an uninitialized buffer with the given size.
std::uint8_t const * const_iterator
std::unique_ptr< std::uint8_t[]> p_
bool empty() const noexcept
Buffer(Slice s)
Construct from a slice.
void * operator()(std::size_t n)
Buffer & operator=(Buffer &&other) noexcept
Move-assign.
const_iterator cend() const noexcept
const_iterator cbegin() const noexcept
const_iterator begin() const noexcept
std::uint8_t * data() noexcept
Buffer & operator=(Slice s)
Assign from slice.
std::uint8_t * alloc(std::size_t n)
Reallocate the storage.
std::size_t size() const noexcept
Returns the number of bytes in the buffer.
std::uint8_t const * data() const noexcept
Return a pointer to beginning of the storage.
void clear() noexcept
Reset the buffer.
Buffer(Buffer &&other) noexcept
Move-construct.
Buffer(void const *data, std::size_t size)
Create a buffer as a copy of existing memory.
Buffer(Buffer const &other)
Copy-construct.
Buffer & operator=(Buffer const &other)
Copy assign.
void fill(std::uint8_t value) noexcept
Set every byte in the buffer to the given value.
An immutable linear range of bytes.
bool empty() const noexcept
Return true if the byte range is empty.
std::uint8_t const * data() const noexcept
Return a pointer to beginning of the storage.
std::size_t size() const noexcept
Returns the number of bytes in the storage.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
constexpr bool operator==(BaseUInt< Bits, Tag > const &lhs, BaseUInt< Bits, Tag > const &rhs)
T get(Section const §ion, std::string const &name, T const &defaultValue=T{})
Retrieve a key/value pair from a section.
Dir::ConstIterator const_iterator