MPD: BasicStringBuffer< T, CAPACITY > Class Template Reference

MPD 0.20.18

Public Types | Public Member Functions | Static Public Attributes | Protected Attributes
BasicStringBuffer< T, CAPACITY > Class Template Reference

A statically allocated string buffer. More...

`#include <StringBuffer.hxx>`

## Public Types
typedef T | value_type
typedef T & | reference
typedef T * | pointer
typedef const T * | const_pointer
typedef const_pointer | const_iterator
typedef size_t | size_type

## Public Member Functions
constexpr size_type | capacity () const
constexpr bool | empty () const
void | clear ()
constexpr const_pointer | c_str () const
pointer | data ()
constexpr value_type | front () const
value_type | operator[] (size_type i) const
| Returns one character. More...
reference | operator[] (size_type i)
| Returns one writable character. More...
constexpr const_iterator | begin () const
constexpr const_iterator | end () const
constexpr | operator const_pointer () const

## Static Public Attributes
static constexpr value_type | SENTINEL = '\0'

## Protected Attributes
std::array< value_type, CAPACITY > | the_data

## Detailed Description

### template<typename T, size_t CAPACITY>
class BasicStringBuffer< T, CAPACITY >

A statically allocated string buffer.

Definition at line 39 of file StringBuffer.hxx.

## Member Typedef Documentation

## ◆ const_iterator

template<typename T, size_t CAPACITY>

typedef const_pointer BasicStringBuffer< T, CAPACITY >::const_iterator

Definition at line 45 of file StringBuffer.hxx.

## ◆ const_pointer

template<typename T, size_t CAPACITY>

typedef const T* BasicStringBuffer< T, CAPACITY >::const_pointer

Definition at line 44 of file StringBuffer.hxx.

## ◆ pointer

template<typename T, size_t CAPACITY>

typedef T* BasicStringBuffer< T, CAPACITY >::pointer

Definition at line 43 of file StringBuffer.hxx.

## ◆ reference

template<typename T, size_t CAPACITY>

typedef T& BasicStringBuffer< T, CAPACITY >::reference

Definition at line 42 of file StringBuffer.hxx.

## ◆ size_type

template<typename T, size_t CAPACITY>

typedef size_t BasicStringBuffer< T, CAPACITY >::size_type

Definition at line 46 of file StringBuffer.hxx.

## ◆ value_type

template<typename T, size_t CAPACITY>

typedef T BasicStringBuffer< T, CAPACITY >::value_type

Definition at line 41 of file StringBuffer.hxx.

## Member Function Documentation

## ◆ begin()

template<typename T, size_t CAPACITY>

constexpr const_iterator BasicStringBuffer< T, CAPACITY >::begin | ( |  | ) | const
| inline

Definition at line 92 of file StringBuffer.hxx.

## ◆ c_str()

template<typename T, size_t CAPACITY>

constexpr const_pointer BasicStringBuffer< T, CAPACITY >::c_str | ( |  | ) | const
| inline

Definition at line 66 of file StringBuffer.hxx.

## ◆ capacity()

template<typename T, size_t CAPACITY>

constexpr size_type BasicStringBuffer< T, CAPACITY >::capacity | ( |  | ) | const
| inline

Definition at line 54 of file StringBuffer.hxx.

## ◆ clear()

template<typename T, size_t CAPACITY>

void BasicStringBuffer< T, CAPACITY >::clear | ( |  | ) |
| inline

Definition at line 62 of file StringBuffer.hxx.

## ◆ data()

template<typename T, size_t CAPACITY>

pointer BasicStringBuffer< T, CAPACITY >::data | ( |  | ) |
| inline

Definition at line 70 of file StringBuffer.hxx.

## ◆ empty()

template<typename T, size_t CAPACITY>

constexpr bool BasicStringBuffer< T, CAPACITY >::empty | ( |  | ) | const
| inline

Definition at line 58 of file StringBuffer.hxx.

## ◆ end()

template<typename T, size_t CAPACITY>

constexpr const_iterator BasicStringBuffer< T, CAPACITY >::end | ( |  | ) | const
| inline

Definition at line 96 of file StringBuffer.hxx.

## ◆ front()

template<typename T, size_t CAPACITY>

constexpr value_type BasicStringBuffer< T, CAPACITY >::front | ( |  | ) | const
| inline

Definition at line 74 of file StringBuffer.hxx.

## ◆ operator const_pointer()

template<typename T, size_t CAPACITY>

constexpr BasicStringBuffer< T, CAPACITY >::operator const_pointer | ( |  | ) | const
| inline

Definition at line 100 of file StringBuffer.hxx.

## ◆ operator[]() [1/2]

template<typename T, size_t CAPACITY>

value_type BasicStringBuffer< T, CAPACITY >::operator[] | ( | size_type | i | ) | const
| inline

Returns one character.

No bounds checking.

Definition at line 81 of file StringBuffer.hxx.

## ◆ operator[]() [2/2]

template<typename T, size_t CAPACITY>

reference BasicStringBuffer< T, CAPACITY >::operator[] | ( | size_type | i | ) |
| inline

Returns one writable character.

No bounds checking.

Definition at line 88 of file StringBuffer.hxx.

## Field Documentation

## ◆ SENTINEL

template<typename T, size_t CAPACITY>

constexpr value_type BasicStringBuffer< T, CAPACITY >::SENTINEL = '\0'
| static

Definition at line 48 of file StringBuffer.hxx.

## ◆ the_data

template<typename T, size_t CAPACITY>

std::array<value_type, CAPACITY> BasicStringBuffer< T, CAPACITY >::the_data
| protected

Definition at line 51 of file StringBuffer.hxx.

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

- util/StringBuffer.hxx