GEOSX
Classes | Public Types | Static Public Member Functions | List of all members
geos::rtTypes Class Reference

Static class to manage the type selection of types at runtime and obtain the regexes of these types. Typically, these types are 'xsd:simpleType' in the XSD. More...

#include <DataTypes.hpp>

Classes

struct  CustomTypes
 Custom types are useful to customize the regexes of an existing type. The type name can be one of the existing ones, or a totally new one (which can then be used in Wrapper::setRTTypename). More...
 

Public Types

using RegexMapType = std::map< string, Regex >
 the regex map type to store and find the regexes by the associated rtTypeName.
 

Static Public Member Functions

static string getTypeName (std::type_index const key)
 Convert a std::type_index to a string. More...
 
template<typename T >
static const RegexgetTypeRegex ()
 
template<typename T >
static const RegexgetTypeRegex (string_view typeName)
 
static RegexMapType createBasicTypesRegexMap ()
 Construct the regexMap for all basic types (TypeRegex< T > extented types are not mentionned) More...
 

Detailed Description

Static class to manage the type selection of types at runtime and obtain the regexes of these types. Typically, these types are 'xsd:simpleType' in the XSD.

Definition at line 558 of file DataTypes.hpp.

Member Function Documentation

◆ createBasicTypesRegexMap()

static RegexMapType geos::rtTypes::createBasicTypesRegexMap ( )
static

Construct the regexMap for all basic types (TypeRegex< T > extented types are not mentionned)

Returns
RegexMapType

◆ getTypeName()

static string geos::rtTypes::getTypeName ( std::type_index const  key)
static

Convert a std::type_index to a string.

Parameters
keythe std::type_index of the type
Returns
a hard coded string that is related to the std::type_index

◆ getTypeRegex() [1/2]

template<typename T >
static const Regex& geos::rtTypes::getTypeRegex ( )
inlinestatic
Template Parameters
Ttype we want the regex
Returns
the regex string for the default rtType of T to validate input values to this type.

Definition at line 594 of file DataTypes.hpp.

◆ getTypeRegex() [2/2]

template<typename T >
static const Regex& geos::rtTypes::getTypeRegex ( string_view  typeName)
inlinestatic
Parameters
typeNameThe rtType name of the type we want the regex (can be a CustomTypes).
Template Parameters
Tthe type we want the regex. If none are available in createBasicTypesRegexMap(), one is generated from TypeRegex< T >::get().
Returns
a regex string validating the type T.

Definition at line 604 of file DataTypes.hpp.


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