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::vector< DATA_TYPE, SAFE, ALLOCATOR > Class Template Reference
Inheritance diagram for duckdb::vector< DATA_TYPE, SAFE, ALLOCATOR >:
Collaboration diagram for duckdb::vector< DATA_TYPE, SAFE, ALLOCATOR >:

Public Types

using original = std::vector< DATA_TYPE, ALLOCATOR >
 
using value_type = typename original::value_type
 
using allocator_type = typename original::allocator_type
 
using size_type = typename original::size_type
 
using difference_type = typename original::difference_type
 
using reference = typename original::reference
 
using const_reference = typename original::const_reference
 
using pointer = typename original::pointer
 
using const_pointer = typename original::const_pointer
 
using iterator = typename original::iterator
 
using const_iterator = typename original::const_iterator
 
using reverse_iterator = typename original::reverse_iterator
 
using const_reverse_iterator = typename original::const_reverse_iterator
 

Public Member Functions

void clear () noexcept
 
 vector (original &&other)
 
template<bool INTERNAL_SAFE>
 vector (vector< DATA_TYPE, INTERNAL_SAFE > &&other)
 
template<bool INTERNAL_SAFE = false>
original::reference get (typename original::size_type __n)
 
template<bool INTERNAL_SAFE = false>
original::const_reference get (typename original::size_type __n) const
 
original::reference operator[] (typename original::size_type __n)
 
original::const_reference operator[] (typename original::size_type __n) const
 
original::reference front ()
 
original::const_reference front () const
 
original::reference back ()
 
original::const_reference back () const
 
void unsafe_erase_at (idx_t idx)
 
void erase_at (idx_t idx)
 

Static Private Member Functions

static void AssertIndexInBounds (idx_t index, idx_t size)
 

Constructor & Destructor Documentation

◆ vector() [1/2]

template<class DATA_TYPE , bool SAFE = true, class ALLOCATOR = std::allocator<DATA_TYPE>>
duckdb::vector< DATA_TYPE, SAFE, ALLOCATOR >::vector ( original &&  other)
inline
2284 : original(std::move(other)) { // NOLINT: allow implicit conversion
2285 }

◆ vector() [2/2]

template<class DATA_TYPE , bool SAFE = true, class ALLOCATOR = std::allocator<DATA_TYPE>>
template<bool INTERNAL_SAFE>
duckdb::vector< DATA_TYPE, SAFE, ALLOCATOR >::vector ( vector< DATA_TYPE, INTERNAL_SAFE > &&  other)
inline
2287 : original(std::move(other)) { // NOLINT: allow implicit conversion
2288 }

Member Function Documentation

◆ AssertIndexInBounds()

template<class DATA_TYPE , bool SAFE = true, class ALLOCATOR = std::allocator<DATA_TYPE>>
static void duckdb::vector< DATA_TYPE, SAFE, ALLOCATOR >::AssertIndexInBounds ( idx_t  index,
idx_t  size 
)
inlinestaticprivate
2261 {
2262#if defined(DUCKDB_DEBUG_NO_SAFETY) || defined(DUCKDB_CLANG_TIDY)
2263 return;
2264#else
2265 if (DUCKDB_UNLIKELY(index >= size)) {
2266 throw InternalException("Attempted to access index %ld within vector of size %ld", index, size);
2267 }
2268#endif
2269 }

◆ clear()

template<class DATA_TYPE , bool SAFE = true, class ALLOCATOR = std::allocator<DATA_TYPE>>
void duckdb::vector< DATA_TYPE, SAFE, ALLOCATOR >::clear ( )
inlinenoexcept
2277 { // NOLINT: hiding on purpose
2278 original::clear();
2279 }

◆ get() [1/2]

template<class DATA_TYPE , bool SAFE = true, class ALLOCATOR = std::allocator<DATA_TYPE>>
template<bool INTERNAL_SAFE = false>
original::reference duckdb::vector< DATA_TYPE, SAFE, ALLOCATOR >::get ( typename original::size_type  __n)
inline
2291 { // NOLINT: hiding on purpose
2292 if (MemorySafety<INTERNAL_SAFE>::ENABLED) {
2293 AssertIndexInBounds(__n, original::size());
2294 }
2295 return original::operator[](__n);
2296 }

