CASM
AClustersApproachtoStatisticalMechanics
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules
CASM::InputEnumIteratorBase< ValueType, IsConst > Class Template Reference

#include <InputEnumerator.hh>

+ Inheritance diagram for CASM::InputEnumIteratorBase< ValueType, IsConst >:

Detailed Description

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

Definition at line 18 of file InputEnumerator.hh.

Public Types

typedef ValueType value_type
 
typedef ValEnumerator
< ValueType, IsConst >
::reference 
reference
 
typedef EnumeratorBase::step_type step_type
 

Public Member Functions

 InputEnumIteratorBase ()
 
 InputEnumIteratorBase (InputEnumeratorBase< ValueType, IsConst > &enumerator, bool is_end)
 
virtual ~InputEnumIteratorBase ()
 
virtual step_type step () const override
 
virtual bool is_end () const override
 
std::unique_ptr
< InputEnumIteratorBase
clone () const
 
jsonParser source () const
 
std::string name () const
 Uses enumerator class 'name' implementation. More...
 

Protected Member Functions

bool _constructed_as_end () const
 
void _assert_same_ptr (const EnumIteratorBase &other) const
 
void _assert_ptr () const
 
void _assert_valid () const
 
bool equal (const EnumIteratorBase &other) const
 boost::iterator_facade implementation More...
 
EnumeratorBase_enum_ptr ()
 
EnumeratorBase_enum_ptr () const
 

Private Member Functions

virtual InputEnumIteratorBase
< ValueType, IsConst > * 
_clone () const override
 
virtual reference dereference () const override
 boost::iterator_facade implementation More...
 
virtual void increment ()
 boost::iterator_facade implementation More...
 
InputEnumeratorBase< ValueType,
IsConst > & 
_enum ()
 static_cast enumerator pointer to InputEnumeratorBase& More...
 
InputEnumeratorBase< ValueType,
IsConst > & 
_enum () const
 static_cast enumerator pointer to InputEnumeratorBase& More...
 

Private Attributes

friend InputEnumIterator< ValueType, IsConst >
 
bool m_constructed_as_end
 

Member Typedef Documentation

template<typename ValueType, bool IsConst = true>
typedef ValEnumerator<ValueType, IsConst>::reference CASM::ValEnumIterator< ValueType, IsConst >::reference
inherited

Definition at line 362 of file Enumerator.hh.

template<typename ValueType, bool IsConst = true>
typedef EnumeratorBase::step_type CASM::EnumIteratorBase::step_type
inherited

Definition at line 259 of file Enumerator.hh.

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

Definition at line 361 of file Enumerator.hh.

Constructor & Destructor Documentation

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

Definition at line 29 of file InputEnumerator.hh.

template<typename ValueType, bool IsConst = true>
CASM::InputEnumIteratorBase< ValueType, IsConst >::InputEnumIteratorBase ( InputEnumeratorBase< ValueType, IsConst > &  enumerator,
bool  is_end 
)
inline

Definition at line 31 of file InputEnumerator.hh.

template<typename ValueType, bool IsConst = true>
virtual CASM::InputEnumIteratorBase< ValueType, IsConst >::~InputEnumIteratorBase ( )
inlinevirtual

Definition at line 34 of file InputEnumerator.hh.

Member Function Documentation

void CASM::EnumIteratorBase::_assert_ptr ( ) const
inlineprotectedinherited

Definition at line 303 of file Enumerator.hh.

void CASM::EnumIteratorBase::_assert_same_ptr ( const EnumIteratorBase other) const
inlineprotectedinherited

Definition at line 298 of file Enumerator.hh.

void CASM::EnumIteratorBase::_assert_valid ( ) const
inlineprotectedinherited

Definition at line 307 of file Enumerator.hh.

template<typename ValueType, bool IsConst = true>
virtual InputEnumIteratorBase<ValueType, IsConst>* CASM::InputEnumIteratorBase< ValueType, IsConst >::_clone ( ) const
inlineoverrideprivatevirtual
template<typename ValueType, bool IsConst = true>
bool CASM::InputEnumIteratorBase< ValueType, IsConst >::_constructed_as_end ( ) const
inlineprotected

Definition at line 68 of file InputEnumerator.hh.

