ImFusion SDK 4.3
Tensor< Order >::Access Class Reference

#include <ImFusion/Base/Tensor.h>

Helper class for read/write access to the data content of a Tensor. More...

+ Inheritance diagram for Tensor< Order >::Access:

Detailed Description

template<int Order>
class ImFusion::Tensor< Order >::Access

Helper class for read/write access to the data content of a Tensor.

This access and is not exclusive and not meant to guarantee thread safety. When this object goes out of scope, the tensor will notify its listeners that the content has changed. If you do not plan to modify the content anyway, usage of ConstAccess is recommended instead to avoid useless listener updates.

Public Member Functions

 Access (Access &&o) noexcept
 
Accessoperator= (const Access &&o) noexcept
 
 Access (const Access &)=delete
 
Accessoperator= (const Access &)=delete
 
 ~Access () override
 Destructor notifies all connected listeners that the content may have changed.
 
double * data ()
 Direct access to the underlying tensor data. Kindly do not delete this pointer, unless you plan on crashing the application.
 
template<typename... idxT, typename = typename std::enable_if<TensorBase::are_all_convertible<size_t, idxT...>::value>::type>
double & operator() (idxT... idx)
 Access of an individual tensor element. The correct number of arguments is checked at compile time.
 
- Public Member Functions inherited from Tensor< Order >::ConstAccess
 ConstAccess (ConstAccess &&o) noexcept
 
ConstAccessoperator= (const ConstAccess &&o) noexcept
 
 ConstAccess (const ConstAccess &)=delete
 
ConstAccessoperator= (const ConstAccess &)=delete
 
const double * data () const
 Direct const access to the underlying tensor data. Kindly do not delete this pointer, unless you plan on crashing the application.
 
template<typename... idxT, typename = typename std::enable_if<TensorBase::are_all_convertible<size_t, idxT...>::value>::type>
const double & operator() (idxT... idx) const
 Const access of an individual tensor element. The correct number of arguments is checked at compile time.
 
- Public Member Functions inherited from SignalReceiver
 SignalReceiver ()=default
 Default constructor.
 
 SignalReceiver (const SignalReceiver &other)
 Copy constructor, does not copy any existing signal connections from other.
 
SignalReceiveroperator= (SignalReceiver rhs)
 Assignment operator, disconnects all existing connections, does not copy any existing signal connections from rhs.
 
virtual ~SignalReceiver ()
 Virtual destructor disconnects from all connected signals.
 

Additional Inherited Members

- Protected Member Functions inherited from Tensor< Order >::ConstAccess
 ConstAccess (const Tensor< Order > &tensor)
 
void onDataDeleted (const Data *data)
 
- Protected Member Functions inherited from SignalReceiver
void disconnectAll ()
 Disconnects all existing connections.
 
- Protected Attributes inherited from Tensor< Order >::ConstAccess
Tensor< Order > * m_tensor
 

The documentation for this class was generated from the following files:
Search Tab / S to search, Esc to close