Wildmeshing Toolkit
wmtk::attribute::CachingAccessor< T, Dim > Class Template Reference

An accessor for cached attribute values. More...

#include <CachingAccessor.hpp>

Inheritance diagram for wmtk::attribute::CachingAccessor< T, Dim >:
[legend]
Collaboration diagram for wmtk::attribute::CachingAccessor< T, Dim >:
[legend]

Public Types

using Scalar = T
 
using BaseType = AccessorBase< T, Dim >
 
template<int D = Dim>
using ConstMapResult = typename BaseType::template ConstMapResult< D >
 
template<int D = Dim>
using MapResult = typename BaseType::template MapResult< D >
 
- Public Types inherited from wmtk::attribute::AccessorBase< T, Eigen::Dynamic >
using T = T
 
using MeshAttributesType = MeshAttributes< T >
 
using AttributeType = Attribute< T >
 
using MapResult = internal::MapResult< T, D >
 
using ConstMapResult = internal::ConstMapResult< T, D >
 

Public Member Functions

 CachingAccessor (Mesh &m, const TypedAttributeHandle< T > &handle)
 
 CachingAccessor (const Mesh &m, const TypedAttributeHandle< T > &handle)
 
 ~CachingAccessor ()
 
 CachingAccessor (const CachingAccessor &)=delete
 
CachingAccessoroperator= (const CachingAccessor &)=delete
 
 CachingAccessor (CachingAccessor &&)=default
 
CachingAccessoroperator= (CachingAccessor &&)=default
 
int64_t stack_depth () const
 
bool has_stack () const
 
template<int D = Dim>
ConstMapResult< D > const_vector_attribute (const int64_t index) const
 
T const_scalar_attribute (const int64_t index) const
 
T const_scalar_attribute (const int64_t index, const int8_t offset) const
 
template<int D = Dim>
MapResult< D > vector_attribute (const int64_t index)
 
Tscalar_attribute (const int64_t index)
 
Tscalar_attribute (const int64_t index, const int8_t offset)
 
ConstMapResult vector_attribute (const int64_t index) const
 
T scalar_attribute (const int64_t index) const
 
bool writing_enabled () const
 
template<int D>
auto vector_attribute (const int64_t index) -> MapResult< D >
 
template<int D>
auto const_vector_attribute (const int64_t index) const -> ConstMapResult< D >
 
Attribute< T > & attribute ()
 
const Attribute< T > & attribute () const
 
Meshmesh ()
 
const Meshmesh () const
 
- Public Member Functions inherited from wmtk::attribute::AccessorBase< T, Eigen::Dynamic >
int64_t reserved_size () const
 
int64_t dimension () const
 
const Tdefault_value () const
 
void set_attribute (std::vector< T > value)
 
ConstMapResult< D > const_vector_attribute (const int64_t index) const
 
auto const_vector_attribute (const int64_t index) const -> ConstMapResult< D >
 
MapResult< D > vector_attribute (const int64_t index)
 
auto vector_attribute (const int64_t index) -> MapResult< D >
 
T const_scalar_attribute (const int64_t index) const
 
T const_scalar_attribute (const int64_t index, const int8_t offset) const
 
Tscalar_attribute (const int64_t index)
 
Tscalar_attribute (const int64_t index, const int8_t offset)
 
MeshAttributes< T > & attributes ()
 
const MeshAttributes< T > & attributes () const
 
Attribute< T > & attribute ()
 
const Attribute< T > & attribute () const
 
 ~AccessorBase ()
 
 AccessorBase (Mesh &m, const TypedAttributeHandle< T > &handle)
 
 AccessorBase (const Mesh &m, const TypedAttributeHandle< T > &handle)
 
MeshAttributeHandle handle () const
 
const TypedAttributeHandle< T > & typed_handle () const
 
PrimitiveType primitive_type () const
 
Meshmesh ()
 
const Meshmesh () const
 

Protected Member Functions

BaseTypebase_type ()
 
const BaseTypebase_type () const
 
- Protected Member Functions inherited from wmtk::attribute::AccessorBase< T, Eigen::Dynamic >
const AttributeManagerattribute_manager () const
 
AttributeManagerattribute_manager ()
 

Private Attributes

internal::AttributeTransactionStack< T > & m_cache_stack
 

Friends

class wmtk::Mesh
 
class wmtk::TetMesh
 
class wmtk::TriMesh
 

Additional Inherited Members

- Protected Attributes inherited from wmtk::attribute::AccessorBase< T, Eigen::Dynamic >
TypedAttributeHandle< Tm_handle
 
Meshm_mesh
 
Attribute< T > & m_attribute
 

Detailed Description

template<typename T, int Dim = Eigen::Dynamic>
class wmtk::attribute::CachingAccessor< T, Dim >

An accessor for cached attribute values.

This accessor or any of its derivatives should be used for accessing attributes.

