Poster of Linux kernelThe best gift for a Linux geek
MeshBase::element_iterator

MeshBase::element_iterator

Section: C Library Functions (3) Updated: Thu Apr 7 2011
Local index Up
 

NAME

MeshBase::element_iterator -  

SYNOPSIS


#include <mesh_base.h>

Inherits variant_filter_iterator< MeshBase::Predicate, Elem * >.  

Public Types


typedef variant_filter_iterator< MeshBase::Predicate, Elem *, Elem *&, Elem ** > Iterator
 

Public Member Functions


template<typename PredType , typename IterType > element_iterator (const IterType &d, const IterType &e, const PredType &p)

Elem *& operator* () const

Elem ** operator-> () const

Iterator & operator++ ()

const Iterator operator++ (int)

bool equal (const variant_filter_iterator &other) const

void swap (Iterator &lhs, Iterator &rhs)
 

Public Attributes


IterBase * data

IterBase * end

PredBase * pred
 

Detailed Description

The definition of the element_iterator struct.

Definition at line 763 of file mesh_base.h.  

Member Typedef Documentation

 

typedef variant_filter_iterator<MeshBase::Predicate , Elem * , Elem * & , Elem * * > variant_filter_iterator< MeshBase::Predicate , Elem * , Elem * & , Elem * * >::Iterator [inherited]Shortcut name for the fully-qualified typename.

Definition at line 49 of file variant_filter_iterator.h.  

Constructor & Destructor Documentation

 

template<typename PredType , typename IterType > MeshBase::element_iterator::element_iterator (const IterType &d, const IterType &e, const PredType &p) [inline]

Definition at line 770 of file mesh_base.h.

                                        :
    variant_filter_iterator<MeshBase::Predicate,
                            Elem*>(d,e,p) {}
 

Member Function Documentation

 

bool variant_filter_iterator< MeshBase::Predicate , Elem * , Elem * & , Elem * * >::equal (const variant_filter_iterator< MeshBase::Predicate, Elem * > &other) const [inline, inherited]forwards on the the equal function defined for the IterBase pointer. Possibly also compare the end pointers, but this is usually not important and would require an additional dynamic_cast.

Definition at line 442 of file variant_filter_iterator.h.

References variant_filter_iterator< Predicate, Type, ReferenceType, PointerType >::data, and variant_filter_iterator< Predicate, Type, ReferenceType, PointerType >::IterBase::equal().

  {
    return data->equal(other.data);
  }
 

Elem * & variant_filter_iterator< MeshBase::Predicate , Elem * , Elem * & , Elem * * >::operator* () const [inline, inherited]unary op*() forwards on to Iter::op*()

Definition at line 401 of file variant_filter_iterator.h.

References variant_filter_iterator< Predicate, Type, ReferenceType, PointerType >::data.

  {
    return **data;
  }
 

const Iterator variant_filter_iterator< MeshBase::Predicate , Elem * , Elem * & , Elem * * >::operator++ (int) [inline, inherited]postfix op++(), creates a temporary!

Definition at line 428 of file variant_filter_iterator.h.

References variant_filter_iterator< Predicate, Type, ReferenceType, PointerType >::data, and variant_filter_iterator< Predicate, Type, ReferenceType, PointerType >::satisfy_predicate().

  {
    Iterator oldValue(*this); // standard is to return old value
    ++*data;
    this->satisfy_predicate();
    return oldValue;
  }
 

Iterator& variant_filter_iterator< MeshBase::Predicate , Elem * , Elem * & , Elem * * >::operator++ () [inline, inherited]op++() forwards on to Iter::op++()

Definition at line 418 of file variant_filter_iterator.h.

References variant_filter_iterator< Predicate, Type, ReferenceType, PointerType >::data, and variant_filter_iterator< Predicate, Type, ReferenceType, PointerType >::satisfy_predicate().

  {
    ++*data;
    this->satisfy_predicate();
    return (*this);
  }
 

Elem * * variant_filter_iterator< MeshBase::Predicate , Elem * , Elem * & , Elem * * >::operator-> () const [inline, inherited]op->()

Definition at line 410 of file variant_filter_iterator.h.

  {
    return (&**this);
  }
 

void variant_filter_iterator< MeshBase::Predicate , Elem * , Elem * & , Elem * * >::swap (Iterator &lhs, Iterator &rhs) [inline, inherited]swap, used to implement op=

Definition at line 450 of file variant_filter_iterator.h.

