Public Types | Public Member Functions | Private Attributes | Friends | List of all members
internal::null_terminating_iterator< Char > Class Template Reference

#include <format.h>

Public Types

typedef std::ptrdiff_t difference_type
 
typedef Char value_type
 
typedef const Char * pointer
 
typedef const Char & reference
 
typedef std::random_access_iterator_tag iterator_category
 

Public Member Functions

 null_terminating_iterator ()
 
FMT_CONSTEXPR null_terminating_iterator (const Char *ptr, const Char *end)
 
template<typename Range >
FMT_CONSTEXPR null_terminating_iterator (const Range &r)
 
FMT_CONSTEXPR null_terminating_iteratoroperator= (const Char *ptr)
 
FMT_CONSTEXPR Char operator* () const
 
FMT_CONSTEXPR null_terminating_iterator operator++ ()
 
FMT_CONSTEXPR null_terminating_iterator operator++ (int)
 
FMT_CONSTEXPR null_terminating_iterator operator-- ()
 
FMT_CONSTEXPR null_terminating_iterator operator+ (difference_type n)
 
FMT_CONSTEXPR null_terminating_iterator operator- (difference_type n)
 
FMT_CONSTEXPR null_terminating_iterator operator+= (difference_type n)
 
FMT_CONSTEXPR difference_type operator- (null_terminating_iterator other) const
 
FMT_CONSTEXPR bool operator!= (null_terminating_iterator other) const
 
bool operator>= (null_terminating_iterator other) const
 

Private Attributes

const Char * ptr_
 
const Char * end_
 

Friends

template<typename CharT >
FMT_CONSTEXPR_DECL const CharT * pointer_from (null_terminating_iterator< CharT > it)
 

Detailed Description

template<typename Char>
class internal::null_terminating_iterator< Char >

Definition at line 607 of file format.h.

Member Typedef Documentation

template<typename Char>
typedef std::ptrdiff_t internal::null_terminating_iterator< Char >::difference_type

Definition at line 25 of file printf.h.

template<typename Char>
typedef std::random_access_iterator_tag internal::null_terminating_iterator< Char >::iterator_category

Definition at line 29 of file printf.h.

template<typename Char>
typedef const Char* internal::null_terminating_iterator< Char >::pointer

Definition at line 27 of file printf.h.

template<typename Char>
typedef const Char& internal::null_terminating_iterator< Char >::reference

Definition at line 28 of file printf.h.

template<typename Char>
typedef Char internal::null_terminating_iterator< Char >::value_type

Definition at line 26 of file printf.h.

Constructor & Destructor Documentation

template<typename Char>
internal::null_terminating_iterator< Char >::null_terminating_iterator ( )
inline

Definition at line 31 of file printf.h.

31 : ptr_(0), end_(0) {}
template<typename Char>
FMT_CONSTEXPR internal::null_terminating_iterator< Char >::null_terminating_iterator ( const Char *  ptr,
const Char *  end 
)
inline

Definition at line 33 of file printf.h.

34  : ptr_(ptr), end_(end) {}
FMT_CONSTEXPR auto end(const C &c) -> decltype(c.end())
Definition: format.h:257
const void * ptr(const T *p)
Definition: format.h:3138
template<typename Char>
template<typename Range >
FMT_CONSTEXPR internal::null_terminating_iterator< Char >::null_terminating_iterator ( const Range r)
inlineexplicit

Definition at line 37 of file printf.h.

38  : ptr_(r.begin()), end_(r.end()) {}
int end
Definition: doxysearch.cpp:179

Member Function Documentation

template<typename Char>
FMT_CONSTEXPR bool internal::null_terminating_iterator< Char >::operator!= ( null_terminating_iterator< Char >  other) const
inline

Definition at line 84 of file printf.h.

84  {
85  return ptr_ != other.ptr_;
86  }
template<typename Char>
FMT_CONSTEXPR Char internal::null_terminating_iterator< Char >::operator* ( ) const
inline

Definition at line 46 of file printf.h.

46  {
47  return ptr_ != end_ ? *ptr_ : Char();
48  }
template<typename Char>
FMT_CONSTEXPR null_terminating_iterator internal::null_terminating_iterator< Char >::operator+ ( difference_type  n)
inline

Definition at line 66 of file printf.h.

66  {
68  }
std::size_t n
Definition: format.h:3399
template<typename Char>
FMT_CONSTEXPR null_terminating_iterator internal::null_terminating_iterator< Char >::operator++ ( )
inline

Definition at line 50 of file printf.h.

50  {
51  ++ptr_;
52  return *this;
53  }
template<typename Char>
FMT_CONSTEXPR null_terminating_iterator internal::null_terminating_iterator< Char >::operator++ ( int  )
inline

Definition at line 55 of file printf.h.

55  {
57  ++ptr_;
58  return result;
59  }
static QCString result
template<typename Char>
FMT_CONSTEXPR null_terminating_iterator internal::null_terminating_iterator< Char >::operator+= ( difference_type  n)
inline

Definition at line 74 of file printf.h.

74  {
75  ptr_ += n;
76  return *this;
77  }
std::size_t n
Definition: format.h:3399
template<typename Char>
FMT_CONSTEXPR null_terminating_iterator internal::null_terminating_iterator< Char >::operator- ( difference_type  n)
inline

Definition at line 70 of file printf.h.

70  {
72  }
std::size_t n
Definition: format.h:3399
template<typename Char>
FMT_CONSTEXPR difference_type internal::null_terminating_iterator< Char >::operator- ( null_terminating_iterator< Char >  other) const
inline

Definition at line 79 of file printf.h.

80  {
81  return ptr_ - other.ptr_;
82  }
template<typename Char>
FMT_CONSTEXPR null_terminating_iterator internal::null_terminating_iterator< Char >::operator-- ( )
inline

Definition at line 61 of file printf.h.

61  {
62  --ptr_;
63  return *this;
64  }
template<typename Char>
FMT_CONSTEXPR null_terminating_iterator& internal::null_terminating_iterator< Char >::operator= ( const Char *  ptr)
inline

Definition at line 40 of file printf.h.

40  {
41  assert(ptr <= end_);
42  ptr_ = ptr;
43  return *this;
44  }
const void * ptr(const T *p)
Definition: format.h:3138
template<typename Char>
bool internal::null_terminating_iterator< Char >::operator>= ( null_terminating_iterator< Char >  other) const
inline

Definition at line 88 of file printf.h.

88  {
89  return ptr_ >= other.ptr_;
90  }

Friends And Related Function Documentation

template<typename Char>
template<typename CharT >
FMT_CONSTEXPR_DECL const CharT* pointer_from ( null_terminating_iterator< CharT >  it)
friend

Member Data Documentation

template<typename Char>
const Char* internal::null_terminating_iterator< Char >::end_
private

Definition at line 100 of file printf.h.

template<typename Char>
const Char* internal::null_terminating_iterator< Char >::ptr_
private

Definition at line 99 of file printf.h.


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