TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
fmt::internal::FormatBuf< Char > Class Template Reference

#include <format.h>

Public Member Functions

 FormatBuf (Buffer< Char > &buffer)
 
int_type overflow (int_type ch=traits_type::eof())
 
size_t size () const
 

Private Types

typedef std::basic_streambuf
< Char >::int_type 
int_type
 
typedef std::basic_streambuf
< Char >::traits_type 
traits_type
 

Private Attributes

Buffer< Char > & buffer_
 
Charstart_
 

Member Typedef Documentation

template<class Char>
typedef std::basic_streambuf<Char>::int_type fmt::internal::FormatBuf< Char >::int_type
private
template<class Char>
typedef std::basic_streambuf<Char>::traits_type fmt::internal::FormatBuf< Char >::traits_type
private

Constructor & Destructor Documentation

template<class Char>
fmt::internal::FormatBuf< Char >::FormatBuf ( Buffer< Char > &  buffer)
inline
2022  : buffer_(buffer), start_(&buffer[0]) {
2023  this->setp(start_, start_ + buffer_.capacity());
2024  }
Buffer< Char > & buffer_
Definition: format.h:2018
std::size_t capacity() const
Definition: format.h:608
Char * start_
Definition: format.h:2019

+ Here is the call graph for this function:

Member Function Documentation

template<class Char>
int_type fmt::internal::FormatBuf< Char >::overflow ( int_type  ch = traits_type::eof())
inline
2026  {
2027  if (!traits_type::eq_int_type(ch, traits_type::eof())) {
2028  size_t size = this->size();
2029  buffer_.resize(size);
2030  buffer_.reserve(size * 2);
2031 
2032  start_ = &buffer_[0];
2033  start_[size] = traits_type::to_char_type(ch);
2034  this->setp(start_+ size + 1, start_ + size * 2);
2035  }
2036  return ch;
2037  }
Buffer< Char > & buffer_
Definition: format.h:2018
void resize(std::size_t new_size)
Definition: format.h:613
size_t size() const
Definition: format.h:2039
Char * start_
Definition: format.h:2019
void reserve(std::size_t capacity)
Definition: format.h:624

+ Here is the call graph for this function:

template<class Char>
size_t fmt::internal::FormatBuf< Char >::size ( ) const
inline
2039  {
2040  return to_unsigned(this->pptr() - start_);
2041  }
Char * start_
Definition: format.h:2019
MakeUnsigned< Int >::Type to_unsigned(Int value)
Definition: format.h:554

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

template<class Char>
Buffer<Char>& fmt::internal::FormatBuf< Char >::buffer_
private
template<class Char>
Char* fmt::internal::FormatBuf< Char >::start_
private

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