Public Member Functions | Protected Member Functions | Private Attributes | List of all members
internal::container_buffer< Container > Class Template Reference

#include <core.h>

Inheritance diagram for internal::container_buffer< Container >:
internal::basic_buffer< Container::value_type >

Public Member Functions

 container_buffer (Container &c)
 
- Public Member Functions inherited from internal::basic_buffer< Container::value_type >
virtual ~basic_buffer ()
 
Container::value_type * begin () FMT_NOEXCEPT
 
Container::value_type * end () FMT_NOEXCEPT
 
std::size_t size () const FMT_NOEXCEPT
 
std::size_t capacity () const FMT_NOEXCEPT
 
Container::value_type * data () FMT_NOEXCEPT
 
const Container::value_type * data () const FMT_NOEXCEPT
 
void resize (std::size_t new_size)
 
void clear ()
 
void reserve (std::size_t new_capacity)
 
void push_back (const Container::value_type &value)
 
void append (const U *begin, const U *end)
 
Container::value_type & operator[] (std::size_t index)
 
const Container::value_type & operator[] (std::size_t index) const
 

Protected Member Functions

void grow (std::size_t capacity) FMT_OVERRIDE
 
- Protected Member Functions inherited from internal::basic_buffer< Container::value_type >
 basic_buffer (std::size_t sz) FMT_NOEXCEPT
 
 basic_buffer (Container::value_type *p=FMT_NULL, std::size_t sz=0, std::size_t cap=0) FMT_NOEXCEPT
 
void set (Container::value_type *buf_data, std::size_t buf_capacity) FMT_NOEXCEPT
 

Private Attributes

Container & container_
 

Additional Inherited Members

- Public Types inherited from internal::basic_buffer< Container::value_type >
typedef Container::value_type value_type
 
typedef const Container::value_type & const_reference
 

Detailed Description

template<typename Container>
class internal::container_buffer< Container >

Definition at line 296 of file core.h.

Constructor & Destructor Documentation

template<typename Container>
internal::container_buffer< Container >::container_buffer ( Container &  c)
inlineexplicit

Definition at line 307 of file core.h.

308  : basic_buffer<typename Container::value_type>(c.size()), container_(c) {}
Container & container_
Definition: core.h:298

Member Function Documentation

template<typename Container>
void internal::container_buffer< Container >::grow ( std::size_t  capacity)
inlineprotectedvirtual

Increases the buffer capacity to hold at least capacity elements.

Implements internal::basic_buffer< Container::value_type >.

Definition at line 301 of file core.h.

301  {
302  container_.resize(capacity);
303  this->set(&container_[0], capacity);
304  }
std::size_t capacity() const FMT_NOEXCEPT
Definition: core.h:253
Container & container_
Definition: core.h:298

Member Data Documentation

template<typename Container>
Container& internal::container_buffer< Container >::container_
private

Definition at line 298 of file core.h.


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