OpenFPM_pdata  4.1.0
Project that contain the implementation of distributed structures
 
Loading...
Searching...
No Matches
Point_test_prp< T > Class Template Reference

Test structure used for several test. More...

Detailed Description

template<typename T>
class Point_test_prp< T >

Test structure used for several test.

It is a test structure used for several test it contain 4 scalar "x,y,z,s" one vector property v[3] and one tensor or rank 2 t[3][3] + the definition of properties names

It is the format for type parsing of in the openfpm structures see openFPM_data wiki for more information

Declaration of a point

Test structure used for several test.

Create a type definition

Test structure used for several test.

Access the members

p.get<P::v>()[0] = 1.0 + i;
p.get<P::v>()[1] = 2.0 + i;
p.get<P::v>()[2] = 7.0 + i;
p.get<P::t>()[0][0] = 10.0 + i;
p.get<P::t>()[0][1] = 13.0 + i;
p.get<P::t>()[0][2] = 8.0 + i;
p.get<P::t>()[1][0] = 19.0 + i;
p.get<P::t>()[1][1] = 23.0 + i;
p.get<P::t>()[1][2] = 5.0 + i;
p.get<P::t>()[2][0] = 4.0 + i;
p.get<P::t>()[2][1] = 3.0 + i;
p.get<P::t>()[2][2] = 11.0 + i;
boost::fusion::result_of::at< type, boost::mpl::int_< i > >::type get()
getter method for a general property i
static const unsigned int v
v property is at position 4 in the boost::fusion::vector
static const unsigned int t
t property is at position 5 in the boost::fusion::vector

Definition at line 414 of file Point_test.hpp.

#include <Point_test.hpp>

Data Structures

struct  attributes
 Attributes name. More...
 

Public Types

typedef boost::fusion::vector< T, T, T, T, T[3], T[3][3]> type
 declaration of what the Point_test_prp store
 

Public Member Functions

void setx (T x_)
 set the x property
 
void sety (T y_)
 set the y property
 
void setz (T z_)
 set the z property
 
void sets (T s_)
 set the s property
 
template<unsigned int i>
boost::fusion::result_of::at< type, boost::mpl::int_< i > >::type get ()
 getter method for a general property i
 
 Point_test_prp ()
 Default constructor.
 
template<typename Mem >
 Point_test_prp (const encapc< 1, Point_test_prp< T >, Mem > &p)
 constructor from encapc
 
 Point_test_prp (const Point_test_prp< T > &p)
 constructor from another point
 
Point_test_prp< T > operator= (const Point_test< T > &p)
 Copy the point.
 

Static Public Member Functions

static bool noPointers ()
 

Data Fields

type data
 Object itself.
 

Static Public Attributes

static const unsigned int x = 0
 x property is at position 0 in the boost::fusion::vector
 
static const unsigned int y = 1
 y property is at position 1 in the boost::fusion::vector
 
static const unsigned int z = 2
 z property is at position 2 in the boost::fusion::vector
 
static const unsigned int s = 3
 s property is at position 3 in the boost::fusion::vector
 
static const unsigned int v = 4
 v property is at position 4 in the boost::fusion::vector
 
static const unsigned int t = 5
 t property is at position 5 in the boost::fusion::vector
 
static const unsigned int max_prop = 6
 maximum number of properties
 

Member Typedef Documentation

◆ type

template<typename T >
typedef boost::fusion::vector<T,T,T,T,T[3],T[3][3]> Point_test_prp< T >::type

declaration of what the Point_test_prp store

Definition at line 419 of file Point_test.hpp.

Constructor & Destructor Documentation

◆ Point_test_prp() [1/3]

template<typename T >
Point_test_prp< T >::Point_test_prp ( )
inline

Default constructor.

Definition at line 486 of file Point_test.hpp.

◆ Point_test_prp() [2/3]

template<typename T >
template<typename Mem >
Point_test_prp< T >::Point_test_prp ( const encapc< 1, Point_test_prp< T >, Mem > &  p)
inline

constructor from encapc

Definition at line 490 of file Point_test.hpp.

◆ Point_test_prp() [3/3]

template<typename T >
Point_test_prp< T >::Point_test_prp ( const Point_test_prp< T > &  p)
inline

constructor from another point

Definition at line 510 of file Point_test.hpp.

Member Function Documentation

◆ get()

template<typename T >
template<unsigned int i>
boost::fusion::result_of::at< type, boost::mpl::int_< i > >::type Point_test_prp< T >::get ( )
inline

getter method for a general property i

Definition at line 483 of file Point_test.hpp.

◆ noPointers()

template<typename T >
static bool Point_test_prp< T >::noPointers ( )
inlinestatic

Definition at line 558 of file Point_test.hpp.

◆ operator=()

template<typename T >
Point_test_prp< T > Point_test_prp< T >::operator= ( const Point_test< T > &  p)
inline

Copy the point.

Parameters
ppoint
Returns
this

Definition at line 537 of file Point_test.hpp.

◆ sets()

template<typename T >
void Point_test_prp< T >::sets ( s_)
inline

set the s property

Parameters
s_

Definition at line 473 of file Point_test.hpp.

◆ setx()

template<typename T >
void Point_test_prp< T >::setx ( x_)
inline

set the x property

Parameters
x_

Definition at line 452 of file Point_test.hpp.

◆ sety()

template<typename T >
void Point_test_prp< T >::sety ( y_)
inline

set the y property

Parameters
y_

Definition at line 459 of file Point_test.hpp.

◆ setz()

template<typename T >
void Point_test_prp< T >::setz ( z_)
inline

set the z property

Parameters
z_

Definition at line 466 of file Point_test.hpp.

Field Documentation

◆ data

template<typename T >
type Point_test_prp< T >::data

Object itself.

Definition at line 422 of file Point_test.hpp.

◆ max_prop

template<typename T >
const unsigned int Point_test_prp< T >::max_prop = 6
static

maximum number of properties

Definition at line 443 of file Point_test.hpp.

◆ s

template<typename T >
const unsigned int Point_test_prp< T >::s = 3
static

s property is at position 3 in the boost::fusion::vector

Definition at line 434 of file Point_test.hpp.

◆ t

template<typename T >
const unsigned int Point_test_prp< T >::t = 5
static

t property is at position 5 in the boost::fusion::vector

Definition at line 440 of file Point_test.hpp.

◆ v

template<typename T >
const unsigned int Point_test_prp< T >::v = 4
static

v property is at position 4 in the boost::fusion::vector

Definition at line 437 of file Point_test.hpp.

◆ x

template<typename T >
const unsigned int Point_test_prp< T >::x = 0
static

x property is at position 0 in the boost::fusion::vector

Definition at line 425 of file Point_test.hpp.

◆ y

template<typename T >
const unsigned int Point_test_prp< T >::y = 1
static

y property is at position 1 in the boost::fusion::vector

Definition at line 428 of file Point_test.hpp.

◆ z

template<typename T >
const unsigned int Point_test_prp< T >::z = 2
static

z property is at position 2 in the boost::fusion::vector

Definition at line 431 of file Point_test.hpp.


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