tfel
Loading...
Searching...
No Matches
GenTypeBase.hxx File Reference

This file implements the GenTypeBase class and some internal classes used by the GenType class. More...

#include <cmath>
#include <limits>
#include <utility>
#include <variant>
#include <type_traits>
#include "TFEL/Raise.hxx"
#include "TFEL/Config/TFELConfig.hxx"
#include "TFEL/Metaprogramming/TypeList.hxx"
#include "TFEL/Metaprogramming/GenerateTypeList.hxx"
#include "TFEL/Utilities/GenTypeCastError.hxx"
#include "TFEL/Utilities/GenTypeBase.ixx"
#include "TFEL/Utilities/GenTypeSpecialisation.ixx"

Classes

struct  tfel::utilities::internals::GenTypeSpecializedAccessor< Child, T >
 an helper class to a add methods to a GenType for a specific type. More...
class  tfel::utilities::internals::GenTypeSpecializedMethods< Child, List >
 an helper class to a add methods to a GenType. More...
class  tfel::utilities::internals::GenTypeSpecializedMethods< Child, tfel::meta::TLE >
 a partial specialisation to end the recursion. More...
struct  tfel::utilities::internals::StdVariantFromTypeList< List, Types >
struct  tfel::utilities::internals::StdVariantFromTypeList< tfel::meta::TLE, Types... >
struct  tfel::utilities::GenTypeBase< List >
 the base class of GenType. More...

Namespaces

namespace  tfel
 the namespace tfel encloses all the TFEL project. This namespace is empty.

Typedefs

template<typename... Types>
using tfel::utilities::GenType

Functions

template<typename T, typename List>
T::return_type tfel::utilities::apply (const GenTypeBase< List > &)
template<typename T, typename List>
T::return_type tfel::utilities::apply (T &, const GenTypeBase< List > &)
template<typename T, typename List>
T::return_type tfel::utilities::apply (const GenTypeBase< List > &, const GenTypeBase< List > &)
template<typename T, typename List>
T::return_type tfel::utilities::apply (T &, const GenTypeBase< List > &, const GenTypeBase< List > &)
template<typename T, typename List>
T::return_type tfel::utilities::apply (GenTypeBase< List > &)
template<typename T, typename List>
T::return_type tfel::utilities::apply (T &, GenTypeBase< List > &)
template<typename T, typename List>
T::return_type tfel::utilities::apply (GenTypeBase< List > &, GenTypeBase< List > &)
template<typename T, typename List>
T::return_type tfel::utilities::apply (T &, GenTypeBase< List > &, GenTypeBase< List > &)

Detailed Description

This file implements the GenTypeBase class and some internal classes used by the GenType class.

See also
TL
Author
Thomas Helfer
Date
19/04/2007

Typedef Documentation

◆ GenType

template<typename... Types>
using tfel::utilities::GenType
Initial value:
GenTypeBase<typename tfel::meta::GenerateTypeList<Types...>::type>
the base class of GenType.
Definition GenTypeBase.hxx:118

Function Documentation

◆ apply() [1/8]

template<typename T, typename List>
T::return_type tfel::utilities::apply ( const GenTypeBase< List > & v)

Apply function T::apply to a GenTypeBase for the type holded by the GenTypeBase.

Parameters
T: class containing the function to be applied.
List: list of types contained in the GenTypeBase class.
v: GenTypeBase class argument.
Precondition
class T must contain a static function name 'apply' for each type in List.
class T must define 'return_type' as a class or a typedef.
Exceptions
aGenTypeCastError if the GenTypeBase does not hold any object.

◆ apply() [2/8]

template<typename T, typename List>
T::return_type tfel::utilities::apply ( const GenTypeBase< List > & v1,
const GenTypeBase< List > & v2 )

Apply function T::apply to a GenTypeBase for the types holded by the two GenTypeBase.

