Reference documentation for deal.II version 9.6.0
\(\newcommand{\dealvcentcolon}{\mathrel{\mathop{:}}}\) \(\newcommand{\dealcoloneq}{\dealvcentcolon\mathrel{\mkern-1.2mu}=}\) \(\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}\) \(\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}\)
Loading...
Searching...
No Matches
Patterns::Tools::internal::RankInfo< T, Enable > Struct Template Reference

#include <deal.II/base/patterns.h>

Inheritance diagram for Patterns::Tools::internal::RankInfo< T, Enable >:

Static Public Attributes

static constexpr int list_rank = 0
 
static constexpr int map_rank = 0
 

Detailed Description

template<class T, class Enable = void>
struct Patterns::Tools::internal::RankInfo< T, Enable >

Store information about the rank types of the given class.

A class has Rank equal to the number of different separators that are required to uniquely identify its element(s) in a string.

This class is used to detect whether the class T is compatible with a Patterns::List pattern or with a Patterns::Map pattern.

Objects like Point() or std::complex<double> are vector-likes, and have vector_rank 1. Elementary types, like int, unsigned int, double, etc. have vector_rank 0. std::vector, std::list and in general containers have rank equal to 1 + vector_rank of the contained type. Similarly for map types.

A class with list_rank::value = 0 is either elementary or a map. A class with map_rank::value = 0 is either a List compatible class, or an elementary type.

Elementary types are not compatible with Patterns::List, but non elementary types, like Point(), or std::complex<double>, are compatible with the List type. Adding more compatible types is a matter of adding a specialization of this struct for the given type.

Definition at line 1474 of file patterns.h.

Member Data Documentation

◆ list_rank

template<class T , class Enable = void>
int Patterns::Tools::internal::RankInfo< T, Enable >::list_rank = 0
staticconstexpr

Definition at line 1476 of file patterns.h.

◆ map_rank

template<class T , class Enable = void>
int Patterns::Tools::internal::RankInfo< T, Enable >::map_rank = 0
staticconstexpr

Definition at line 1477 of file patterns.h.


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