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

#include <zm.h>

Public Types

typedef T value_type
 

Public Member Functions

 FixedBuffer ()
 
 FixedBuffer (const FixedBuffer &rhs)
 
FixedBufferoperator= (const FixedBuffer &rhs)
 
void clear ()
 
void alloc (size_t n)
 
void forceAlloc (size_t n)
 
size_t size () const
 
void moveFrom (const FixedBuffer &rhs)
 
void verify (size_t n) const
 
const Toperator[] (size_t n) const
 
Toperator[] (size_t n)
 

Detailed Description

template<class T, size_t BitLen>
class mie::local::FixedBuffer< T, BitLen >

Definition at line 263 of file zm.h.

Member Typedef Documentation

◆ value_type

template<class T , size_t BitLen>
T mie::local::FixedBuffer< T, BitLen >::value_type

Definition at line 270 of file zm.h.

Constructor & Destructor Documentation

◆ FixedBuffer() [1/2]

template<class T , size_t BitLen>
mie::local::FixedBuffer< T, BitLen >::FixedBuffer ( )
inline

Definition at line 271 of file zm.h.

272 : size_(0)
273 {
274 }

◆ FixedBuffer() [2/2]

template<class T , size_t BitLen>
mie::local::FixedBuffer< T, BitLen >::FixedBuffer ( const FixedBuffer< T, BitLen > & rhs)
inline

Definition at line 275 of file zm.h.

276 {
277 operator=(rhs);
278 }
FixedBuffer & operator=(const FixedBuffer &rhs)
Definition zm.h:279
Here is the call graph for this function:

Member Function Documentation

◆ alloc()

template<class T , size_t BitLen>
void mie::local::FixedBuffer< T, BitLen >::alloc ( size_t n)
inline

Definition at line 286 of file zm.h.

287 {
288 verify(n);
289 size_ = n;
290 }
void verify(size_t n) const
Definition zm.h:301
Here is the call graph for this function:

◆ clear()

template<class T , size_t BitLen>
void mie::local::FixedBuffer< T, BitLen >::clear ( )
inline

Definition at line 285 of file zm.h.

285{ size_ = 0; }

◆ forceAlloc()

template<class T , size_t BitLen>
void mie::local::FixedBuffer< T, BitLen >::forceAlloc ( size_t n)
inline

Definition at line 291 of file zm.h.

292 {
293 size_ = n;
294 }

◆ moveFrom()

template<class T , size_t BitLen>
void mie::local::FixedBuffer< T, BitLen >::moveFrom ( const FixedBuffer< T, BitLen > & rhs)
inline

Definition at line 296 of file zm.h.

297 {
298 operator=(rhs);
299 }
Here is the call graph for this function:

◆ operator=()

template<class T , size_t BitLen>
FixedBuffer & mie::local::FixedBuffer< T, BitLen >::operator= ( const FixedBuffer< T, BitLen > & rhs)
inline

Definition at line 279 of file zm.h.

280 {
281 size_ = rhs.size_;
282 std::copy(rhs.v_, rhs.v_ + rhs.size_, v_);
283 return *this;
284 }
Here is the caller graph for this function:

◆ operator[]() [1/2]

template<class T , size_t BitLen>
T & mie::local::FixedBuffer< T, BitLen >::operator[] ( size_t n)
inline

Definition at line 309 of file zm.h.

309{ verify(n); return v_[n]; }
Here is the call graph for this function:

◆ operator[]() [2/2]

template<class T , size_t BitLen>
const T & mie::local::FixedBuffer< T, BitLen >::operator[] ( size_t n) const
inline

Definition at line 308 of file zm.h.

308{ verify(n); return v_[n]; }
Here is the call graph for this function:

◆ size()

template<class T , size_t BitLen>
size_t mie::local::FixedBuffer< T, BitLen >::size ( ) const
inline

Definition at line 295 of file zm.h.

295{ return size_; }

◆ verify()

template<class T , size_t BitLen>
void mie::local::FixedBuffer< T, BitLen >::verify ( size_t n) const
inline

Definition at line 301 of file zm.h.

302 {
303 if (n > N) {
304 printf("n=%d, N=%d\n", (int)n, (int)N);
305 local::errExit("too large size. increase MIE_ZM_VUINT_BIT_LEN in include/zm.h");
306 }
307 }
LOGGING_API void printf(Category category, const char *format,...)
Definition Logging.cpp:30
Here is the caller graph for this function:

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