MeshLib C++ Docs
Loading...
Searching...
No Matches

std::vector<V>-like container that is 1) resized without initialization of its elements, 2) much simplified: no push_back and many other methods More...

#include <MRMesh/MRBuffer.h>

Public Types

using T = typename NoCtor<V>::type
using reference = T&
using const_reference = const T&
using iterator = T*
using const_iterator = const T*

Public Member Functions

 Buffer ()=default
 Buffer (size_t size)
auto capacity () const
auto size () const
bool empty () const
void clear ()
void resize (size_t newSize)
const_reference operator[] (I i) const MR_LIFETIMEBOUND
reference operator[] (I i) MR_LIFETIMEBOUND
auto data () MR_LIFETIMEBOUND
auto data () const MR_LIFETIMEBOUND
I beginId () const
 returns the identifier of the first element
I backId () const
 returns the identifier of the back() element
I endId () const
 returns backId() + 1
size_t heapBytes () const
 returns the amount of memory this object occupies on heap

Friends

auto begin (const Buffer &a)
auto begin (Buffer &a)
auto end (const Buffer &a)
auto end (Buffer &a)

Detailed Description

template<typename V, typename I>
class MR::Buffer< V, I >

std::vector<V>-like container that is 1) resized without initialization of its elements, 2) much simplified: no push_back and many other methods

Template Parameters
Vtype of stored elements
Itype of index (shall be convertible to size_t)

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