OpenLB 1.7
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
olb::descriptors::FIELD_TUPLE< FIELDS > Struct Template Reference

Tuple of abstract field declarations. More...

#include <descriptorBase.h>

+ Inheritance diagram for olb::descriptors::FIELD_TUPLE< FIELDS >:
+ Collaboration diagram for olb::descriptors::FIELD_TUPLE< FIELDS >:

Public Types

using fields_t = meta::list<FIELDS...>
 
template<template< typename... > class COLLECTION>
using decompose_into = COLLECTION<FIELDS...>
 
template<template< typename > class COND>
using filter
 Returns FIELD_TUPLE with subset of FIELDS meeting COND.
 
- Public Types inherited from olb::meta::list< FIELDS... >
using get
 Returns INDEXth type of TYPES.
 
using decompose_into
 Export TYPES into arbitrary variadic template COLLECTION.
 
using map
 
using map_to_callable_result
 
using push
 
using append
 
using include
 Merge TYPES and UYPES into new list.
 
using first_with_base
 Returns first type of TYPES that is derived from BASE.
 
using first_with_base_or_fallback
 Returns first type of TYPES that is derived from BASE.
 

Public Member Functions

 FIELD_TUPLE ()=delete
 Deleted constructor to enforce pure usage as type and prevent implicit narrowing conversions.
 

Static Public Member Functions

template<typename WANTED_FIELD >
static constexpr bool provides ()
 Returns whether WANTED_FIELD is contained in FIELDS.
 
static bool provides (std::type_index field)
 Returns whether field is contained in FIELDS.
 
- Static Public Member Functions inherited from olb::meta::list< FIELDS... >
static constexpr unsigned index ()
 Index of first instance of TYPE in TYPES.
 
static constexpr void for_each (F f)
 Calls f for each type of TYPES by-value (in reversed order!)
 
static constexpr bool contains ()
 

Static Public Attributes

static constexpr std::size_t field_count = sizeof...(FIELDS)
 Number of fields.
 
- Static Public Attributes inherited from olb::meta::list< FIELDS... >
static constexpr unsigned size
 

Detailed Description

template<typename... FIELDS>
struct olb::descriptors::FIELD_TUPLE< FIELDS >

Tuple of abstract field declarations.

Definition at line 49 of file descriptorBase.h.

Member Typedef Documentation

◆ decompose_into

template<typename... FIELDS>
template<template< typename... > class COLLECTION>
using olb::descriptors::FIELD_TUPLE< FIELDS >::decompose_into = COLLECTION<FIELDS...>

Definition at line 56 of file descriptorBase.h.

◆ fields_t

template<typename... FIELDS>
using olb::descriptors::FIELD_TUPLE< FIELDS >::fields_t = meta::list<FIELDS...>

Definition at line 53 of file descriptorBase.h.

◆ filter

template<typename... FIELDS>
template<template< typename > class COND>
using olb::descriptors::FIELD_TUPLE< FIELDS >::filter
Initial value:
typename meta::filter_t<COND, FIELDS...>
::template decompose_into<FIELD_TUPLE>
typename filter< COND, TYPES... >::type filter_t
meta::list of TYPES meeting COND
Definition meta.h:245

Returns FIELD_TUPLE with subset of FIELDS meeting COND.

Definition at line 63 of file descriptorBase.h.

Constructor & Destructor Documentation

◆ FIELD_TUPLE()

template<typename... FIELDS>
olb::descriptors::FIELD_TUPLE< FIELDS >::FIELD_TUPLE ( )
delete

Deleted constructor to enforce pure usage as type and prevent implicit narrowing conversions.

Member Function Documentation

◆ provides() [1/2]

template<typename... FIELDS>
template<typename WANTED_FIELD >
static constexpr bool olb::descriptors::FIELD_TUPLE< FIELDS >::provides ( )
inlinestaticconstexpr

Returns whether WANTED_FIELD is contained in FIELDS.

Definition at line 68 of file descriptorBase.h.

69 {
70 return meta::contains<WANTED_FIELD,FIELDS...>();
71 }
constexpr bool contains()
Returns true iff a given type list contains WANTED.
Definition meta.h:125

References olb::meta::contains().

+ Here is the call graph for this function:

◆ provides() [2/2]

template<typename... FIELDS>
static bool olb::descriptors::FIELD_TUPLE< FIELDS >::provides ( std::type_index field)
inlinestatic

Returns whether field is contained in FIELDS.

Definition at line 74 of file descriptorBase.h.

75 {
76 return meta::contains<FIELDS...>(field);
77 }
std::enable_if_t< DESCRIPTOR::d==2, std::shared_ptr< SuperF2D< T > > > field(SuperLattice< T, DESCRIPTOR > &sLattice)
Returns external field functor.

References olb::meta::contains().

+ Here is the call graph for this function:

Member Data Documentation

◆ field_count

template<typename... FIELDS>
constexpr std::size_t olb::descriptors::FIELD_TUPLE< FIELDS >::field_count = sizeof...(FIELDS)
staticconstexpr

Number of fields.

Definition at line 59 of file descriptorBase.h.


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