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

#include <InputEnumerator.hh>

Detailed Description

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

Generic input enumerator.

  • Wraps a InputEnumeratorBase derived enumerator, so it can provide single pass iteration using either an input enumerator or a random access enumerator

Definition at line 242 of file InputEnumerator.hh.

Public Types

typedef InputEnumeratorBase< ValueType, IsConst >::step_type step_type
 
typedef InputEnumeratorBase< ValueType, IsConst >::value_type value_type
 
typedef InputEnumeratorBase< ValueType, IsConst >::reference reference
 
typedef InputEnumeratorBase< ValueType, IsConst >::iterator iterator
 

Public Member Functions

 InputEnumerator ()
 
 InputEnumerator (std::unique_ptr< InputEnumeratorBase< ValueType, IsConst > > e)
 
 InputEnumerator (const InputEnumerator &)=delete
 
InputEnumeratoroperator= (const InputEnumerator &)=delete
 
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...
 
reference current () const
 Access the current ObjectType by reference. More...
 
iterator begin ()
 
iterator end ()
 

Public Attributes

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

Member Typedef Documentation

◆ iterator

template<typename ValueType , bool IsConst = true>
typedef InputEnumeratorBase<ValueType, IsConst>::iterator CASM::InputEnumerator< ValueType, IsConst >::iterator

Definition at line 248 of file InputEnumerator.hh.

◆ reference

template<typename ValueType , bool IsConst = true>
typedef InputEnumeratorBase<ValueType, IsConst>::reference CASM::InputEnumerator< ValueType, IsConst >::reference

Definition at line 247 of file InputEnumerator.hh.

◆ step_type

template<typename ValueType , bool IsConst = true>
typedef InputEnumeratorBase<ValueType, IsConst>::step_type CASM::InputEnumerator< ValueType, IsConst >::step_type

Definition at line 244 of file InputEnumerator.hh.

◆ value_type

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

Definition at line 246 of file InputEnumerator.hh.

Constructor & Destructor Documentation

◆ InputEnumerator() [1/3]

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

Definition at line 250 of file InputEnumerator.hh.

◆ InputEnumerator() [2/3]

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

Definition at line 252 of file InputEnumerator.hh.

◆ InputEnumerator() [3/3]

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

Member Function Documentation

◆ begin()

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

Definition at line 272 of file InputEnumerator.hh.

◆ current()

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

Access the current ObjectType by reference.

Definition at line 270 of file InputEnumerator.hh.

◆ end()

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

Definition at line 274 of file InputEnumerator.hh.

◆ name()

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

Derived enumerators must implement name.

Definition at line 267 of file InputEnumerator.hh.

◆ operator=()

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

◆ source()

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

Definition at line 264 of file InputEnumerator.hh.

◆ step()

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

Increments with each enumerated object.

Definition at line 259 of file InputEnumerator.hh.

◆ valid()

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

Returns false if enumeration is complete.

Definition at line 262 of file InputEnumerator.hh.

Member Data Documentation

◆ ptr

template<typename ValueType , bool IsConst = true>
std::unique_ptr<InputEnumeratorBase<ValueType, IsConst> > CASM::InputEnumerator< ValueType, IsConst >::ptr

Definition at line 276 of file InputEnumerator.hh.


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