◆ get() [2/2]

template<class DATA_TYPE , bool SAFE = true, class ALLOCATOR = std::allocator<DATA_TYPE>>
template<bool INTERNAL_SAFE = false>
original::const_reference duckdb::vector< DATA_TYPE, SAFE, ALLOCATOR >::get ( typename original::size_type  __n) const
inline
2299 { // NOLINT: hiding on purpose
2300 if (MemorySafety<INTERNAL_SAFE>::ENABLED) {
2301 AssertIndexInBounds(__n, original::size());
2302 }
2303 return original::operator[](__n);
2304 }

◆ operator[]() [1/2]

template<class DATA_TYPE , bool SAFE = true, class ALLOCATOR = std::allocator<DATA_TYPE>>
original::reference duckdb::vector< DATA_TYPE, SAFE, ALLOCATOR >::operator[] ( typename original::size_type  __n)
inline
2306 { // NOLINT: hiding on purpose
2307 return get<SAFE>(__n);
2308 }

◆ operator[]() [2/2]

template<class DATA_TYPE , bool SAFE = true, class ALLOCATOR = std::allocator<DATA_TYPE>>
original::const_reference duckdb::vector< DATA_TYPE, SAFE, ALLOCATOR >::operator[] ( typename original::size_type  __n) const
inline
2309 { // NOLINT: hiding on purpose
2310 return get<SAFE>(__n);
2311 }

◆ front() [1/2]

template<class DATA_TYPE , bool SAFE = true, class ALLOCATOR = std::allocator<DATA_TYPE>>
original::reference duckdb::vector< DATA_TYPE, SAFE, ALLOCATOR >::front ( )
inline
2313 { // NOLINT: hiding on purpose
2314 return get<SAFE>(0);
2315 }

◆ front() [2/2]

template<class DATA_TYPE , bool SAFE = true, class ALLOCATOR = std::allocator<DATA_TYPE>>
original::const_reference duckdb::vector< DATA_TYPE, SAFE, ALLOCATOR >::front ( ) const
inline
2317 { // NOLINT: hiding on purpose
2318 return get<SAFE>(0);
2319 }

◆ back() [1/2]

template<class DATA_TYPE , bool SAFE = true, class ALLOCATOR = std::allocator<DATA_TYPE>>
original::reference duckdb::vector< DATA_TYPE, SAFE, ALLOCATOR >::back ( )
inline
2321 { // NOLINT: hiding on purpose
2322 if (MemorySafety<SAFE>::ENABLED && original::empty()) {
2323 throw InternalException("'back' called on an empty vector!");
2324 }
2325 return get<SAFE>(original::size() - 1);
2326 }

◆ back() [2/2]

template<class DATA_TYPE , bool SAFE = true, class ALLOCATOR = std::allocator<DATA_TYPE>>
original::const_reference duckdb::vector< DATA_TYPE, SAFE, ALLOCATOR >::back ( ) const
inline
2328 { // NOLINT: hiding on purpose
2329 if (MemorySafety<SAFE>::ENABLED && original::empty()) {
2330 throw InternalException("'back' called on an empty vector!");
2331 }
2332 return get<SAFE>(original::size() - 1);
2333 }

◆ unsafe_erase_at()

template<class DATA_TYPE , bool SAFE = true, class ALLOCATOR = std::allocator<DATA_TYPE>>
void duckdb::vector< DATA_TYPE, SAFE, ALLOCATOR >::unsafe_erase_at ( idx_t  idx)
inline
2335 { // NOLINT: not using camelcase on purpose here
2336 original::erase(original::begin() + static_cast<typename original::iterator::difference_type>(idx));
2337 }

◆ erase_at()

template<class DATA_TYPE , bool SAFE = true, class ALLOCATOR = std::allocator<DATA_TYPE>>
void duckdb::vector< DATA_TYPE, SAFE, ALLOCATOR >::erase_at ( idx_t  idx)
inline
2339 { // NOLINT: not using camelcase on purpose here
2340 if (MemorySafety<SAFE>::ENABLED && idx > original::size()) {
2341 throw InternalException("Can't remove offset %d from vector of size %d", idx, original::size());
2342 }
2343 unsafe_erase_at(idx);
2344 }

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