Liebe Gitlab-Nutzer, lieber Gitlab-Nutzer, es ist nun möglich sich mittels des ZIH-Logins/LDAP an unserem Dienst anzumelden. Ein Anmelden über dieses erzeugt ein neues Konto. Das alte Konto ist über den Reiter "Standard" erreichbar. Die Administratoren

Dear Gitlab user, it is now possible to log in to our service using the ZIH login/LDAP. Logging in via this will create a new account. The old account can be accessed via the "Standard" tab. The administrators

Commit fed1a0df authored by Praetorius, Simon's avatar Praetorius, Simon
Browse files

const iterator for DOFVectors added

parent f950582e
......@@ -415,91 +415,5 @@ namespace Helpers {
} // end namespace Helpers
namespace AMDiS {
/** \ingroup DOFAdministration
* \brief
* Implements a DOFIterator for a DOFIndexed<T> object
*/
template<typename T>
class DOFConstIterator : public DOFIteratorBase
{
public:
/// Constructs a DOFIterator for cont of type t
DOFConstIterator(const DOFIndexed<T> *obj, DOFIteratorType t)
: DOFIteratorBase(dynamic_cast<DOFAdmin*>(obj->getFeSpace()->getAdmin()), t),
iteratedObject(obj)
{}
/// Constructs a DOFIterator for cont of type t
DOFConstIterator(DOFAdmin *admin,
const DOFIndexed<T> *obj,
DOFIteratorType t)
: DOFIteratorBase(admin, t),
iteratedObject(obj)
{}
/// Dereference operator
inline const T& operator*()
{
return *it;
}
/// Dereference operator
inline const T* operator->()
{
return &(*it);
}
inline bool operator!=(const DOFIterator<T>& rhs)
{
if (this->iteratedObject != rhs.iteratedObject)
return true;
if (this->it != rhs.it)
return true;
return false;
}
inline bool operator==(const DOFIterator<T>& rhs)
{
return !(this->operator==(rhs));
}
protected:
/// Implementation of DOFIteratorBase::goToBeginOfIteratedObject()
inline void goToBeginOfIteratedObject()
{
it = iteratedObject->begin();
}
/// Implementation of DOFIteratorBase::goToEndOfIteratedObject()
inline void goToEndOfIteratedObject()
{
it = iteratedObject->end();
}
/// Implementation of DOFIteratorBase::incObjectIterator()
inline void incObjectIterator()
{
++it;
}
/// Implementation of DOFIteratorBase::incObjectIterator()
inline void decObjectIterator()
{
--it;
}
protected:
/// Object that is iterated
const DOFIndexed<T> *iteratedObject;
/// Iterator for \ref iteratedObject
typename std::vector<T>::const_iterator it;
};
} // end namespace AMDiS
#endif // EXTENSIONS_HELPERS_H
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment