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
internal::arg_map< Context > Class Template Reference
Collaboration diagram for internal::arg_map< Context >:

Classes

struct  entry

Public Member Functions

 arg_map (const arg_map &)=delete
void operator= (const arg_map &)=delete
void init (const basic_format_args< Context > &args)
basic_format_arg< Context > find (basic_string_view< char_type > name) const

Private Types

using char_type = typename Context::char_type

Private Member Functions

void push_back (value< Context > val)

Private Attributes

entry * map_
unsigned size_

Constructor & Destructor Documentation

◆ arg_map()

template<typename Context>
internal::arg_map< Context >::arg_map ( )
inline
15898: map_(nullptr), size_(0) {}

◆ ~arg_map()

template<typename Context>
internal::arg_map< Context >::~arg_map ( )
inline
15900{ delete[] map_; }

Member Function Documentation

◆ push_back()

template<typename Context>
void internal::arg_map< Context >::push_back ( value< Context > val)
inlineprivate
15889 {
15890 const auto& named = *val.named_arg;
15891 map_[size_] = {named.name, named.template deserialize<Context>()};
15892 ++size_;
15893 }
Definition duckdb.cpp:15877

◆ init()

template<typename Context>
template FMT_API void internal::arg_map< Context >::init ( const basic_format_args< Context > & args)
17617 {
17618 if (map_) return;
17619 map_ = new entry[internal::to_unsigned(args.max_size())];
17620 if (args.is_packed()) {
17621 for (int i = 0;; ++i) {
17622 internal::type arg_type = args.type(i);
17623 if (arg_type == internal::none_type) return;
17624 if (arg_type == internal::named_arg_type) push_back(args.values_[i]);
17625 }
17626 }
17627 for (int i = 0, n = args.max_size(); i < n; ++i) {
17628 auto type = args.args_[i].type_;
17629 if (type == internal::named_arg_type) push_back(args.args_[i].value_);
17630 }
17631}
Definition duckdb.cpp:15881

◆ find()

template<typename Context>
basic_format_arg< Context > internal::arg_map< Context >::find ( basic_string_view< char_type > name) const
inline
15902 {
15903 // The list is unsorted, so just return the first matching name.
15904 for (entry *it = map_, *end = map_ + size_; it != end; ++it) {
15905 if (it->name == name) return it->arg;
15906 }
15907 return {};
15908 }

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