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::FunctionSet< T > Class Template Reference
Collaboration diagram for duckdb::FunctionSet< T >:

Public Member Functions

 FunctionSet (string name)
 
void AddFunction (T function)
 
idx_t Size ()
 
GetFunctionByOffset (idx_t offset)
 
T & GetFunctionReferenceByOffset (idx_t offset)
 
bool MergeFunctionSet (FunctionSet< T > new_functions, bool override=false)
 

Public Attributes

string name
 The name of the function set.
 
vector< T > functions
 The set of functions.
 

Constructor & Destructor Documentation

◆ FunctionSet()

template<class T >
duckdb::FunctionSet< T >::FunctionSet ( string  name)
inlineexplicit
44062 : name(std::move(name)) {
44063 }
string name
The name of the function set.
Definition duckdb.hpp:44066

Member Function Documentation

◆ AddFunction()

template<class T >
void duckdb::FunctionSet< T >::AddFunction ( function)
inline
44071 {
44072 functions.push_back(std::move(function));
44073 }
vector< T > functions
The set of functions.
Definition duckdb.hpp:44068

◆ Size()

template<class T >
idx_t duckdb::FunctionSet< T >::Size ( )
inline
44074 {
44075 return functions.size();
44076 }

◆ GetFunctionByOffset()

template<class T >
T duckdb::FunctionSet< T >::GetFunctionByOffset ( idx_t  offset)
inline
44077 {
44078 D_ASSERT(offset < functions.size());
44079 return functions[offset];
44080 }

◆ GetFunctionReferenceByOffset()

template<class T >
T & duckdb::FunctionSet< T >::GetFunctionReferenceByOffset ( idx_t  offset)
inline
44081 {
44082 D_ASSERT(offset < functions.size());
44083 return functions[offset];
44084 }

◆ MergeFunctionSet()

template<class T >
bool duckdb::FunctionSet< T >::MergeFunctionSet ( FunctionSet< T >  new_functions,
bool  override = false 
)
inline
44085 {
44086 D_ASSERT(!new_functions.functions.empty());
44087 for (auto &new_func : new_functions.functions) {
44088 bool overwritten = false;
44089 for (auto &func : functions) {
44090 if (new_func.Equal(func)) {
44091 // function overload already exists
44092 if (override) {
44093 // override it
44094 overwritten = true;
44095 func = new_func;
44096 } else {
44097 // throw an error
44098 return false;
44099 }
44100 break;
44101 }
44102 }
44103 if (!overwritten) {
44104 functions.push_back(new_func);
44105 }
44106 }
44107 return true;
44108 }

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