SUNphi  1.0
Bind.hpp File Reference

Defines a class which binds a component of a SmET. More...

Go to the source code of this file.

Classes

struct  SUNphi::BaseBinder
 
struct  SUNphi::ConstrainAreBinders< Args >
 
class  SUNphi::Binder< TG, _Refs >
 Class to bind a component of a SmET. More...
 

Macros

#define DEFINE_NAMED_BINDER(TG, NAME)
 Defines a Binder named NAME for type TG. More...
 
#define DEFINE_NAMED_RW_OR_COL_BINDER(TG, NAME)
 Defines a Binder named NAME for type RwTG or CnTG. More...
 

Typedefs

template<typename T , typename Ret = void>
using SUNphi::EnableIfIsBinder = EnableIf< isBinder< T >,Ret >
 
template<typename T >
using SUNphi::ConstrainIsBinder = ConstrainIsBaseOf< BaseBinder,T >
 
template<typename T >
using SUNphi::ConstrainIsNotBinder = ConstrainIsNotBaseOf< BaseBinder,T >
 

Functions

template<typename _Tg , typename SMET , typename... DummyTypes>
decltype(auto) SUNphi::bind (SMET &&smet, const int id, DummyTypes...)
 

Variables

template<typename T >
constexpr bool SUNphi::isBinder = isBaseOf<BaseBinder ,T>
 

Detailed Description

Defines a class which binds a component of a SmET.

Definition in file Bind.hpp.

Macro Definition Documentation

#define DEFINE_NAMED_BINDER (   TG,
  NAME 
)
Value:
\
template <typename T> /* Type of the bound expression */ \
DECLAUTO NAME(T&& ref, \
const int id) \
{ \
return bind<TG>(forw<T>(ref),id); \
}
Tens< Tk, double > T
Tensor class of the expression.
Definition: RelBind.hpp:263
#define DECLAUTO
Short name for decltype(auto)

Defines a Binder named NAME for type TG.

Definition at line 23 of file Bind.hpp.

#define DEFINE_NAMED_RW_OR_COL_BINDER (   TG,
  NAME 
)

Defines a Binder named NAME for type RwTG or CnTG.

< Type to get

Definition at line 34 of file Bind.hpp.

Typedef Documentation

template<typename T >
using SUNphi::ConstrainIsBinder = typedef ConstrainIsBaseOf<BaseBinder ,T>

Class forcing T to inherits from BaseBinder

Definition at line 75 of file Bind.hpp.

template<typename T >
using SUNphi::ConstrainIsNotBinder = typedef ConstrainIsNotBaseOf<BaseBinder ,T>

Class forcing T not to inherits from BaseBinder

Definition at line 75 of file Bind.hpp.

template<typename T , typename Ret = void>
using SUNphi::EnableIfIsBinder = typedef EnableIf< isBinder <T> ,Ret>

Provides the class itself if T is of the given type

Provides the class itself if T satisfies the condition

Definition at line 75 of file Bind.hpp.

Function Documentation

template<typename _Tg , typename SMET , typename... DummyTypes>
decltype(auto) SUNphi::bind ( SMET &&  smet,
const int  id,
DummyTypes...   
)

Bind the id component of type Tg from expression ref

Returns a plain binder getting from an unbind expression. Checks demanded to Binder.

Actual type to get

Parameters
smetQuantity to bind to
idEntry of the component to bind

Definition at line 221 of file Bind.hpp.

Variable Documentation

template<typename T >
constexpr bool SUNphi::isBinder = isBaseOf<BaseBinder ,T>

Expression which is true if T inherits from BaseBinder

Definition at line 75 of file Bind.hpp.