Develop Biology
The language of life
|
#include <SmartIterator.h>
Public Member Functions | |
SmartIterator (const Container *container) | |
SmartIterator (const Container *container, Index index) | |
~SmartIterator () | |
template<typename T > | |
T | As () |
template<typename T > | |
const T | As () const |
Iterator * | GetImplementation () |
const Iterator * | GetImplementation () const |
Index | GetIndex () const |
bool | IsAtBeginning () const |
bool | IsAtEnd () const |
bool | MoveTo (Index index) const |
template<typename T > | |
operator const T () const | |
template<typename T > | |
operator T () | |
virtual ByteStream | operator* () |
virtual const ByteStream | operator* () const |
SmartIterator & | operator++ () const |
SmartIterator | operator++ (int) const |
SmartIterator & | operator-- () const |
SmartIterator | operator-- (int) const |
Protected Attributes | |
Iterator * | m_implementation |
SmartIterators wrap our iterator interface to provide a consistent means of access. Everything is const so that we don't need to worry about const_iterator vs iterator nonsense.
Definition at line 36 of file SmartIterator.h.
bio::SmartIterator::SmartIterator | ( | const Container * | container | ) |
Sets m_index to container->GetEndIndex().
container |
Definition at line 28 of file SmartIterator.cpp.
container | |
index |
Definition at line 35 of file SmartIterator.cpp.
bio::SmartIterator::~SmartIterator | ( | ) |
|
inline |
Convenient casting wrapper.
T |
Definition at line 110 of file SmartIterator.h.
|
inline |
Convenient casting wrapper.
T |
Definition at line 121 of file SmartIterator.h.
Iterator * bio::SmartIterator::GetImplementation | ( | ) |
Definition at line 50 of file SmartIterator.cpp.
References m_implementation.
const Iterator * bio::SmartIterator::GetImplementation | ( | ) | const |
Definition at line 55 of file SmartIterator.cpp.
References m_implementation.
Index bio::SmartIterator::GetIndex | ( | ) | const |
Definition at line 60 of file SmartIterator.cpp.
References bio::Iterator::GetIndex(), and m_implementation.
Referenced by bio::Container::Access(), bio::Container::Erase(), and bio::chemical::LinearMotif< CONTENT_TYPE >::InsertImplementation().
bool bio::SmartIterator::IsAtBeginning | ( | ) | const |
Definition at line 70 of file SmartIterator.cpp.
References bio::Iterator::IsAtBeginning(), and m_implementation.
Referenced by bio::molecular::Surface::~Surface(), bio::Container::AsVector(), bio::chemical::Atom::Attenuate(), bio::chemical::Atom::Disattenuate(), bio::chemical::Atom::GetBondPosition(), bio::chemical::UnorderedMotif< CONTENT_TYPE >::GetNumMatchingImplementation(), bio::chemical::UnorderedStructureInterface::ImportAll(), bio::chemical::LinearMotif< CONTENT_TYPE >::InsertImplementation(), bio::molecular::Surface::Release(), and bio::molecular::Surface::ReleaseAll().
bool bio::SmartIterator::IsAtEnd | ( | ) | const |
Definition at line 75 of file SmartIterator.cpp.
References bio::Iterator::IsAtEnd(), and m_implementation.
Referenced by bio::organic::Habitat::AdaptInhabitants(), bio::cellular::Tissue::DifferentiateCells(), bio::genetic::Expressor::ExpressGenes(), bio::chemical::LinearMotif< CONTENT_TYPE >::GetStringFromImplementation(), bio::chemical::UnorderedMotif< CONTENT_TYPE >::GetStringFromImplementation(), bio::organic::Organism::Morphogenesis(), bio::cellular::OrganSystem::Organogenesis(), bio::molecular::Pathway::Process(), bio::chemical::Axis::Rotate(), and bio::cellular::Organ::SpecializeTissues().
bool bio::SmartIterator::MoveTo | ( | Index | index | ) | const |
Make *this point somewhere else;
index |
Definition at line 65 of file SmartIterator.cpp.
References m_implementation, and bio::Iterator::MoveTo().
|
inline |
Convenient casting wrapper.
T |
Definition at line 143 of file SmartIterator.h.
|
inline |
Convenient casting wrapper.
T |
Definition at line 132 of file SmartIterator.h.
|
virtual |
Dereferencing gives the datum *this is currently pointing to.
Definition at line 80 of file SmartIterator.cpp.
References m_implementation.
|
virtual |
Dereferencing gives the datum *this is currently pointing to.
Definition at line 85 of file SmartIterator.cpp.
References m_implementation.
SmartIterator & bio::SmartIterator::operator++ | ( | ) | const |
Definition at line 90 of file SmartIterator.cpp.
References bio::Iterator::Increment(), and m_implementation.
SmartIterator bio::SmartIterator::operator++ | ( | int | ) | const |
Definition at line 96 of file SmartIterator.cpp.
References bio::Iterator::Increment(), and m_implementation.
SmartIterator & bio::SmartIterator::operator-- | ( | ) | const |
Definition at line 103 of file SmartIterator.cpp.
References bio::Iterator::Decrement(), and m_implementation.
SmartIterator bio::SmartIterator::operator-- | ( | int | ) | const |
Definition at line 109 of file SmartIterator.cpp.
References bio::Iterator::Decrement(), and m_implementation.
|
mutableprotected |
Whatever. Make it mutable. I don't care.
Definition at line 172 of file SmartIterator.h.
Referenced by ~SmartIterator(), GetImplementation(), GetIndex(), IsAtBeginning(), IsAtEnd(), MoveTo(), operator*(), operator++(), and operator--().