Wildmeshing Toolkit
wmtk::attribute::internal::AttributeTransactionStack< T > Class Template Reference

#include <AttributeTransactionStack.hpp>

Public Types

template<int D>
using MapResult = internal::MapResult< T, D >
 
template<int D>
using ConstMapResult = internal::ConstMapResult< T, D >
 

Public Member Functions

 AttributeTransactionStack ()
 
 ~AttributeTransactionStack ()
 
 AttributeTransactionStack (const AttributeTransactionStack &)=delete
 
AttributeTransactionStackoperator= (const AttributeTransactionStack &)=delete
 
 AttributeTransactionStack (AttributeTransactionStack &&)=default
 
AttributeTransactionStackoperator= (AttributeTransactionStack &&)=default
 
template<typename Derived >
void try_caching (int64_t index, const Eigen::MatrixBase< Derived > &value)
 
void try_caching (int64_t index, const T &value)
 
const T * get_value (int64_t index) const
 
void clear ()
 
int64_t size () const
 
void apply_to (Attribute< T > &attribute) const
 
void apply_to (const Attribute< T > &attribute, std::vector< T > &other) const
 
const std::vector< T > & buffer () const
 
const std::vector< std::pair< size_t, size_t > > & indices () const
 
size_t current_transaction_index ()
 
const std::vector< size_t > & transaction_starts () const
 
size_t buffer_end () const
 
size_t indices_end () const
 
bool empty () const
 
bool writing_enabled () const
 
template<int D = Eigen::Dynamic, int D2 = Eigen::Dynamic, int TrueD = D == Eigen::Dynamic ? D2 : D>
MapResult< TrueD > vector_attribute (AccessorBase< T, D2 > &accessor, int64_t index)
 default mutable vector access More...
 
template<int D = Eigen::Dynamic, int D2 = Eigen::Dynamic, int TrueD = D == Eigen::Dynamic ? D2 : D>
ConstMapResult< TrueD > const_vector_attribute (const AccessorBase< T, D2 > &accessor, int64_t index) const
 default immutable vector access More...
 
template<int D2>
T & scalar_attribute (AccessorBase< T, D2 > &accessor, int64_t index)
 default mutable scalar access More...
 
template<int D = Eigen::Dynamic>
const_scalar_attribute (const AccessorBase< T, D > &accessor, int64_t index) const
 default immutable scalar access More...
 
template<int D = Eigen::Dynamic>
const_scalar_attribute (const AccessorBase< T, D > &accessor, int64_t index, int8_t offset) const
 specialized immutable scalar access useful for topological operations More...
 
void emplace ()
 
void pop (Attribute< T > &attribute, bool preserve_changes)
 
void change_to_next_scope ()
 
void change_to_previous_scope ()
 
void change_to_current_scope ()
 
void rollback_current_scope (Attribute< T > &attr)
 
bool at_current_scope () const
 checks that we are viewing the active state of the attribute More...
 
size_t current_transaction_index () const
 
std::vector< std::pair< size_t, size_t > >::const_iterator transaction_start_begin (size_t scope_index) const
 
std::vector< std::pair< size_t, size_t > >::const_iterator final_transaction_end () const
 
std::vector< std::pair< size_t, size_t > >::const_reverse_iterator transaction_start_rend (size_t scope_index) const
 
std::vector< std::pair< size_t, size_t > >::const_reverse_iterator final_transaction_rbegin () const
 
void update_buffer_sizes_for_add (size_t data_size)
 
template<int D, int D2, int TrueD>
auto vector_attribute (AccessorBase< T, D2 > &accessor, int64_t index) -> MapResult< TrueD >
 
template<int D, int D2, int TrueD>
auto const_vector_attribute (const AccessorBase< T, D2 > &accessor, int64_t index) const -> ConstMapResult< TrueD >
 
template<int D2>
auto scalar_attribute (AccessorBase< T, D2 > &accessor, int64_t index) -> T &
 
template<int D2>
auto const_scalar_attribute (const AccessorBase< T, D2 > &accessor, int64_t index) const -> T
 
template<int D2>
auto const_scalar_attribute (const AccessorBase< T, D2 > &accessor, int64_t index, int8_t offset) const -> T
 

