Autonomy Software C++ 24.5.1
Welcome to the Autonomy Software repository of the Mars Rover Design Team (MRDT) at Missouri University of Science and Technology (Missouri S&T)! API reference contains the source code and other resources for the development of the autonomy software for our Mars rover. The Autonomy Software project aims to compete in the University Rover Challenge (URC) by demonstrating advanced autonomous capabilities and robust navigation algorithms.
Loading...
Searching...
No Matches
duckdb::BufferHandle Class Reference
Collaboration diagram for duckdb::BufferHandle:

Public Member Functions

DUCKDB_API BufferHandle (shared_ptr< BlockHandle > handle, optional_ptr< FileBuffer > node)
 BufferHandle (const BufferHandle &other)=delete
BufferHandle & operator= (const BufferHandle &)=delete
DUCKDB_API BufferHandle (BufferHandle &&other) noexcept
 enable move constructors
DUCKDB_API BufferHandle & operator= (BufferHandle &&) noexcept
DUCKDB_API bool IsValid () const
 Returns whether or not the BufferHandle is valid.
data_ptr_t Ptr () const
 Returns a pointer to the buffer data. Handle must be valid.
data_ptr_t Ptr ()
 Returns a pointer to the buffer data. Handle must be valid.
DUCKDB_API FileBuffer & GetFileBuffer ()
 Gets the underlying file buffer. Handle must be valid.
DUCKDB_API void Destroy ()
 Destroys the buffer handle.
const shared_ptr< BlockHandle > & GetBlockHandle () const

Private Attributes

shared_ptr< BlockHandle > handle
 The block handle.
optional_ptr< FileBuffer > node
 The managed buffer node.

Constructor & Destructor Documentation

◆ BufferHandle() [1/3]

duckdb::BufferHandle::BufferHandle ( )
387174 : handle(nullptr), node(nullptr) {
387175}
shared_ptr< BlockHandle > handle
The block handle.
Definition duckdb.hpp:9947
optional_ptr< FileBuffer > node
The managed buffer node.
Definition duckdb.hpp:9949

◆ BufferHandle() [2/3]

duckdb::BufferHandle::BufferHandle ( shared_ptr< BlockHandle > handle,
optional_ptr< FileBuffer > node )
explicit
387178 : handle(std::move(handle_p)), node(node_p) {
387179}

◆ ~BufferHandle()

duckdb::BufferHandle::~BufferHandle ( )
387192 {
387193 Destroy();
387194}
DUCKDB_API void Destroy()
Destroys the buffer handle.
Definition duckdb.cpp:387200

◆ BufferHandle() [3/3]

duckdb::BufferHandle::BufferHandle ( BufferHandle && other)
noexcept

enable move constructors

387181 : node(nullptr) {
387182 std::swap(node, other.node);
387183 std::swap(handle, other.handle);
387184}

Member Function Documentation

◆ operator=()

BufferHandle & duckdb::BufferHandle::operator= ( BufferHandle && other)
noexcept
387186 {
387187 std::swap(node, other.node);
387188 std::swap(handle, other.handle);
387189 return *this;
387190}

◆ IsValid()

bool duckdb::BufferHandle::IsValid ( ) const

Returns whether or not the BufferHandle is valid.

387196 {
387197 return node != nullptr;
387198}
Here is the caller graph for this function:

◆ Ptr() [1/2]

data_ptr_t duckdb::BufferHandle::Ptr ( ) const
inline

Returns a pointer to the buffer data. Handle must be valid.

9927 {
9928 D_ASSERT(IsValid());
9929 return node->buffer;
9930 }
DUCKDB_API bool IsValid() const
Returns whether or not the BufferHandle is valid.
Definition duckdb.cpp:387196
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Ptr() [2/2]

data_ptr_t duckdb::BufferHandle::Ptr ( )
inline

Returns a pointer to the buffer data. Handle must be valid.

9932 {
9933 D_ASSERT(IsValid());
9934 return node->buffer;
9935 }
Here is the call graph for this function:

◆ GetFileBuffer()

FileBuffer & duckdb::BufferHandle::GetFileBuffer ( )

Gets the underlying file buffer. Handle must be valid.

387209 {
387210 D_ASSERT(node);
387211 return *node;
387212}

◆ Destroy()

void duckdb::BufferHandle::Destroy ( )

Destroys the buffer handle.

387200 {
387201 if (!handle || !IsValid()) {
387202 return;
387203 }
387204 handle->GetMemory().GetBufferManager().Unpin(handle);
387205 handle.reset();
387206 node = nullptr;
387207}
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetBlockHandle()

const shared_ptr< BlockHandle > & duckdb::BufferHandle::GetBlockHandle ( ) const
inline
9941 {
9942 return handle;
9943 }

The documentation for this class was generated from the following files: