VirtualFluids 0.2.0
Parallel CFD LBM Solver
Loading...
Searching...
No Matches
UbTuple< P1, P2, P3, P4, P5, P6, P7, P8 > Class Template Reference

A class implements a tuple. More...

#include <UbTuple.h>

Inheritance diagram for UbTuple< P1, P2, P3, P4, P5, P6, P7, P8 >:
UbDuo< T1, T2 >

Public Types

using BaseT = UbDuo< P1, typename UbTuple< P2, P3, P4, P5, P6, P7, P8, UbNullT >::BaseT >
 
- Public Types inherited from UbDuo< T1, T2 >
enum  { N = 2 }
 
using Type1 = T1
 
using Type2 = T2
 

Public Member Functions

 UbTuple ()=default
 
 UbTuple (typename UbTypeOp< P1 >::RefConstT a1, typename UbTypeOp< P2 >::RefConstT a2, typename UbTypeOp< P3 >::RefConstT a3=UbNullT(), typename UbTypeOp< P4 >::RefConstT a4=UbNullT(), typename UbTypeOp< P5 >::RefConstT a5=UbNullT(), typename UbTypeOp< P6 >::RefConstT a6=UbNullT(), typename UbTypeOp< P7 >::RefConstT a7=UbNullT(), typename UbTypeOp< P8 >::RefConstT a8=UbNullT())
 
template<typename U1 , typename U2 , typename U3 , typename U4 , typename U5 , typename U6 , typename U7 , typename U8 >
UbTuple< P1, P2, P3, P4, P5, P6, P7, P8 > & operator= (const UbTuple< U1, U2, U3, U4, U5, U6, U7, U8 > &rhs)
 
- Public Member Functions inherited from UbDuo< T1, T2 >
 UbDuo ()
 
 UbDuo (T1 const &a, T2 const &b)
 
template<typename U1 , typename U2 >
 UbDuo (UbDuo< U1, U2 > const &d)
 
template<typename U1 , typename U2 >
UbDuo< T1, T2 > & operator= (UbDuo< U1, U2 > const &d)
 
T1 & v1 ()
 
T1 constv1 () const
 
T2 & v2 ()
 
T2 constv2 () const
 

Detailed Description

template<typename P1, typename P2 = UbNullT, typename P3 = UbNullT, typename P4 = UbNullT, typename P5 = UbNullT, typename P6 = UbNullT, typename P7 = UbNullT, typename P8 = UbNullT>
class UbTuple< P1, P2, P3, P4, P5, P6, P7, P8 >

A class implements a tuple.

usage: ...
Advanced UbTuple Example: create and use tuple with only c1 field

val<1>(t1) += 42;
std::cout << t1.v1() << std::endl;
T1 & v1()
Definition UbTuple.h:179
std::shared_ptr< T > SPtr

create and use duo:

std::cout << val<1>(t2) << ", ";
std::cout << t2.v1() << std::endl;

create and use triple:

val<1>(t3) = true; // new values via: val< pos >(triple) = ...
val<2>(t3) = 42;
val<3>(t3) = 0.2;
t3 = makeUbTuple(false, 23, 13.13);
std::cout << val<1>(t3) << ", ";
std::cout << val<2>(t3) << ", ";
std::cout << val<3>(t3) << std::endl;
UbTuple< T1 > makeUbTuple(T1 const &a1)
Definition UbTuple.h:554

create and use quadruple:

UbType<bool,int,float,double> t4(true,42,13,1.95583);
std::cout << val<4>(t4) << std::endl; //<- option 2 (std)
std::cout << t4.v2().v2().v2() << std::endl; //<- option 2

Definition at line 476 of file UbTuple.h.

Member Typedef Documentation

◆ BaseT

template<typename P1 , typename P2 = UbNullT, typename P3 = UbNullT, typename P4 = UbNullT, typename P5 = UbNullT, typename P6 = UbNullT, typename P7 = UbNullT, typename P8 = UbNullT>
using UbTuple< P1, P2, P3, P4, P5, P6, P7, P8 >::BaseT = UbDuo<P1, typename UbTuple<P2, P3, P4, P5, P6, P7, P8, UbNullT>::BaseT>

Definition at line 479 of file UbTuple.h.

Constructor & Destructor Documentation

◆ UbTuple() [1/2]

template<typename P1 , typename P2 = UbNullT, typename P3 = UbNullT, typename P4 = UbNullT, typename P5 = UbNullT, typename P6 = UbNullT, typename P7 = UbNullT, typename P8 = UbNullT>
UbTuple< P1, P2, P3, P4, P5, P6, P7, P8 >::UbTuple ( )
default

◆ UbTuple() [2/2]

template<typename P1 , typename P2 = UbNullT, typename P3 = UbNullT, typename P4 = UbNullT, typename P5 = UbNullT, typename P6 = UbNullT, typename P7 = UbNullT, typename P8 = UbNullT>
UbTuple< P1, P2, P3, P4, P5, P6, P7, P8 >::UbTuple ( typename UbTypeOp< P1 >::RefConstT  a1,
typename UbTypeOp< P2 >::RefConstT  a2,
typename UbTypeOp< P3 >::RefConstT  a3 = UbNullT(),
typename UbTypeOp< P4 >::RefConstT  a4 = UbNullT(),
typename UbTypeOp< P5 >::RefConstT  a5 = UbNullT(),
typename UbTypeOp< P6 >::RefConstT  a6 = UbNullT(),
typename UbTypeOp< P7 >::RefConstT  a7 = UbNullT(),
typename UbTypeOp< P8 >::RefConstT  a8 = UbNullT() 
)
inline

Definition at line 483 of file UbTuple.h.

Member Function Documentation

◆ operator=()

template<typename P1 , typename P2 = UbNullT, typename P3 = UbNullT, typename P4 = UbNullT, typename P5 = UbNullT, typename P6 = UbNullT, typename P7 = UbNullT, typename P8 = UbNullT>
UbTuple< P1, P2, P3, P4, P5, P6, P7, P8 > & UbTuple< P1, P2, P3, P4, P5, P6, P7, P8 >::operator= ( const UbTuple< U1, U2, U3, U4, U5, U6, U7, U8 > &  rhs)
inline

Definition at line 493 of file UbTuple.h.


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