OpenFPM_pdata  1.1.0
Project that contain the implementation of distributed structures
 All Data Structures Namespaces Functions Variables Typedefs Enumerations Friends Pages
encapc< dim, T, typename memory_traits_inte< T >::type > Class Template Reference

this structure encapsulate an object of the grid More...

Detailed Description

template<unsigned int dim, typename T>
class encapc< dim, T, typename memory_traits_inte< T >::type >

this structure encapsulate an object of the grid

This structure encapsulate an object of the grid It give the possibility to select the property in a secondary moment

Can be thought as a reference to an object of the grid. So every time we use the term encapsulated object we mean reference to object

Note
A vector is a 1D grid
Parameters
dimDimensionality of the grid
Ttype of object the grid store

Definition at line 477 of file Encap.hpp.

#include <Encap.hpp>

Public Types

typedef T::type type
 Original list if types.
 
typedef int yes_i_am_encap
 indicate it is an encapsulated object
 
typedef T T_type
 original object type
 

Public Member Functions

 encapc (typename memory_traits_inte< T >::type &data, size_t k)
 constructor require a key and a memory data
 
template<unsigned int p>
type_gpu_prop< p, typename
memory_traits_inte< T >::type >
::type::reference 
get ()
 Access the data. More...
 
template<unsigned int p>
type_gpu_prop< p, typename
memory_traits_inte< T >::type >
::type::reference 
get () const
 Access the data. More...
 
encapc< dim, T, Mem > & operator= (const encapc< dim, T, Mem > &ec)
 Assignment. More...
 
encapc< dim, T, Mem > & operator= (const T &obj)
 Assignment. More...
 

Private Types

typedef memory_traits_inte< T >
::type 
Mem
 type of layout
 

Private Attributes

Memdata
 reference to the encapsulated object
 
size_t k
 element id
 

Member Function Documentation

template<unsigned int dim, typename T >
template<unsigned int p>
type_gpu_prop<p,typename memory_traits_inte<T>::type>::type::reference encapc< dim, T, typename memory_traits_inte< T >::type >::get ( )
inline

Access the data.

Template Parameters
pproperty selected
Returns
The reference of the data

Definition at line 511 of file Encap.hpp.

template<unsigned int dim, typename T >
template<unsigned int p>
type_gpu_prop<p,typename memory_traits_inte<T>::type>::type::reference encapc< dim, T, typename memory_traits_inte< T >::type >::get ( ) const
inline

Access the data.

Template Parameters
pproperty selected
Returns
The reference of the data

Definition at line 523 of file Encap.hpp.

template<unsigned int dim, typename T >
encapc<dim,T,Mem>& encapc< dim, T, typename memory_traits_inte< T >::type >::operator= ( const encapc< dim, T, Mem > &  ec)
inline

Assignment.

Parameters
ecencapsulator
Returns
itself

Definition at line 535 of file Encap.hpp.

template<unsigned int dim, typename T >
encapc<dim,T,Mem>& encapc< dim, T, typename memory_traits_inte< T >::type >::operator= ( const T &  obj)
inline

Assignment.

Parameters
objobject to copy
Returns
itself

Definition at line 551 of file Encap.hpp.


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