libMesh
Public Types | Public Member Functions | Private Attributes | List of all members
libMesh::mesh_inserter_iterator< T > Struct Template Reference

A class for templated methods that expect output iterator arguments, which adds objects to the Mesh. More...

#include <mesh_inserter_iterator.h>

Public Types

using iterator_category = std::output_iterator_tag
 
using value_type = T
 
using difference_type = std::ptrdiff_t
 
using pointer = T *
 
using reference = T &
 

Public Member Functions

 mesh_inserter_iterator (MeshBase &m)
 
void operator= (Elem *e)
 
void operator= (Node *n)
 
void operator= (Point *p)
 
mesh_inserter_iteratoroperator++ ()
 
mesh_inserter_iterator operator++ (int)
 
mesh_inserter_iteratoroperator* ()
 

Private Attributes

MeshBasemesh
 

Detailed Description

template<typename T>
struct libMesh::mesh_inserter_iterator< T >

A class for templated methods that expect output iterator arguments, which adds objects to the Mesh.

Although any mesh_inserter_iterator can add any object, we template it around object type so that type inference and iterator_traits will work. This class used to be intended for use with packed range methods in TIMPI. However, our packing routines now automatically add elements and nodes to the mesh, so this class is deprecated

Author
Roy Stogner
Date
2012

Definition at line 55 of file mesh_inserter_iterator.h.

Member Typedef Documentation

◆ difference_type

template<typename T >
using libMesh::mesh_inserter_iterator< T >::difference_type = std::ptrdiff_t

Definition at line 59 of file mesh_inserter_iterator.h.

◆ iterator_category

template<typename T >
using libMesh::mesh_inserter_iterator< T >::iterator_category = std::output_iterator_tag

Definition at line 57 of file mesh_inserter_iterator.h.

◆ pointer

template<typename T >
using libMesh::mesh_inserter_iterator< T >::pointer = T*

Definition at line 60 of file mesh_inserter_iterator.h.

◆ reference

template<typename T >
using libMesh::mesh_inserter_iterator< T >::reference = T&

Definition at line 61 of file mesh_inserter_iterator.h.

◆ value_type

template<typename T >
using libMesh::mesh_inserter_iterator< T >::value_type = T

Definition at line 58 of file mesh_inserter_iterator.h.

Constructor & Destructor Documentation

◆ mesh_inserter_iterator()

template<typename T >
libMesh::mesh_inserter_iterator< T >::mesh_inserter_iterator ( MeshBase m)
inline

Definition at line 63 of file mesh_inserter_iterator.h.

Referenced by libMesh::mesh_inserter_iterator< T >::operator++().

63 : mesh(m) { libmesh_deprecated(); }

Member Function Documentation

◆ operator*()

template<typename T >
mesh_inserter_iterator& libMesh::mesh_inserter_iterator< T >::operator* ( )
inline

Definition at line 85 of file mesh_inserter_iterator.h.

85 { return *this; }

◆ operator++() [1/2]

template<typename T >
mesh_inserter_iterator& libMesh::mesh_inserter_iterator< T >::operator++ ( )
inline

Definition at line 71 of file mesh_inserter_iterator.h.

72  {
73  return *this;
74  }

◆ operator++() [2/2]

template<typename T >
mesh_inserter_iterator libMesh::mesh_inserter_iterator< T >::operator++ ( int  )
inline

◆ operator=() [1/3]

template<typename T >
void libMesh::mesh_inserter_iterator< T >::operator= ( Elem e)
inline

Definition at line 65 of file mesh_inserter_iterator.h.

References libMesh::MeshBase::add_elem(), and libMesh::mesh_inserter_iterator< T >::mesh.

65 { mesh.add_elem(e); }
virtual Elem * add_elem(Elem *e)=0
Add elem e to the end of the element array.

◆ operator=() [2/3]

template<typename T >
void libMesh::mesh_inserter_iterator< T >::operator= ( Node n)
inline

Definition at line 67 of file mesh_inserter_iterator.h.

References libMesh::MeshBase::insert_node(), and libMesh::mesh_inserter_iterator< T >::mesh.

67 { mesh.insert_node(n); }
virtual Node * insert_node(Node *n)=0
This method is deprecated.

◆ operator=() [3/3]

template<typename T >
void libMesh::mesh_inserter_iterator< T >::operator= ( Point p)
inline

Definition at line 69 of file mesh_inserter_iterator.h.

References libMesh::MeshBase::add_point(), and libMesh::mesh_inserter_iterator< T >::mesh.

69 { mesh.add_point(*p); }
virtual Node * add_point(const Point &p, const dof_id_type id=DofObject::invalid_id, const processor_id_type proc_id=DofObject::invalid_processor_id)=0
Add a new Node at Point p to the end of the vertex array, with processor_id procid.

Member Data Documentation

◆ mesh

template<typename T >
MeshBase& libMesh::mesh_inserter_iterator< T >::mesh
private

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