Reference documentation for deal.II version 9.6.0
|
#include <deal.II/base/patterns.h>
Static Public Attributes | |
static constexpr int | list_rank = 0 |
static constexpr int | map_rank = 0 |
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.
|
staticconstexpr |
Definition at line 1476 of file patterns.h.
|
staticconstexpr |
Definition at line 1477 of file patterns.h.