template<typename ValueType, bool IsConst = true>
InputEnumeratorBase<ValueType, IsConst>& CASM::InputEnumIteratorBase< ValueType, IsConst >::_enum ( )
inlineprivate

static_cast enumerator pointer to InputEnumeratorBase&

Definition at line 89 of file InputEnumerator.hh.

template<typename ValueType, bool IsConst = true>
InputEnumeratorBase<ValueType, IsConst>& CASM::InputEnumIteratorBase< ValueType, IsConst >::_enum ( ) const
inlineprivate

static_cast enumerator pointer to InputEnumeratorBase&

Definition at line 94 of file InputEnumerator.hh.

EnumeratorBase* CASM::EnumIteratorBase::_enum_ptr ( )
inlineprotectedinherited

Definition at line 330 of file Enumerator.hh.

EnumeratorBase* CASM::EnumIteratorBase::_enum_ptr ( ) const
inlineprotectedinherited

Definition at line 334 of file Enumerator.hh.

template<typename ValueType, bool IsConst = true>
std::unique_ptr<InputEnumIteratorBase> CASM::InputEnumIteratorBase< ValueType, IsConst >::clone ( ) const
inline

Definition at line 61 of file InputEnumerator.hh.

template<typename ValueType, bool IsConst = true>
virtual reference CASM::InputEnumIteratorBase< ValueType, IsConst >::dereference ( ) const
inlineoverrideprivatevirtual

boost::iterator_facade implementation

Implements CASM::ValEnumIterator< ValueType, IsConst >.

Reimplemented in CASM::RandomAccessEnumIteratorBase< ValueType, IsConst >.

Definition at line 79 of file InputEnumerator.hh.

bool CASM::EnumIteratorBase::equal ( const EnumIteratorBase other) const
inlineprotectedinherited

boost::iterator_facade implementation

  • Uses 'is_end' implementation to check if both iterators are 'end'
  • If both are not end, then compares iterator 'step'

Definition at line 315 of file Enumerator.hh.

template<typename ValueType, bool IsConst = true>
virtual void CASM::InputEnumIteratorBase< ValueType, IsConst >::increment ( )
inlineprivatevirtual

boost::iterator_facade implementation

Reimplemented in CASM::RandomAccessEnumIteratorBase< ValueType, IsConst >.

Definition at line 84 of file InputEnumerator.hh.

template<typename ValueType, bool IsConst = true>
virtual bool CASM::InputEnumIteratorBase< ValueType, IsConst >::is_end ( ) const
inlineoverridevirtual

Check if end iterator

Returns true if:

  • Iterator was constructed as end iterator
  • Or, !InputEnumeratorBase->valid()
    • This means that the derived InputEnumerator class implementation must call _invalidate in the increment implementation if the end has been reached

Implements CASM::EnumIteratorBase.

Reimplemented in CASM::RandomAccessEnumIteratorBase< ValueType, IsConst >.

Definition at line 56 of file InputEnumerator.hh.

std::string CASM::EnumIteratorBase::name ( ) const
inlineinherited

Uses enumerator class 'name' implementation.

Definition at line 284 of file Enumerator.hh.

jsonParser CASM::EnumIteratorBase::source ( ) const
inlineinherited

Uses 'step' and enumerator class 'source' implementation

  • Only valid if iterator refers to valid object (not end)

Definition at line 279 of file Enumerator.hh.

template<typename ValueType, bool IsConst = true>
virtual step_type CASM::InputEnumIteratorBase< ValueType, IsConst >::step ( ) const
inlineoverridevirtual

Return current step number

  • Only valid if iterator refers to valid object (not end)

Implements CASM::EnumIteratorBase.

Reimplemented in CASM::RandomAccessEnumIteratorBase< ValueType, IsConst >.

Definition at line 43 of file InputEnumerator.hh.

Member Data Documentation

template<typename ValueType, bool IsConst = true>
friend CASM::InputEnumIteratorBase< ValueType, IsConst >::InputEnumIterator< ValueType, IsConst >
private

Definition at line 20 of file InputEnumerator.hh.

template<typename ValueType, bool IsConst = true>
bool CASM::InputEnumIteratorBase< ValueType, IsConst >::m_constructed_as_end
private

Definition at line 98 of file InputEnumerator.hh.


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