References variant_filter_iterator< Predicate, Type, ReferenceType, PointerType >::data, variant_filter_iterator< Predicate, Type, ReferenceType, PointerType >::end, variant_filter_iterator< Predicate, Type, ReferenceType, PointerType >::pred, and variant_filter_iterator< Predicate, Type, ReferenceType, PointerType >::swap().

  {
    // Swap the data pointers
    std::swap (lhs.data, rhs.data);

    // Swap the end pointers
    std::swap (lhs.end, rhs.end);

    // Also swap the predicate objects.
    std::swap (lhs.pred, rhs.pred);
  }
 

Member Data Documentation

 

IterBase* variant_filter_iterator< MeshBase::Predicate , Elem * , Elem * & , Elem * * >::data [inherited]Ideally this private member data should have protected access. However, if we want a const_iterator to be constructable from an non-const one, templated versions of the same class (not related by inheritance) will need to know about these private members. Thus, they have public access.

Polymorphic pointer to the object. Don't confuse with the data pointer located in the Iter!

Definition at line 310 of file variant_filter_iterator.h.  

IterBase* variant_filter_iterator< MeshBase::Predicate , Elem * , Elem * & , Elem * * >::end [inherited]Also have a polymorphic pointer to the end object, this prevents iterating past the end.

Definition at line 316 of file variant_filter_iterator.h.  

PredBase* variant_filter_iterator< MeshBase::Predicate , Elem * , Elem * & , Elem * * >::pred [inherited]The predicate object. Must have op() capable of operating on IterBase* pointers. Therefore it has to follow the same paradigm as IterBase.

Definition at line 323 of file variant_filter_iterator.h.

 

Author

Generated automatically by Doxygen for libMesh from the source code.


 

Index

NAME
SYNOPSIS
Public Types
Public Member Functions
Public Attributes
Detailed Description
Member Typedef Documentation
typedef variant_filter_iterator<MeshBase::Predicate , Elem * , Elem * & , Elem * * > variant_filter_iterator< MeshBase::Predicate , Elem * , Elem * & , Elem * * >::Iterator [inherited]Shortcut name for the fully-qualified typename.
Constructor & Destructor Documentation
template<typename PredType , typename IterType > MeshBase::element_iterator::element_iterator (const IterType &d, const IterType &e, const PredType &p) [inline]
Member Function Documentation
bool variant_filter_iterator< MeshBase::Predicate , Elem * , Elem * & , Elem * * >::equal (const variant_filter_iterator< MeshBase::Predicate, Elem * > &other) const [inline, inherited]forwards on the the equal function defined for the IterBase pointer. Possibly also compare the end pointers, but this is usually not important and would require an additional dynamic_cast.
Elem * & variant_filter_iterator< MeshBase::Predicate , Elem * , Elem * & , Elem * * >::operator* () const [inline, inherited]unary op*() forwards on to Iter::op*()
const Iterator variant_filter_iterator< MeshBase::Predicate , Elem * , Elem * & , Elem * * >::operator++ (int) [inline, inherited]postfix op++(), creates a temporary!
Iterator& variant_filter_iterator< MeshBase::Predicate , Elem * , Elem * & , Elem * * >::operator++ () [inline, inherited]op++() forwards on to Iter::op++()
Elem * * variant_filter_iterator< MeshBase::Predicate , Elem * , Elem * & , Elem * * >::operator-> () const [inline, inherited]op->()
void variant_filter_iterator< MeshBase::Predicate , Elem * , Elem * & , Elem * * >::swap (Iterator &lhs, Iterator &rhs) [inline, inherited]swap, used to implement op=
Member Data Documentation
IterBase* variant_filter_iterator< MeshBase::Predicate , Elem * , Elem * & , Elem * * >::data [inherited]Ideally this private member data should have protected access. However, if we want a const_iterator to be constructable from an non-const one, templated versions of the same class (not related by inheritance) will need to know about these private members. Thus, they have public access.
IterBase* variant_filter_iterator< MeshBase::Predicate , Elem * , Elem * & , Elem * * >::end [inherited]Also have a polymorphic pointer to the end object, this prevents iterating past the end.
PredBase* variant_filter_iterator< MeshBase::Predicate , Elem * , Elem * & , Elem * * >::pred [inherited]The predicate object. Must have op() capable of operating on IterBase* pointers. Therefore it has to follow the same paradigm as IterBase.
Author

This document was created by man2html, using the manual pages.
Time: 21:50:10 GMT, April 16, 2011