Protected Attributes

std::vector< T > m_buffer
 
std::vector< std::pair< size_t, size_t > > m_indices
 
size_t m_current_transaction_index = 0
 
std::vector< size_t > m_transaction_starts
 
size_t m_buffer_end
 
size_t m_indices_end
 

Private Member Functions

void apply_last_scope (Attribute< T > &attr)
 

Detailed Description

template<typename T>
class wmtk::attribute::internal::AttributeTransactionStack< T >

Definition at line 16 of file AttributeTransactionStack.hpp.

Member Typedef Documentation

◆ ConstMapResult

template<typename T >
template<int D>
using wmtk::attribute::internal::AttributeTransactionStack< T >::ConstMapResult = internal::ConstMapResult<T, D>

Definition at line 22 of file AttributeTransactionStack.hpp.

◆ MapResult

template<typename T >
template<int D>
using wmtk::attribute::internal::AttributeTransactionStack< T >::MapResult = internal::MapResult<T, D>

Definition at line 20 of file AttributeTransactionStack.hpp.

Constructor & Destructor Documentation

◆ AttributeTransactionStack() [1/3]

◆ ~AttributeTransactionStack()

◆ AttributeTransactionStack() [2/3]

◆ AttributeTransactionStack() [3/3]

Member Function Documentation

◆ apply_last_scope()

template<typename T >
void wmtk::attribute::internal::AttributeTransactionStack< T >::apply_last_scope ( Attribute< T > &  attr)
inlineprivate

Definition at line 160 of file AttributeTransactionStack.hxx.

◆ apply_to() [1/2]

template<typename T >
void wmtk::attribute::internal::AttributeTransactionStack< T >::apply_to ( Attribute< T > &  attribute) const
inline

◆ apply_to() [2/2]

template<typename T >
void wmtk::attribute::internal::AttributeTransactionStack< T >::apply_to ( const Attribute< T > &  attribute,
std::vector< T > &  other 
) const
inline

Definition at line 92 of file AttributeTransactionStack.hxx.

References wmtk::attribute::Attribute< T >::const_vector_attribute_from_start(), and wmtk::attribute::Attribute< T >::vector_attribute().

Here is the call graph for this function:

◆ at_current_scope()

template<typename T >
bool wmtk::attribute::internal::AttributeTransactionStack< T >::at_current_scope
inline

checks that we are viewing the active state of the attribute

Definition at line 189 of file AttributeTransactionStack.hxx.

◆ buffer()

template<typename T >
const std::vector<T>& wmtk::attribute::internal::AttributeTransactionStack< T >::buffer ( ) const
inline

◆ buffer_end()

template<typename T >
size_t wmtk::attribute::internal::AttributeTransactionStack< T >::buffer_end ( ) const
inline

◆ change_to_current_scope()

template<typename T >
void wmtk::attribute::internal::AttributeTransactionStack< T >::change_to_current_scope
inline

Definition at line 184 of file AttributeTransactionStack.hxx.

◆ change_to_next_scope()

template<typename T >
void wmtk::attribute::internal::AttributeTransactionStack< T >::change_to_next_scope
inline

Definition at line 176 of file AttributeTransactionStack.hxx.

◆ change_to_previous_scope()

template<typename T >
void wmtk::attribute::internal::AttributeTransactionStack< T >::change_to_previous_scope
inline

Definition at line 168 of file AttributeTransactionStack.hxx.

◆ clear()

template<typename T >
void wmtk::attribute::internal::AttributeTransactionStack< T >::clear
inline

Definition at line 23 of file AttributeTransactionStack.hxx.

◆ const_scalar_attribute() [1/4]

template<typename T >
template<int D = Eigen::Dynamic>
T wmtk::attribute::internal::AttributeTransactionStack< T >::const_scalar_attribute ( const AccessorBase< T, D > &  accessor,
int64_t  index 
) const

default immutable scalar access

◆ const_scalar_attribute() [2/4]

template<typename T >
template<int D = Eigen::Dynamic>
T wmtk::attribute::internal::AttributeTransactionStack< T >::const_scalar_attribute ( const AccessorBase< T, D > &  accessor,
int64_t  index,
int8_t  offset 
) const

