CASM  1.1.0
A Clusters Approach to Statistical Mechanics
CASM::RandomAccessEnumerator< ValueType, IsConst > Class Template Reference

#include <RandomAccessEnumerator.hh>

Detailed Description

template<typename ValueType, bool IsConst = true>
class CASM::RandomAccessEnumerator< ValueType, IsConst >

Generic random access enumerator.

Definition at line 360 of file RandomAccessEnumerator.hh.

Public Types

typedef RandomAccessEnumeratorBase< ValueType, IsConst >::step_type step_type
 
typedef ValueType value_type
 
typedef RandomAccessEnumeratorBase< ValueType, IsConst >::reference reference
 
typedef RandomAccessEnumIterator< ValueType, IsConst > iterator
 
typedef std::reverse_iterator< iteratorreverse_iterator
 
typedef RandomAccessEnumeratorBase< ValueType, IsConst >::size_type size_type
 

Public Member Functions

 RandomAccessEnumerator ()
 
 RandomAccessEnumerator (std::unique_ptr< RandomAccessEnumeratorBase< ValueType, IsConst > > e)
 
 RandomAccessEnumerator (const RandomAccessEnumerator &)=delete
 
RandomAccessEnumeratoroperator= (const RandomAccessEnumerator &)=delete
 
iterator begin ()
 
iterator end ()
 
reverse_iterator rbegin ()
 
reverse_iterator rend ()
 
reference current () const
 Access the current ObjectType by reference. More...
 
step_type step () const
 Increments with each enumerated object. More...
 
bool valid () const
 Returns false if enumeration is complete. More...
 
jsonParser source (step_type step) const
 
std::string name () const
 Derived enumerators must implement name. More...
 

Public Attributes

std::unique_ptr< RandomAccessEnumeratorBase< ValueType, IsConst > > ptr
 

Member Typedef Documentation

◆ iterator

template<typename ValueType , bool IsConst = true>
typedef RandomAccessEnumIterator<ValueType, IsConst> CASM::RandomAccessEnumerator< ValueType, IsConst >::iterator

Definition at line 367 of file RandomAccessEnumerator.hh.

◆ reference

template<typename ValueType , bool IsConst = true>
typedef RandomAccessEnumeratorBase<ValueType, IsConst>::reference CASM::RandomAccessEnumerator< ValueType, IsConst >::reference

Definition at line 366 of file RandomAccessEnumerator.hh.

◆ reverse_iterator

template<typename ValueType , bool IsConst = true>
typedef std::reverse_iterator<iterator> CASM::RandomAccessEnumerator< ValueType, IsConst >::reverse_iterator

Definition at line 368 of file RandomAccessEnumerator.hh.

◆ size_type

template<typename ValueType , bool IsConst = true>
typedef RandomAccessEnumeratorBase<ValueType, IsConst>::size_type CASM::RandomAccessEnumerator< ValueType, IsConst >::size_type

Definition at line 370 of file RandomAccessEnumerator.hh.

◆ step_type

template<typename ValueType , bool IsConst = true>
typedef RandomAccessEnumeratorBase<ValueType, IsConst>::step_type CASM::RandomAccessEnumerator< ValueType, IsConst >::step_type

Definition at line 363 of file RandomAccessEnumerator.hh.

◆ value_type

template<typename ValueType , bool IsConst = true>
typedef ValueType CASM::RandomAccessEnumerator< ValueType, IsConst >::value_type

Definition at line 364 of file RandomAccessEnumerator.hh.

Constructor & Destructor Documentation

◆ RandomAccessEnumerator() [1/3]

template<typename ValueType , bool IsConst = true>
CASM::RandomAccessEnumerator< ValueType, IsConst >::RandomAccessEnumerator ( )
inline

Definition at line 372 of file RandomAccessEnumerator.hh.

◆ RandomAccessEnumerator() [2/3]

template<typename ValueType , bool IsConst = true>
CASM::RandomAccessEnumerator< ValueType, IsConst >::RandomAccessEnumerator ( std::unique_ptr< RandomAccessEnumeratorBase< ValueType, IsConst > >  e)
inline

Definition at line 374 of file RandomAccessEnumerator.hh.

◆ RandomAccessEnumerator() [3/3]

template<typename ValueType , bool IsConst = true>
CASM::RandomAccessEnumerator< ValueType, IsConst >::RandomAccessEnumerator ( const RandomAccessEnumerator< ValueType, IsConst > &  )
delete

Member Function Documentation

◆ begin()

template<typename ValueType , bool IsConst = true>
iterator CASM::RandomAccessEnumerator< ValueType, IsConst >::begin ( )
inline

Definition at line 381 of file RandomAccessEnumerator.hh.

◆ current()

template<typename ValueType , bool IsConst = true>
reference CASM::RandomAccessEnumerator< ValueType, IsConst >::current ( ) const
inline

Access the current ObjectType by reference.

Definition at line 390 of file RandomAccessEnumerator.hh.

◆ end()

template<typename ValueType , bool IsConst = true>
iterator CASM::RandomAccessEnumerator< ValueType, IsConst >::end ( )
inline

Definition at line 383 of file RandomAccessEnumerator.hh.

◆ name()

template<typename ValueType , bool IsConst = true>
std::string CASM::RandomAccessEnumerator< ValueType, IsConst >::name ( ) const
inline

Derived enumerators must implement name.

Definition at line 401 of file RandomAccessEnumerator.hh.

◆ operator=()

template<typename ValueType , bool IsConst = true>
RandomAccessEnumerator& CASM::RandomAccessEnumerator< ValueType, IsConst >::operator= ( const RandomAccessEnumerator< ValueType, IsConst > &  )
delete

◆ rbegin()

template<typename ValueType , bool IsConst = true>
reverse_iterator CASM::RandomAccessEnumerator< ValueType, IsConst >::rbegin ( )
inline

Definition at line 385 of file RandomAccessEnumerator.hh.

◆ rend()

template<typename ValueType , bool IsConst = true>
reverse_iterator CASM::RandomAccessEnumerator< ValueType, IsConst >::rend ( )
inline

Definition at line 387 of file RandomAccessEnumerator.hh.

◆ source()

template<typename ValueType , bool IsConst = true>
jsonParser CASM::RandomAccessEnumerator< ValueType, IsConst >::source ( step_type  step) const
inline

Definition at line 398 of file RandomAccessEnumerator.hh.

◆ step()

template<typename ValueType , bool IsConst = true>
step_type CASM::RandomAccessEnumerator< ValueType, IsConst >::step ( ) const
inline

Increments with each enumerated object.

Definition at line 393 of file RandomAccessEnumerator.hh.

◆ valid()

template<typename ValueType , bool IsConst = true>
bool CASM::RandomAccessEnumerator< ValueType, IsConst >::valid ( ) const
inline

Returns false if enumeration is complete.

Definition at line 396 of file RandomAccessEnumerator.hh.

Member Data Documentation

◆ ptr

template<typename ValueType , bool IsConst = true>
std::unique_ptr<RandomAccessEnumeratorBase<ValueType, IsConst> > CASM::RandomAccessEnumerator< ValueType, IsConst >::ptr

Definition at line 403 of file RandomAccessEnumerator.hh.


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