alternative Standard Libary  0.29.8
std::discard_block_engine< TEngine, p, r > Template-Klassenreferenz

#include <discard_block_engine.hpp>

Öffentliche Typen

using base_type = TEngine
 
using result_type = typename TEngine::result_type
 

Öffentliche Methoden

 discard_block_engine ()
 
 discard_block_engine (const base_type &bt)
 
 discard_block_engine (result_type s)
 
void seed (result_type s)
 
void seed ()
 
result_type operator() (void)
 
void discard (unsigned long long z)
 
const base_typebase (void) const
 

Statische öffentliche Attribute

static const size_t block_size = p
 
static const size_t used_block = r
 

Ausführliche Beschreibung

template<class TEngine, size_t p, size_t r>
class std::discard_block_engine< TEngine, p, r >

Dokumentation der benutzerdefinierten Datentypen

◆ base_type

template<class TEngine , size_t p, size_t r>
using std::discard_block_engine< TEngine, p, r >::base_type = TEngine

◆ result_type

template<class TEngine , size_t p, size_t r>
using std::discard_block_engine< TEngine, p, r >::result_type = typename TEngine::result_type

Beschreibung der Konstruktoren und Destruktoren

◆ discard_block_engine() [1/3]

template<class TEngine , size_t p, size_t r>
std::discard_block_engine< TEngine, p, r >::discard_block_engine ( )
inline
47  : m_e(), m_n(0) {}

◆ discard_block_engine() [2/3]

template<class TEngine , size_t p, size_t r>
std::discard_block_engine< TEngine, p, r >::discard_block_engine ( const base_type bt)
inlineexplicit
49  : m_e(bt), m_n(0) {}

◆ discard_block_engine() [3/3]

template<class TEngine , size_t p, size_t r>
std::discard_block_engine< TEngine, p, r >::discard_block_engine ( result_type  s)
inlineexplicit
51  : m_e(s), m_n(0) {}

Dokumentation der Elementfunktionen

◆ base()

template<class TEngine , size_t p, size_t r>
const base_type& std::discard_block_engine< TEngine, p, r >::base ( void  ) const
inline
75 { return m_e; }

◆ discard()

template<class TEngine , size_t p, size_t r>
void std::discard_block_engine< TEngine, p, r >::discard ( unsigned long long  z)
inline
70  {
71  for(; z > 0; --z)
72  this->operator()();
73  }

◆ operator()()

template<class TEngine , size_t p, size_t r>
result_type std::discard_block_engine< TEngine, p, r >::operator() ( void  )
inline
62  {
63  if(m_n >= used_block) {
64  m_e.discard(block_size - m_n);
65  m_n = 0;
66  }
67  ++m_n;
68  return m_e();
69  }
static const size_t block_size
Definition: discard_block_engine.hpp:43
static const size_t used_block
Definition: discard_block_engine.hpp:44

◆ seed() [1/2]

template<class TEngine , size_t p, size_t r>
void std::discard_block_engine< TEngine, p, r >::seed ( result_type  s)
inline
53  {
54  m_e.seed(s);
55  m_n = 0;
56  }

◆ seed() [2/2]

template<class TEngine , size_t p, size_t r>
void std::discard_block_engine< TEngine, p, r >::seed ( )
inline
57  {
58  m_e.seed();
59  m_n = 0;
60  }

Dokumentation der Datenelemente

◆ block_size

template<class TEngine , size_t p, size_t r>
const size_t std::discard_block_engine< TEngine, p, r >::block_size = p
static

◆ used_block

template<class TEngine , size_t p, size_t r>
const size_t std::discard_block_engine< TEngine, p, r >::used_block = r
static

Die Dokumentation für diese Klasse wurde erzeugt aufgrund der Datei: