TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
fmt::internal::FormatterBase Class Reference

#include <format.h>

Protected Member Functions

const ArgListargs () const
 
 FormatterBase (const ArgList &args)
 
Arg next_arg (const char *&error)
 
Arg get_arg (unsigned arg_index, const char *&error)
 
bool check_no_auto_index (const char *&error)
 
template<typename Char >
void write (BasicWriter< Char > &w, const Char *start, const Char *end)
 

Private Member Functions

FMT_API Arg do_get_arg (unsigned arg_index, const char *&error)
 

Private Attributes

ArgList args_
 
int next_arg_index_
 

Constructor & Destructor Documentation

fmt::internal::FormatterBase::FormatterBase ( const ArgList args)
inlineexplicitprotected
1831  {
1832  args_ = args;
1833  next_arg_index_ = 0;
1834  }
ArgList args_
Definition: format.h:1822
int next_arg_index_
Definition: format.h:1823
const ArgList & args() const
Definition: format.h:1829

Member Function Documentation

const ArgList& fmt::internal::FormatterBase::args ( ) const
inlineprotected
1829 { return args_; }
ArgList args_
Definition: format.h:1822
bool fmt::internal::FormatterBase::check_no_auto_index ( const char *&  error)
inlineprotected
1850  {
1851  if (next_arg_index_ > 0) {
1852  error = "cannot switch from automatic to manual argument indexing";
1853  return false;
1854  }
1855  next_arg_index_ = -1;
1856  return true;
1857  }
int next_arg_index_
Definition: format.h:1823
FMT_API Arg fmt::internal::FormatterBase::do_get_arg ( unsigned  arg_index,
const char *&  error 
)
private
Arg fmt::internal::FormatterBase::get_arg ( unsigned  arg_index,
const char *&  error 
)
inlineprotected
1846  {
1847  return check_no_auto_index(error) ? do_get_arg(arg_index, error) : Arg();
1848  }
Definition: format.h:983
bool check_no_auto_index(const char *&error)
Definition: format.h:1850
FMT_API Arg do_get_arg(unsigned arg_index, const char *&error)
Arg fmt::internal::FormatterBase::next_arg ( const char *&  error)
inlineprotected
1837  {
1838  if (next_arg_index_ >= 0)
1840  error = "cannot switch from manual to automatic argument indexing";
1841  return Arg();
1842  }
Definition: format.h:983
int next_arg_index_
Definition: format.h:1823
MakeUnsigned< Int >::Type to_unsigned(Int value)
Definition: format.h:554
FMT_API Arg do_get_arg(unsigned arg_index, const char *&error)

+ Here is the call graph for this function:

template<typename Char >
void fmt::internal::FormatterBase::write ( BasicWriter< Char > &  w,
const Char start,
const Char end 
)
inlineprotected
1860  {
1861  if (start != end)
1862  w << BasicStringRef<Char>(start, internal::to_unsigned(end - start));
1863  }
MakeUnsigned< Int >::Type to_unsigned(Int value)
Definition: format.h:554

+ Here is the call graph for this function:

Member Data Documentation

ArgList fmt::internal::FormatterBase::args_
private
int fmt::internal::FormatterBase::next_arg_index_
private

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