specialized immutable scalar access useful for topological operations

◆ const_scalar_attribute() [3/4]

template<typename T >
template<int D2>
auto wmtk::attribute::internal::AttributeTransactionStack< T >::const_scalar_attribute ( const AccessorBase< T, D2 > &  accessor,
int64_t  index 
) const -> T
inline

Definition at line 244 of file AttributeTransactionStack.hpp.

◆ const_scalar_attribute() [4/4]

template<typename T >
template<int D2>
auto wmtk::attribute::internal::AttributeTransactionStack< T >::const_scalar_attribute ( const AccessorBase< T, D2 > &  accessor,
int64_t  index,
int8_t  offset 
) const -> T
inline

Definition at line 252 of file AttributeTransactionStack.hpp.

◆ const_vector_attribute() [1/2]

template<typename T >
template<int D = Eigen::Dynamic, int D2 = Eigen::Dynamic, int TrueD = D == Eigen::Dynamic ? D2 : D>
ConstMapResult<TrueD> wmtk::attribute::internal::AttributeTransactionStack< T >::const_vector_attribute ( const AccessorBase< T, D2 > &  accessor,
int64_t  index 
) const

default immutable vector access

◆ const_vector_attribute() [2/2]

template<typename T >
template<int D, int D2, int TrueD>
auto wmtk::attribute::internal::AttributeTransactionStack< T >::const_vector_attribute ( const AccessorBase< T, D2 > &  accessor,
int64_t  index 
) const -> ConstMapResult<TrueD>
inline

Definition at line 209 of file AttributeTransactionStack.hpp.

References wmtk::components::adaptive_tessellation::image::get_value().

Here is the call graph for this function:

◆ current_transaction_index() [1/2]

template<typename T >
size_t wmtk::attribute::internal::AttributeTransactionStack< T >::current_transaction_index ( )
inline

◆ current_transaction_index() [2/2]

template<typename T >
size_t wmtk::attribute::internal::AttributeTransactionStack< T >::current_transaction_index ( ) const
inline

◆ emplace()

template<typename T >
void wmtk::attribute::internal::AttributeTransactionStack< T >::emplace
inline

Definition at line 123 of file AttributeTransactionStack.hxx.

◆ empty()

template<typename T >
bool wmtk::attribute::internal::AttributeTransactionStack< T >::empty
inline

Definition at line 153 of file AttributeTransactionStack.hxx.

◆ final_transaction_end()

template<typename T >
auto wmtk::attribute::internal::AttributeTransactionStack< T >::final_transaction_end

Definition at line 147 of file AttributeTransactionStack.hpp.

◆ final_transaction_rbegin()

template<typename T >
auto wmtk::attribute::internal::AttributeTransactionStack< T >::final_transaction_rbegin

Definition at line 161 of file AttributeTransactionStack.hpp.

◆ get_value()

template<typename T >
auto wmtk::attribute::internal::AttributeTransactionStack< T >::get_value ( int64_t  index) const
inline

Definition at line 108 of file AttributeTransactionStack.hxx.

◆ indices()

template<typename T >
const std::vector<std::pair<size_t, size_t> >& wmtk::attribute::internal::AttributeTransactionStack< T >::indices ( ) const
inline

◆ indices_end()

template<typename T >
size_t wmtk::attribute::internal::AttributeTransactionStack< T >::indices_end ( ) const
inline

◆ operator=() [1/2]

◆ operator=() [2/2]

template<typename T >
AttributeTransactionStack& wmtk::attribute::internal::AttributeTransactionStack< T >::operator= ( const AttributeTransactionStack< T > &  )
delete

◆ pop()

template<typename T >
void wmtk::attribute::internal::AttributeTransactionStack< T >::pop ( Attribute< T > &  attribute,
bool  preserve_changes 
)
inline

Definition at line 131 of file AttributeTransactionStack.hxx.

◆ rollback_current_scope()

template<typename T >
void wmtk::attribute::internal::AttributeTransactionStack< T >::rollback_current_scope ( Attribute< T > &  attr)
inline

Definition at line 174 of file AttributeTransactionStack.hpp.

◆ scalar_attribute() [1/2]

