cds  1.4.0
Data Structures | Public Types | Public Member Functions | Static Public Attributes
cds::opt::v::static_buffer< T, Capacity > Class Template Reference

Static buffer (opt::buffer option) More...

#include <cds/opt/buffer.h>

Data Structures

struct  rebind
 Rebind buffer for other template parameters. More...
 

Public Types

typedef T value_type
 value type
 

Public Member Functions

 static_buffer ()
 Construct static buffer.
 
 static_buffer (size_t nCapacity)
 Construct buffer of given capacity. More...
 
value_typeoperator[] (size_t i)
 Get item i.
 
const value_typeoperator[] (size_t i) const
 Get item i, const version.
 
constexpr size_t capacity () const noexcept()
 Returns buffer capacity.
 
void zeroize ()
 Zeroize the buffer.
 
value_typebuffer ()
 Returns pointer to buffer array.
 
value_typebuffer () const
 Returns pointer to buffer array (const version)
 

Static Public Attributes

static const size_t c_nCapacity = Capacity
 Capacity.
 

Detailed Description

template<typename T, size_t Capacity>
class cds::opt::v::static_buffer< T, Capacity >

Static buffer (opt::buffer option)

One of available type for opt::buffer type-option.

This buffer maintains static array. No dynamic memory allocation performed.

Template parameters:
  • T - item type the buffer stores
  • Capacity - the capacity of buffer. The value must be power of two.

Constructor & Destructor Documentation

template<typename T , size_t Capacity>
cds::opt::v::static_buffer< T, Capacity >::static_buffer ( size_t  nCapacity)
inline

Construct buffer of given capacity.

This ctor ignores nCapacity argument. The capacity of static buffer is defined by template argument Capacity


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

cds 1.4.0 Developed by Maxim Khiszinsky aka khizmax 2007 - 2012
Autogenerated Mon May 20 2013 00:38:01 by Doxygen 1.8.3.1