CASM
AClustersApproachtoStatisticalMechanics
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules
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 277 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

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

Definition at line 284 of file InputEnumerator.hh.

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

Definition at line 283 of file InputEnumerator.hh.

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

Definition at line 281 of file InputEnumerator.hh.

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

Definition at line 282 of file InputEnumerator.hh.

Constructor & Destructor Documentation

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

Definition at line 287 of file InputEnumerator.hh.

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

Definition at line 289 of file InputEnumerator.hh.

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

Member Function Documentation

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

Definition at line 320 of file InputEnumerator.hh.

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

Access the current ObjectType by reference.

Definition at line 316 of file InputEnumerator.hh.

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

Definition at line 324 of file InputEnumerator.hh.

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

Derived enumerators must implement name.

Definition at line 311 of file InputEnumerator.hh.

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

Definition at line 306 of file InputEnumerator.hh.

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

Increments with each enumerated object.

Definition at line 297 of file InputEnumerator.hh.

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

Returns false if enumeration is complete.

Definition at line 302 of file InputEnumerator.hh.

Member Data Documentation

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

Definition at line 328 of file InputEnumerator.hh.


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