Definition at line 19 of file CachingAccessor.hpp.

Member Typedef Documentation

◆ BaseType

template<typename T , int Dim = Eigen::Dynamic>
using wmtk::attribute::CachingAccessor< T, Dim >::BaseType = AccessorBase<T, Dim>

Definition at line 27 of file CachingAccessor.hpp.

◆ ConstMapResult

template<typename T , int Dim = Eigen::Dynamic>
template<int D = Dim>
using wmtk::attribute::CachingAccessor< T, Dim >::ConstMapResult = typename BaseType::template ConstMapResult<D>

Definition at line 30 of file CachingAccessor.hpp.

◆ MapResult

template<typename T , int Dim = Eigen::Dynamic>
template<int D = Dim>
using wmtk::attribute::CachingAccessor< T, Dim >::MapResult = typename BaseType::template MapResult<D>

Definition at line 33 of file CachingAccessor.hpp.

◆ Scalar

template<typename T , int Dim = Eigen::Dynamic>
using wmtk::attribute::CachingAccessor< T, Dim >::Scalar = T

Definition at line 25 of file CachingAccessor.hpp.

Constructor & Destructor Documentation

◆ CachingAccessor() [1/4]

template<typename T , int Dim>
wmtk::attribute::CachingAccessor< T, Dim >::CachingAccessor ( Mesh m,
const TypedAttributeHandle< T > &  handle 
)
inline

Definition at line 11 of file CachingAccessor.hxx.

◆ CachingAccessor() [2/4]

template<typename T , int Dim>
wmtk::attribute::CachingAccessor< T, Dim >::CachingAccessor ( const Mesh m,
const TypedAttributeHandle< T > &  handle 
)

Definition at line 18 of file CachingAccessor.hxx.

◆ ~CachingAccessor()

template<typename T , int Dim>
wmtk::attribute::CachingAccessor< T, Dim >::~CachingAccessor ( )
inlinedefault

◆ CachingAccessor() [3/4]

template<typename T , int Dim = Eigen::Dynamic>
wmtk::attribute::CachingAccessor< T, Dim >::CachingAccessor ( const CachingAccessor< T, Dim > &  )
delete

◆ CachingAccessor() [4/4]

template<typename T , int Dim = Eigen::Dynamic>
wmtk::attribute::CachingAccessor< T, Dim >::CachingAccessor ( CachingAccessor< T, Dim > &&  )
default

Member Function Documentation

◆ attribute() [1/2]

template<typename T , int Dim = Eigen::Dynamic>
auto wmtk::attribute::AccessorBase< T, Dim >::attribute
inline

Definition at line 66 of file AccessorBase.hxx.

◆ attribute() [2/2]

template<typename T , int Dim = Eigen::Dynamic>
auto wmtk::attribute::AccessorBase< T, Dim >::attribute
inline

Definition at line 67 of file AccessorBase.hxx.

◆ base_type() [1/2]

template<typename T , int Dim = Eigen::Dynamic>
BaseType& wmtk::attribute::CachingAccessor< T, Dim >::base_type ( )
inlineprotected

Definition at line 81 of file CachingAccessor.hpp.

◆ base_type() [2/2]

template<typename T , int Dim = Eigen::Dynamic>
const BaseType& wmtk::attribute::CachingAccessor< T, Dim >::base_type ( ) const
inlineprotected

Definition at line 82 of file CachingAccessor.hpp.

◆ const_scalar_attribute() [1/2]

template<typename T , int Dim>
auto wmtk::attribute::CachingAccessor< T, Dim >::const_scalar_attribute ( const int64_t  index) const
inline

Definition at line 69 of file CachingAccessor.hxx.

Referenced by wmtk::Mesh::get_all(), wmtk::Mesh::get_all_id_simplex(), wmtk::TetMesh::is_connectivity_valid(), wmtk::TriMesh::is_connectivity_valid(), wmtk::EdgeMesh::is_connectivity_valid(), and wmtk::EdgeMesh::vertex_tuple_from_id().

Here is the caller graph for this function:

◆ const_scalar_attribute() [2/2]

template<typename T , int Dim>
auto wmtk::attribute::CachingAccessor< T, Dim >::const_scalar_attribute ( const int64_t  index,
const int8_t  offset 
) const
inline

Definition at line 93 of file CachingAccessor.hxx.

◆ const_vector_attribute() [1/2]

template<typename T , int Dim = Eigen::Dynamic>
template<int D = Dim>
ConstMapResult<D> wmtk::attribute::CachingAccessor< T, Dim >::const_vector_attribute ( const int64_t  index) const

Referenced by wmtk::TetMesh::is_connectivity_valid(), wmtk::TriMesh::is_connectivity_valid(), wmtk::EdgeMesh::is_connectivity_valid(), wmtk::EdgeMesh::switch_tuple(), wmtk::EdgeMesh::tuple_from_global_ids(), and wmtk::EdgeMesh::vertex_tuple_from_id().