Parameters
T: class containing the function to be applied.
List: list of types contained in the GenTypeBase class.
v1: GenTypeBase class argument.
v2: GenTypeBase class argument.
Precondition
class T must contain a static function name 'apply' for each pair of types in List.
class T must define 'return_type' as a class or a typedef.
Exceptions
aGenTypeCastError if one of the GenTypeBase does not hold any object.

◆ apply() [3/8]

template<typename T, typename List>
T::return_type tfel::utilities::apply ( GenTypeBase< List > & v)

Apply function T::apply to a GenTypeBase for the type holded by the GenTypeBase.

Parameters
T: class containing the function to be applied.
List: list of types contained in the GenTypeBase class.
v: GenTypeBase class argument.
Precondition
class T must contain a static function name 'apply' for each type in List.
class T must define 'return_type' as a class or a typedef.
Exceptions
aGenTypeCastError if the GenTypeBase does not hold any object.

◆ apply() [4/8]

template<typename T, typename List>
T::return_type tfel::utilities::apply ( GenTypeBase< List > & v1,
GenTypeBase< List > & v2 )

Apply function T::apply to a GenTypeBase for the types holded by the two GenTypeBase.

Parameters
T: class containing the function to be applied.
List: list of types contained in the GenTypeBase class.
v1: GenTypeBase class argument.
v2: GenTypeBase class argument.
Precondition
class T must contain a static function name 'apply' for each pair of types in List.
class T must define 'return_type' as a class or a typedef.
Exceptions
aGenTypeCastError if one of the GenTypeBase does not hold any object.

◆ apply() [5/8]

template<typename T, typename List>
T::return_type tfel::utilities::apply ( T & f,
const GenTypeBase< List > & v )

Apply functor T to a GenTypeBase for the type holded by the GenTypeBase.

Parameters
T: class containing the function to be applied.
List: list of types contained in the GenTypeBase class.
f: functor.
v: GenTypeBase class argument.
Precondition
class T must contain the opertor () for each type in List.
class T must define 'return_type' as a class or a typedef.
Exceptions
aGenTypeCastError if the GenTypeBase does not hold any object.

◆ apply() [6/8]

template<typename T, typename List>
T::return_type tfel::utilities::apply ( T & f,
const GenTypeBase< List > & v1,
const GenTypeBase< List > & v2 )

Apply functor T to a GenTypeBase for the types holded by the two GenTypeBase.

Parameters
T: class containing the function to be applied.
List: list of types contained in the GenTypeBase class.
f: functor.
v1: GenTypeBase class argument.
v2: GenTypeBase class argument.
Precondition
class T must contain the opertor () for each pair of types in List.
class T must define 'return_type' as a class or a typedef.
Exceptions
aGenTypeCastError if the GenTypeBase does not hold any object.

◆ apply() [7/8]

template<typename T, typename List>
T::return_type tfel::utilities::apply ( T & f,
GenTypeBase< List > & v )

Apply functor T to a GenTypeBase for the type holded by the GenTypeBase.

Parameters
T: class containing the function to be applied.
List: list of types contained in the GenTypeBase class.
f: functor.
v: GenTypeBase class argument.
Precondition
class T must contain the opertor () for each type in List.
class T must define 'return_type' as a class or a typedef.
Exceptions
aGenTypeCastError if the GenTypeBase does not hold any object.

◆ apply() [8/8]

template<typename T, typename List>
T::return_type tfel::utilities::apply ( T & f,
GenTypeBase< List > & v1,
GenTypeBase< List > & v2 )

Apply functor T to a GenTypeBase for the types holded by the two GenTypeBase.

Parameters
T: class containing the function to be applied.
List: list of types contained in the GenTypeBase class.
f: functor.
v1: GenTypeBase class argument.
v2: GenTypeBase class argument.
Precondition
class T must contain the opertor () for each pair of types in List.
class T must define 'return_type' as a class or a typedef.
Exceptions
aGenTypeCastError if the GenTypeBase does not hold any object.