Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
mie::local::VariableBuffer< T, size_t > Class Template Reference

#include <zm.h>

Public Types

typedef T value_type
 

Public Member Functions

 VariableBuffer ()
 
void clear ()
 
void alloc (size_t n)
 
void moveFrom (VariableBuffer &rhs)
 
size_t size () const
 
const Toperator[] (size_t n) const
 
Toperator[] (size_t n)
 

Detailed Description

template<class T, size_t = 0>
class mie::local::VariableBuffer< T, size_t >

Definition at line 227 of file zm.h.

Member Typedef Documentation

◆ value_type

template<class T , size_t = 0>
T mie::local::VariableBuffer< T, size_t >::value_type

Definition at line 230 of file zm.h.

Constructor & Destructor Documentation

◆ VariableBuffer()

template<class T , size_t = 0>
mie::local::VariableBuffer< T, size_t >::VariableBuffer ( )
inline

Definition at line 231 of file zm.h.

232 {
233 }

Member Function Documentation

◆ alloc()

template<class T , size_t = 0>
void mie::local::VariableBuffer< T, size_t >::alloc ( size_t n)
inline

Definition at line 239 of file zm.h.

240 {
241#if NDEBUG
242 v_.resize(n);
243#else
244 size_t m = v_.size();
245 v_.resize(n);
246 if (n > m) {
247 std::fill(&v_[0] + m, &v_[0] + n, (T)-1);
248 }
249#endif
250 }
#define T(meth, val, expected)

◆ clear()

template<class T , size_t = 0>
void mie::local::VariableBuffer< T, size_t >::clear ( )
inline

Definition at line 234 of file zm.h.

234{ v_.clear(); }

◆ moveFrom()

template<class T , size_t = 0>
void mie::local::VariableBuffer< T, size_t >::moveFrom ( VariableBuffer< T, size_t > & rhs)
inline

Definition at line 256 of file zm.h.

256{ v_.swap(rhs.v_); }

◆ operator[]() [1/2]

template<class T , size_t = 0>
T & mie::local::VariableBuffer< T, size_t >::operator[] ( size_t n)
inline

Definition at line 259 of file zm.h.

259{ return v_[n]; }

◆ operator[]() [2/2]

template<class T , size_t = 0>
const T & mie::local::VariableBuffer< T, size_t >::operator[] ( size_t n) const
inline

Definition at line 258 of file zm.h.

258{ return v_[n]; }

◆ size()

template<class T , size_t = 0>
size_t mie::local::VariableBuffer< T, size_t >::size ( ) const
inline

Definition at line 257 of file zm.h.

257{ return v_.size(); }

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