Here is the caller graph for this function:

◆ const_vector_attribute() [2/2]

template<typename T , int Dim = Eigen::Dynamic>
template<int D>
auto wmtk::attribute::CachingAccessor< T, Dim >::const_vector_attribute ( const int64_t  index) const -> ConstMapResult<D>
inline

Definition at line 61 of file CachingAccessor.hxx.

◆ has_stack()

template<typename T , int Dim>
bool wmtk::attribute::CachingAccessor< T, Dim >::has_stack
inline

Definition at line 27 of file CachingAccessor.hxx.

◆ mesh() [1/2]

template<typename T , int Dim = Eigen::Dynamic>
Mesh & wmtk::attribute::AccessorBase< T, Dim >::mesh
inline

Definition at line 78 of file AccessorBase.hxx.

◆ mesh() [2/2]

template<typename T , int Dim = Eigen::Dynamic>
const Mesh & wmtk::attribute::AccessorBase< T, Dim >::mesh
inline

Definition at line 79 of file AccessorBase.hxx.

◆ operator=() [1/2]

template<typename T , int Dim = Eigen::Dynamic>
CachingAccessor& wmtk::attribute::CachingAccessor< T, Dim >::operator= ( CachingAccessor< T, Dim > &&  )
default

◆ operator=() [2/2]

template<typename T , int Dim = Eigen::Dynamic>
CachingAccessor& wmtk::attribute::CachingAccessor< T, Dim >::operator= ( const CachingAccessor< T, Dim > &  )
delete

◆ scalar_attribute() [1/3]

template<typename T , int Dim>
auto wmtk::attribute::CachingAccessor< T, Dim >::scalar_attribute ( const int64_t  index)
inline

Definition at line 54 of file CachingAccessor.hxx.

Referenced by wmtk::Mesh::consolidate(), wmtk::EdgeMesh::initialize(), wmtk::TriMesh::initialize(), wmtk::TetMesh::initialize(), wmtk::PointMesh::initialize(), and wmtk::Mesh::request_simplex_indices().

Here is the caller graph for this function:

◆ scalar_attribute() [2/3]

template<typename T , int Dim>
T wmtk::attribute::CachingAccessor< T, Dim >::scalar_attribute ( const int64_t  index) const
inline

Definition at line 80 of file CachingAccessor.hxx.

◆ scalar_attribute() [3/3]

template<typename T , int Dim>
auto wmtk::attribute::CachingAccessor< T, Dim >::scalar_attribute ( const int64_t  index,
const int8_t  offset 
)
inline

Definition at line 86 of file CachingAccessor.hxx.

◆ stack_depth()

template<typename T , int Dim>
int64_t wmtk::attribute::CachingAccessor< T, Dim >::stack_depth
inline

Definition at line 39 of file CachingAccessor.hxx.

◆ vector_attribute() [1/3]

template<typename T , int Dim = Eigen::Dynamic>
template<int D = Dim>
MapResult<D> wmtk::attribute::CachingAccessor< T, Dim >::vector_attribute ( const int64_t  index)

Referenced by wmtk::EdgeMesh::initialize(), and wmtk::TriMesh::initialize().

Here is the caller graph for this function:

◆ vector_attribute() [2/3]

template<typename T , int Dim = Eigen::Dynamic>
template<int D>
auto wmtk::attribute::CachingAccessor< T, Dim >::vector_attribute ( const int64_t  index) -> MapResult<D>
inline

Definition at line 46 of file CachingAccessor.hxx.

◆ vector_attribute() [3/3]

template<typename T , int Dim>
auto wmtk::attribute::CachingAccessor< T, Dim >::vector_attribute ( const int64_t  index) const
inline

Definition at line 75 of file CachingAccessor.hxx.

◆ writing_enabled()

template<typename T , int Dim>
bool wmtk::attribute::CachingAccessor< T, Dim >::writing_enabled
inline

Definition at line 33 of file CachingAccessor.hxx.

Friends And Related Function Documentation

◆ wmtk::Mesh

template<typename T , int Dim = Eigen::Dynamic>
friend class wmtk::Mesh
friend

Definition at line 22 of file CachingAccessor.hpp.

◆ wmtk::TetMesh

template<typename T , int Dim = Eigen::Dynamic>
friend class wmtk::TetMesh
friend

Definition at line 23 of file CachingAccessor.hpp.

◆ wmtk::TriMesh

template<typename T , int Dim = Eigen::Dynamic>
friend class wmtk::TriMesh
friend

Definition at line 24 of file CachingAccessor.hpp.

Member Data Documentation

◆ m_cache_stack

template<typename T , int Dim = Eigen::Dynamic>
internal::AttributeTransactionStack<T>& wmtk::attribute::CachingAccessor< T, Dim >::m_cache_stack
private

Definition at line 85 of file CachingAccessor.hpp.


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