Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
basic_format_args< Context > Class Template Reference

#include <core.h>

Public Types

using format_arg = basic_format_arg< Context >
 
using size_type = int
 

Public Member Functions

 basic_format_args ()
 
template<typename... Args>
FMT_INLINE basic_format_args (const format_arg_store< Context, Args... > &store)
 
FMT_INLINE basic_format_args (const dynamic_format_arg_store< Context > &store)
 
 basic_format_args (const format_arg *args, int count)
 
format_arg get (int id) const
 
template<typename Char >
format_arg get (basic_string_view< Char > name) const
 
template<typename Char >
int get_id (basic_string_view< Char > name) const
 
int max_size () const
 

Private Member Functions

 basic_format_args (unsigned long long desc, const detail::value< Context > *values)
 
 basic_format_args (unsigned long long desc, const format_arg *args)
 
bool has_named_args () const
 
bool is_packed () const
 
detail::type type (int index) const
 

Private Attributes

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

Detailed Description

template<typename Context>
class basic_format_args< Context >

A view of a collection of formatting arguments. To avoid lifetime issues it should only be used as a parameter type in type-erased functions such as vformat::

void vlog(string_view format_str, format_args args); // OK format_args args = make_format_args(42); // Error: dangling reference

Definition at line 617 of file core.h.

Member Typedef Documentation

template<typename Context>
using basic_format_args< Context >::format_arg = basic_format_arg<Context>

Definition at line 1847 of file core.h.

template<typename Context>
using basic_format_args< Context >::size_type = int

Definition at line 1846 of file core.h.

Constructor & Destructor Documentation

template<typename Context>
basic_format_args< Context >::basic_format_args ( unsigned long long  desc,
const detail::value< Context > *  values 
)
inlineprivate

Definition at line 1876 of file core.h.

template<typename Context>
basic_format_args< Context >::basic_format_args ( unsigned long long  desc,
const format_arg args 
)
inlineprivate

Definition at line 1879 of file core.h.

template<typename Context>
basic_format_args< Context >::basic_format_args ( )
inline

Definition at line 1883 of file core.h.

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

Constructs a basic_format_args object from ~fmtformat_arg_store.

Definition at line 1891 of file core.h.

template<typename Context>
FMT_INLINE basic_format_args< Context >::basic_format_args ( const dynamic_format_arg_store< Context > &  store)
inline

Constructs a basic_format_args object from ~fmtdynamic_format_arg_store.

Definition at line 1900 of file core.h.

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

Constructs a basic_format_args object from a dynamic set of arguments.

Definition at line 1908 of file core.h.

Member Function Documentation

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

Returns the argument with the specified id.

Definition at line 1913 of file core.h.

template<typename Context>
template<typename Char >
format_arg basic_format_args< Context >::get ( basic_string_view< Char >  name) const
inline

Definition at line 1926 of file core.h.

template<typename Context>
template<typename Char >
int basic_format_args< Context >::get_id ( basic_string_view< Char >  name) const
inline

Definition at line 1931 of file core.h.

template<typename Context>
bool basic_format_args< Context >::has_named_args ( ) const
inlineprivate

Definition at line 1866 of file core.h.

template<typename Context>
bool basic_format_args< Context >::is_packed ( ) const
inlineprivate

Definition at line 1865 of file core.h.

template<typename Context>
int basic_format_args< Context >::max_size ( ) const
inline

Definition at line 1941 of file core.h.

template<typename Context>
detail::type basic_format_args< Context >::type ( int  index) const
inlineprivate

Definition at line 1870 of file core.h.

Member Data Documentation

union { ... }
template<typename Context>
const format_arg* basic_format_args< Context >::args_

Definition at line 1862 of file core.h.

template<typename Context>
unsigned long long basic_format_args< Context >::desc_
private

Definition at line 1854 of file core.h.

template<typename Context>
const detail::value<Context>* basic_format_args< Context >::values_

Definition at line 1861 of file core.h.


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


plotjuggler
Author(s): Davide Faconti
autogenerated on Sun Dec 6 2020 04:02:49