template<typename T >
template<int D2>
T& wmtk::attribute::internal::AttributeTransactionStack< T >::scalar_attribute ( AccessorBase< T, D2 > &  accessor,
int64_t  index 
)

default mutable scalar access

◆ scalar_attribute() [2/2]

template<typename T >
template<int D2>
auto wmtk::attribute::internal::AttributeTransactionStack< T >::scalar_attribute ( AccessorBase< T, D2 > &  accessor,
int64_t  index 
) -> T&
inline

Definition at line 229 of file AttributeTransactionStack.hpp.

◆ size()

template<typename T >
int64_t wmtk::attribute::internal::AttributeTransactionStack< T >::size
inline

Definition at line 168 of file AttributeTransactionStack.hpp.

◆ transaction_start_begin()

template<typename T >
auto wmtk::attribute::internal::AttributeTransactionStack< T >::transaction_start_begin ( size_t  scope_index) const

Definition at line 140 of file AttributeTransactionStack.hpp.

◆ transaction_start_rend()

template<typename T >
auto wmtk::attribute::internal::AttributeTransactionStack< T >::transaction_start_rend ( size_t  scope_index) const

Definition at line 155 of file AttributeTransactionStack.hpp.

◆ transaction_starts()

template<typename T >
const std::vector<size_t>& wmtk::attribute::internal::AttributeTransactionStack< T >::transaction_starts ( ) const
inline

◆ try_caching() [1/2]

template<typename T >
template<typename Derived >
void wmtk::attribute::internal::AttributeTransactionStack< T >::try_caching ( int64_t  index,
const Eigen::MatrixBase< Derived > &  value 
)
inline

Definition at line 46 of file AttributeTransactionStack.hxx.

◆ try_caching() [2/2]

template<typename T >
void wmtk::attribute::internal::AttributeTransactionStack< T >::try_caching ( int64_t  index,
const T &  value 
)
inline

Definition at line 72 of file AttributeTransactionStack.hxx.

◆ update_buffer_sizes_for_add()

template<typename T >
void wmtk::attribute::internal::AttributeTransactionStack< T >::update_buffer_sizes_for_add ( size_t  data_size)
inline

Definition at line 30 of file AttributeTransactionStack.hxx.

◆ vector_attribute() [1/2]

template<typename T >
template<int D = Eigen::Dynamic, int D2 = Eigen::Dynamic, int TrueD = D == Eigen::Dynamic ? D2 : D>
MapResult<TrueD> wmtk::attribute::internal::AttributeTransactionStack< T >::vector_attribute ( AccessorBase< T, D2 > &  accessor,
int64_t  index 
)

default mutable vector access

◆ vector_attribute() [2/2]

template<typename T >
template<int D, int D2, int TrueD>
auto wmtk::attribute::internal::AttributeTransactionStack< T >::vector_attribute ( AccessorBase< T, D2 > &  accessor,
int64_t  index 
) -> MapResult<TrueD>
inline

Definition at line 183 of file AttributeTransactionStack.hpp.

◆ writing_enabled()

template<typename T >
bool wmtk::attribute::internal::AttributeTransactionStack< T >::writing_enabled
inline

Definition at line 195 of file AttributeTransactionStack.hxx.

Member Data Documentation

◆ m_buffer

template<typename T >
std::vector<T> wmtk::attribute::internal::AttributeTransactionStack< T >::m_buffer
protected

◆ m_buffer_end

template<typename T >
size_t wmtk::attribute::internal::AttributeTransactionStack< T >::m_buffer_end
protected

◆ m_current_transaction_index

template<typename T >
size_t wmtk::attribute::internal::AttributeTransactionStack< T >::m_current_transaction_index = 0
protected

◆ m_indices

template<typename T >
std::vector<std::pair<size_t, size_t> > wmtk::attribute::internal::AttributeTransactionStack< T >::m_indices
protected

◆ m_indices_end

template<typename T >
size_t wmtk::attribute::internal::AttributeTransactionStack< T >::m_indices_end
protected

◆ m_transaction_starts

template<typename T >
std::vector<size_t> wmtk::attribute::internal::AttributeTransactionStack< T >::m_transaction_starts
protected

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