Reference documentation for deal.II version Git 44f8b89d8e 2019-09-19 12:50:43 +0200
List of all members
Patterns::Tools::internal::RankInfo< T, Enable > Struct Template Reference

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

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

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.

Luca Heltai, 2017

Definition at line 1488 of file patterns.h.

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