deal.II version GIT relicensing-2289-g1e5549a87a 2024-12-21 21:30:00+00:00
\(\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
Static Public Member Functions | List of all members
Patterns::Tools::Convert< T, Enable > Struct Template Reference

Static Public Member Functions

static std::unique_ptr< Patterns::PatternBaseto_pattern ()=delete
 
static std::string to_string (const T &s, const Patterns::PatternBase &p= *Convert< T >::to_pattern())=delete
 
static T to_value (const std::string &s, const Patterns::PatternBase &p= *Convert< T >::to_pattern())=delete
 

Detailed Description

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

Converter class. This class is used to generate strings and Patterns associated to the given type, and to convert from a string to the given type and vice versa.

The second template parameter is used internally to allow for advanced SFINAE (substitution failure is not an error) tricks used to specialise this class for arbitrary STL containers and maps.

Definition at line 1301 of file patterns.h.

Member Function Documentation

◆ to_pattern()

template<class T , class Enable = void>
static std::unique_ptr< Patterns::PatternBase > Patterns::Tools::Convert< T, Enable >::to_pattern ( )
staticdelete

Return a std::unique_ptr to a Pattern that can be used to interpret a string as the type of the template argument, and the other way around.

While the current function (in the general Convert template) is deleted, it is implemented and available in the specializations of the Convert class template for particular kinds of template arguments T.

◆ to_string()

template<class T , class Enable = void>
static std::string Patterns::Tools::Convert< T, Enable >::to_string ( const T &  s,
const Patterns::PatternBase p = *Convert< T >::to_pattern() 
)
staticdelete

Return a string containing a textual version of the variable s. Use the pattern passed to perform the conversion, or create and use a default one.

While the current function (in the general Convert template) is deleted, it is implemented and available in the specializations of the Convert class template for particular kinds of template arguments T.

◆ to_value()

template<class T , class Enable = void>
static T Patterns::Tools::Convert< T, Enable >::to_value ( const std::string &  s,
const Patterns::PatternBase p = *Convert< T >::to_pattern() 
)
staticdelete

Convert a string to a value, using the given pattern. Use the pattern passed to perform the conversion, or create and use a default one.

While the current function (in the general Convert template) is deleted, it is implemented and available in the specializations of the Convert class template for particular kinds of template arguments T.


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