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::CatalogEntryMap Class Reference

Public Member Functions

void AddEntry (unique_ptr< CatalogEntry > entry)
 
void UpdateEntry (unique_ptr< CatalogEntry > entry)
 
void DropEntry (CatalogEntry &entry)
 
case_insensitive_tree_t< unique_ptr< CatalogEntry > > & Entries ()
 
optional_ptr< CatalogEntryGetEntry (const string &name)
 

Private Attributes

case_insensitive_tree_t< unique_ptr< CatalogEntry > > entries
 Mapping of string to catalog entry.
 

Constructor & Destructor Documentation

◆ CatalogEntryMap()

duckdb::CatalogEntryMap::CatalogEntryMap ( )
inline
29150 {
29151 }

Member Function Documentation

◆ AddEntry()

void duckdb::CatalogEntryMap::AddEntry ( unique_ptr< CatalogEntry entry)
22878 {
22879 auto name = entry->name;
22880
22881 if (entries.find(name) != entries.end()) {
22882 throw InternalException("Entry with name \"%s\" already exists", name);
22883 }
22884 entries.insert(make_pair(name, std::move(entry)));
22885}
case_insensitive_tree_t< unique_ptr< CatalogEntry > > entries
Mapping of string to catalog entry.
Definition duckdb.hpp:29162

◆ UpdateEntry()

void duckdb::CatalogEntryMap::UpdateEntry ( unique_ptr< CatalogEntry entry)
22887 {
22888 auto name = catalog_entry->name;
22889
22890 auto entry = entries.find(name);
22891 if (entry == entries.end()) {
22892 throw InternalException("Entry with name \"%s\" does not exist", name);
22893 }
22894
22895 auto existing = std::move(entry->second);
22896 entry->second = std::move(catalog_entry);
22897 entry->second->SetChild(std::move(existing));
22898}

◆ DropEntry()

void duckdb::CatalogEntryMap::DropEntry ( CatalogEntry entry)
22904 {
22905 auto &name = entry.name;
22906 auto chain = GetEntry(name);
22907 if (!chain) {
22908 throw InternalException("Attempting to drop entry with name \"%s\" but no chain with that name exists", name);
22909 }
22910 auto child = entry.TakeChild();
22911 if (!entry.HasParent()) {
22912 // This is the top of the chain
22913 D_ASSERT(chain.get() == &entry);
22914 auto it = entries.find(name);
22915 D_ASSERT(it != entries.end());
22916
22917 // Remove the entry
22918 it->second.reset();
22919 if (child) {
22920 // Replace it with its child
22921 it->second = std::move(child);
22922 } else {
22923 entries.erase(it);
22924 }
22925 } else {
22926 // Just replace the entry with its child
22927 auto &parent = entry.Parent();
22928 parent.SetChild(std::move(child));
22929 }
22930}

◆ Entries()

case_insensitive_tree_t< unique_ptr< CatalogEntry > > & duckdb::CatalogEntryMap::Entries ( )
22900 {
22901 return entries;
22902}

◆ GetEntry()

optional_ptr< CatalogEntry > duckdb::CatalogEntryMap::GetEntry ( const string &  name)
22932 {
22933 auto entry = entries.find(name);
22934 if (entry == entries.end()) {
22935 return nullptr;
22936 }
22937 return entry->second.get();
22938}

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