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::EnumTypeInfoTemplated< T > Struct Template Reference
Inheritance diagram for duckdb::EnumTypeInfoTemplated< T >:
Collaboration diagram for duckdb::EnumTypeInfoTemplated< T >:

Public Member Functions

 EnumTypeInfoTemplated (Vector &values_insert_order_p, idx_t size_p)
const string_map_t< T > & GetValues () const
 EnumTypeInfoTemplated (const EnumTypeInfoTemplated &)=delete
EnumTypeInfoTemplated & operator= (const EnumTypeInfoTemplated &)=delete
Public Member Functions inherited from duckdb::EnumTypeInfo
 EnumTypeInfo (Vector &values_insert_order_p, idx_t dict_size_p)
 EnumTypeInfo (const EnumTypeInfo &)=delete
EnumTypeInfo & operator= (const EnumTypeInfo &)=delete
const EnumDictType & GetEnumDictType () const
const Vector & GetValuesInsertOrder () const
const idx_t & GetDictSize () const
void Serialize (Serializer &serializer) const override
shared_ptr< ExtraTypeInfo > Copy () const override
Public Member Functions inherited from duckdb::ExtraTypeInfo
 ExtraTypeInfo (ExtraTypeInfoType type)
 ExtraTypeInfo (ExtraTypeInfoType type, string alias)
bool Equals (ExtraTypeInfo *other_p) const
virtual shared_ptr< ExtraTypeInfo > DeepCopy () const
template<class TARGET>
TARGET & Cast ()
template<class TARGET>
const TARGET & Cast () const

Static Public Member Functions

static shared_ptr< EnumTypeInfoTemplated > Deserialize (Deserializer &deserializer, uint32_t size)
Static Public Member Functions inherited from duckdb::EnumTypeInfo
static PhysicalType DictType (idx_t size)
static LogicalType CreateType (Vector &ordered_data, idx_t size)
static shared_ptr< ExtraTypeInfo > Deserialize (Deserializer &source)
Static Public Member Functions inherited from duckdb::ExtraTypeInfo
static shared_ptr< ExtraTypeInfo > Deserialize (Deserializer &source)

Private Attributes

string_map_t< T > values

Additional Inherited Members

Public Attributes inherited from duckdb::ExtraTypeInfo
ExtraTypeInfoType type
string alias
unique_ptr< ExtensionTypeInfo > extension_info
Protected Member Functions inherited from duckdb::EnumTypeInfo
bool EqualsInternal (ExtraTypeInfo *other_p) const override
Protected Member Functions inherited from duckdb::ExtraTypeInfo
 ExtraTypeInfo (const ExtraTypeInfo &other)
ExtraTypeInfo & operator= (const ExtraTypeInfo &other)
Protected Attributes inherited from duckdb::EnumTypeInfo
Vector values_insert_order

Constructor & Destructor Documentation

◆ EnumTypeInfoTemplated()

template<class T>
duckdb::EnumTypeInfoTemplated< T >::EnumTypeInfoTemplated ( Vector & values_insert_order_p,
idx_t size_p )
inlineexplicit
72065 : EnumTypeInfo(values_insert_order_p, size_p) {
72066 D_ASSERT(values_insert_order_p.GetType().InternalType() == PhysicalType::VARCHAR);
72067
72069 values_insert_order.ToUnifiedFormat(size_p, vdata);
72070
72072 for (idx_t i = 0; i < size_p; i++) {
72073 auto idx = vdata.sel->get_index(i);
72074 if (!vdata.validity.RowIsValid(idx)) {
72075 throw InternalException("Attempted to create ENUM type with NULL value");
72076 }
72077 if (values.count(data[idx]) > 0) {
72078 throw InvalidInputException("Attempted to create ENUM type with duplicate value %s",
72079 data[idx].GetString());
72080 }
72081 values[data[idx]] = UnsafeNumericCast<T>(i);
72082 }
72083 }
Definition duckdb.cpp:72063

Member Function Documentation

◆ Deserialize()

template<class T>
shared_ptr< EnumTypeInfoTemplated > duckdb::EnumTypeInfoTemplated< T >::Deserialize ( Deserializer & deserializer,
uint32_t size )
inlinestatic
72085 {
72086 Vector values_insert_order(LogicalType::VARCHAR, size);
72087 auto strings = FlatVector::GetData<string_t>(values_insert_order);
72088
72089 deserializer.ReadList(201, "values", [&](Deserializer::List &list, idx_t i) {
72090 strings[i] = StringVector::AddStringOrBlob(values_insert_order, list.ReadElement<string>());
72091 });
72092 return make_shared_ptr<EnumTypeInfoTemplated>(values_insert_order, size);
72093 }
static DUCKDB_API string_t AddStringOrBlob(Vector &vector, const char *data, idx_t len)
Definition duckdb.cpp:137893

◆ GetValues()

template<class T>
const string_map_t< T > & duckdb::EnumTypeInfoTemplated< T >::GetValues ( ) const
inline
72095 {
72096 return values;
72097 }

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