Reference documentation for deal.II version Git 7f58f27 2017-09-20 15:35:49 -0600
Static Public Member Functions | List of all members
Patterns::Tools::Convert< T, Enable > Struct Template Reference

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

Static Public Member Functions

static std::unique_ptr< Patterns::PatternBaseto_pattern ()=delete
 
static std::string to_string (const T &s, const std::unique_ptr< Patterns::PatternBase > &p=Convert< T >::to_pattern())=delete
 
static T to_value (const std::string &s, const std::unique_ptr< 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 viceversa.

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.

Author
Luca Heltai, 2017

Definition at line 1049 of file patterns.h.

Member Function Documentation

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.

template<class T , class Enable = void>
static std::string Patterns::Tools::Convert< T, Enable >::to_string ( const T &  s,
const std::unique_ptr< 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.

template<class T , class Enable = void>
static T Patterns::Tools::Convert< T, Enable >::to_value ( const std::string &  s,
const std::unique_ptr< 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: