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
arg_formatter< Range > Class Template Reference
Inheritance diagram for arg_formatter< Range >:
Collaboration diagram for arg_formatter< Range >:

Public Types

using range = Range
using iterator = typename base::iterator
using format_specs = typename base::format_specs
Public Types inherited from internal::arg_formatter_base< Range, ErrorHandler >
using char_type = typename Range::value_type
using iterator = typename Range::iterator
using format_specs = basic_format_specs<char_type>

Public Member Functions

 arg_formatter (context_type &ctx, basic_format_parse_context< char_type > *parse_ctx=nullptr, format_specs *specs=nullptr)
iterator operator() (typename basic_format_arg< context_type >::handle handle)
iterator operator() (monostate)
template<typename T, FMT_ENABLE_IF(is_integral< T >::value)>
iterator operator() (T value)
iterator operator() (char_type value)
iterator operator() (bool value)
iterator operator() (const char_type *value)
iterator operator() (basic_string_view< char_type > value)
iterator operator() (const void *value)
Public Member Functions inherited from internal::arg_formatter_base< Range, ErrorHandler >
 arg_formatter_base (Range r, format_specs *s, locale_ref loc)
iterator operator() (monostate)
template<typename T, FMT_ENABLE_IF(is_integral< T >::value)>
iterator operator() (T value)
iterator operator() (char_type value)
iterator operator() (bool value)
template<typename T, FMT_ENABLE_IF(std::is_floating_point< T >::value)>
iterator operator() (T value)
iterator operator() (const char_type *value)
iterator operator() (basic_string_view< char_type > value)
iterator operator() (const void *value)

Private Types

using char_type = typename Range::value_type
using base = internal::arg_formatter_base<Range>
using context_type = basic_format_context<typename base::iterator, char_type>

Private Attributes

context_type & ctx_
basic_format_parse_context< char_type > * parse_ctx_

Additional Inherited Members

Protected Member Functions inherited from internal::arg_formatter_base< Range, ErrorHandler >
writer_type & writer ()
FMT_DEPRECATED format_specs * spec ()
format_specs * specs ()
iterator out ()
void write (bool value)
void write (const char_type *value)

Detailed Description

template<typename Range>
class arg_formatter< Range >

The default argument formatter.

Constructor & Destructor Documentation

◆ arg_formatter()

template<typename Range>
arg_formatter< Range >::arg_formatter ( context_type & ctx,
basic_format_parse_context< char_type > * parse_ctx = nullptr,
format_specs * specs = nullptr )
inlineexplicit

\rst Constructs an argument formatter object. ctx* is a reference to the formatting context, specs* contains format specifier information for standard argument types. \endrst

18984 : base(Range(ctx.out()), specs, ctx.locale()),
18985 ctx_(ctx),
18986 parse_ctx_(parse_ctx) {}
Definition duckdb.cpp:18959

Member Function Documentation

◆ operator()() [1/8]

template<typename Range>
iterator arg_formatter< Range >::operator() ( typename basic_format_arg< context_type >::handle handle)
inline

Formats an argument of a user-defined type.

18991 {
18992 handle.format(*parse_ctx_, ctx_);
18993 return ctx_.out();
18994 }

◆ operator()() [2/8]

template<typename Range>
iterator internal::arg_formatter_base< Range, ErrorHandler >::operator() ( monostate )
inline
18112 {
18113 FMT_ASSERT(false, "invalid argument type");
18114 return out();
18115 }

◆ operator()() [3/8]

template<typename Range>
template<typename T, FMT_ENABLE_IF(is_integral< T >::value)>
iterator internal::arg_formatter_base< Range, ErrorHandler >::operator() ( T value)
inline
18118 {
18119 if (specs_)
18120 writer_.write_int(value, *specs_);
18121 else
18122 writer_.write(value);
18123 return out();
18124 }

◆ operator()() [4/8]

template<typename Range>
iterator internal::arg_formatter_base< Range, ErrorHandler >::operator() ( char_type value)
inline
18126 {
18128 specs_, char_spec_handler(*this, static_cast<char_type>(value)));
18129 return out();
18130 }

◆ operator()() [5/8]

template<typename Range>
iterator internal::arg_formatter_base< Range, ErrorHandler >::operator() ( bool value)
inline
18132 {
18133 if (specs_ && specs_->type) return (*this)(value ? 1 : 0);
18134 write(value != 0);
18135 return out();
18136 }

◆ operator()() [6/8]

template<typename Range>
iterator internal::arg_formatter_base< Range, ErrorHandler >::operator() ( const char_type * value)
inline
18171 {
18172 if (!specs_) return write(value), out();
18174 cstring_spec_handler(*this, value));
18175 return out();
18176 }

◆ operator()() [7/8]

template<typename Range>
iterator internal::arg_formatter_base< Range, ErrorHandler >::operator() ( basic_string_view< char_type > value)
inline
18178 {
18179 if (specs_) {
18181 writer_.write(value, *specs_);
18182 } else {
18183 writer_.write(value);
18184 }
18185 return out();
18186 }

◆ operator()() [8/8]

template<typename Range>
iterator internal::arg_formatter_base< Range, ErrorHandler >::operator() ( const void * value)
inline
18188 {
18189 if (specs_)
18191 write_pointer(value);
18192 return out();
18193 }

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