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

Public Types

using size_type = int
 
using format_arg = basic_format_arg< Context >
 

Public Member Functions

template<typename... Args>
 basic_format_args (const format_arg_store< Context, Args... > &store)
 
 basic_format_args (const format_arg *args, int count)
 
format_arg get (int index) const
 
int max_size () const
 

Private Member Functions

bool is_packed () const
 
internal::type type (int index) const
 
void set_data (const internal::value< Context > *values)
 
void set_data (const format_arg *args)
 
format_arg do_get (int index) const
 

Private Attributes

unsigned long long types_
 
union { 
 
   const internal::value< Context > *   values_ 
 
   const format_arg *   args_ 
 
};  
 

Friends

class internal::arg_map< Context >
 

Detailed Description

template<typename Context>
class basic_format_args< Context >

Formatting arguments.

Constructor & Destructor Documentation

◆ basic_format_args() [1/3]

template<typename Context >
basic_format_args< Context >::basic_format_args ( )
inline
16099: types_(0) {}

◆ basic_format_args() [2/3]

template<typename Context >
template<typename... Args>
basic_format_args< Context >::basic_format_args ( const format_arg_store< Context, Args... > &  store)
inline

\rst Constructs a basic_format_args object from ~fmtformat_arg_store. \endrst

16108 : types_(store.types) {
16109 set_data(store.data_);
16110 }

◆ basic_format_args() [3/3]

template<typename Context >
basic_format_args< Context >::basic_format_args ( const format_arg args,
int  count 
)
inline

\rst Constructs a basic_format_args object from a dynamic set of arguments. \endrst

16118 : types_(internal::is_unpacked_bit | internal::to_unsigned(count)) {
16119 set_data(args);
16120 }

Member Function Documentation

◆ is_packed()

template<typename Context >
bool basic_format_args< Context >::is_packed ( ) const
inlineprivate
16070{ return (types_ & internal::is_unpacked_bit) == 0; }

◆ type()

template<typename Context >
internal::type basic_format_args< Context >::type ( int  index) const
inlineprivate
16072 {
16073 int shift = index * internal::packed_arg_bits;
16074 unsigned int mask = (1 << internal::packed_arg_bits) - 1;
16075 return static_cast<internal::type>((types_ >> shift) & mask);
16076 }
index
GMat mask(const GMat &src, const GMat &mask)
Here is the caller graph for this function:

◆ set_data() [1/2]

template<typename Context >
void basic_format_args< Context >::set_data ( const internal::value< Context > *  values)
inlineprivate
16080{ values_ = values; }

◆ set_data() [2/2]

template<typename Context >
void basic_format_args< Context >::set_data ( const format_arg args)
inlineprivate
16081{ args_ = args; }

◆ do_get()

template<typename Context >
format_arg basic_format_args< Context >::do_get ( int  index) const
inlineprivate
16083 {
16084 format_arg arg;
16085 if (!is_packed()) {
16086 auto num_args = max_size();
16087 if (index < num_args) arg = args_[index];
16088 return arg;
16089 }
16090 if (index > internal::max_packed_args) return arg;
16091 arg.type_ = type(index);
16092 if (arg.type_ == internal::none_type) return arg;
16093 internal::value<Context>& val = arg.value_;
16094 val = values_[index];
16095 return arg;
16096 }
Definition duckdb.cpp:15583

◆ get()

template<typename Context >
format_arg basic_format_args< Context >::get ( int  index) const
inline

Returns the argument at specified index.

16123 {
16124 format_arg arg = do_get(index);
16125 if (arg.type_ == internal::named_arg_type)
16126 arg = arg.value_.named_arg->template deserialize<Context>();
16127 return arg;
16128 }

◆ max_size()

template<typename Context >
int basic_format_args< Context >::max_size ( ) const
inline
16130 {
16131 unsigned long long max_packed = internal::max_packed_args;
16132 return static_cast<int>(is_packed() ? max_packed
16133 : types_ & ~internal::is_unpacked_bit);
16134 }

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