aimstil  5.0.5
TExprMacros.h File Reference

Some macros to ease the otherwise tedious and unreadable declaration of template expression classes. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define EXPRFUNC_1ARG(name, body)   EXPRFUNC_1ARG_ARG(name, body, i1)
 
#define EXPRFUNC_2ARG(name, body)   EXPRFUNC_2ARG_ARG(name, body, i1, i2)
 
#define EXPRFUNC_3ARG(name, body)   EXPRFUNC_3ARG_ARG(name, body, i1, i2, i3)
 
#define TIL_COMMA   ,
 
#define EXPRFUNC_1ARG_RET(name, body, ret)   EXPRFUNC_1ARG_FULL(name, body, ret, i1)
 
#define EXPRFUNC_2ARG_RET(name, body, ret)   EXPRFUNC_2ARG_FULL(name, body, ret, i1, i2)
 
#define EXPRFUNC_3ARG_RET(name, body, ret)   EXPRFUNC_3ARG_FULL(name, body, ret, i1, i2, i3)
 
#define EXPRFUNC_1ARG_ARG(name, body, arg1)   EXPRFUNC_1ARG_FULL(name, body, typename TypeStruct<Iterator1>::Type, arg1)
 
#define EXPRFUNC_2ARG_ARG(name, body, arg1, arg2)   EXPRFUNC_2ARG_FULL(name, body, typename TypeStruct<Iterator1 TIL_COMMA Iterator2>::Type, arg1, arg2)
 
#define EXPRFUNC_3ARG_ARG(name, body, arg1, arg2, arg3)   EXPRFUNC_3ARG_FULL(name, body, typename TypeStruct<Iterator1 TIL_COMMA Iterator2 TIL_COMMA Iterator3>::Type, arg1, arg2, arg3)
 
#define EXPRFUNC_1ARG_FULL(name, body, ret, arg1)
 
#define EXPRFUNC_2ARG_FULL(name, body, ret, arg1, arg2)
 
#define EXPRFUNC_3ARG_FULL(name, body, ret, arg1, arg2, arg3)
 
#define EXPR_RESULT_TYPE(rettype)
 Used to define the return type of template expresions. More...
 
#define EXPR_ITERATORTYPE(rettype)
 

Detailed Description

Some macros to ease the otherwise tedious and unreadable declaration of template expression classes.

Definition in file TExprMacros.h.

Macro Definition Documentation

◆ EXPR_ITERATORTYPE

#define EXPR_ITERATORTYPE (   rettype)
Value:
template < class Iterator1, class Iterator2 = Iterator1, class Iterator3 = Iterator1> \
struct IteratorStruct \
{ \
typedef rettype Type; \
} \

Definition at line 65 of file TExprMacros.h.

◆ EXPR_RESULT_TYPE

#define EXPR_RESULT_TYPE (   rettype)
Value:
template < class Iterator1, class Iterator2 = Iterator1, class Iterator3 = Iterator1> \
struct TypeStruct \
{ \
typedef rettype Type; \
} \

Used to define the return type of template expresions.

The return type of a template expression is accessible via X::TypeStruct<Iterator1,Iterator2,Iterator3>::Type

Definition at line 58 of file TExprMacros.h.

◆ EXPRFUNC_1ARG

#define EXPRFUNC_1ARG (   name,
  body 
)    EXPRFUNC_1ARG_ARG(name, body, i1)

Definition at line 12 of file TExprMacros.h.

Referenced by til::expr::TExpr< Expr >::getExpr().

◆ EXPRFUNC_1ARG_ARG

#define EXPRFUNC_1ARG_ARG (   name,
  body,
  arg1 
)    EXPRFUNC_1ARG_FULL(name, body, typename TypeStruct<Iterator1>::Type, arg1)

Definition at line 24 of file TExprMacros.h.

Referenced by til::expr::TExprLValue< T >::TExprLValue().

◆ EXPRFUNC_1ARG_FULL

#define EXPRFUNC_1ARG_FULL (   name,
  body,
  ret,
  arg1 
)
Value:
template < class Iterator1 > \
ret \
name (Iterator1 & arg1) \
{ \
body \
} \

Definition at line 29 of file TExprMacros.h.

◆ EXPRFUNC_1ARG_RET

#define EXPRFUNC_1ARG_RET (   name,
  body,
  ret 
)    EXPRFUNC_1ARG_FULL(name, body, ret, i1)

Definition at line 20 of file TExprMacros.h.

◆ EXPRFUNC_2ARG

#define EXPRFUNC_2ARG (   name,
  body 
)    EXPRFUNC_2ARG_ARG(name, body, i1, i2)

Definition at line 13 of file TExprMacros.h.

Referenced by til::expr::TExpr< Expr >::getExpr().

◆ EXPRFUNC_2ARG_ARG

#define EXPRFUNC_2ARG_ARG (   name,
  body,
  arg1,
  arg2 
)    EXPRFUNC_2ARG_FULL(name, body, typename TypeStruct<Iterator1 TIL_COMMA Iterator2>::Type, arg1, arg2)

Definition at line 25 of file TExprMacros.h.

Referenced by til::expr::TExprLValue< T >::TExprLValue().

◆ EXPRFUNC_2ARG_FULL

#define EXPRFUNC_2ARG_FULL (   name,
  body,
  ret,
  arg1,
  arg2 
)
Value:
template < class Iterator1, class Iterator2> \
ret \
name (Iterator1 & arg1, Iterator2 & arg2) \
{ \
body \
} \

Definition at line 37 of file TExprMacros.h.

◆ EXPRFUNC_2ARG_RET

#define EXPRFUNC_2ARG_RET (   name,
  body,
  ret 
)    EXPRFUNC_2ARG_FULL(name, body, ret, i1, i2)

Definition at line 21 of file TExprMacros.h.

Referenced by til::expr::SecondArgument::operator()().

◆ EXPRFUNC_3ARG

#define EXPRFUNC_3ARG (   name,
  body 
)    EXPRFUNC_3ARG_ARG(name, body, i1, i2, i3)

Definition at line 14 of file TExprMacros.h.

Referenced by til::expr::TExpr< Expr >::getExpr().

◆ EXPRFUNC_3ARG_ARG

#define EXPRFUNC_3ARG_ARG (   name,
  body,
  arg1,
  arg2,
  arg3 
)    EXPRFUNC_3ARG_FULL(name, body, typename TypeStruct<Iterator1 TIL_COMMA Iterator2 TIL_COMMA Iterator3>::Type, arg1, arg2, arg3)

Definition at line 26 of file TExprMacros.h.

Referenced by til::expr::TExprLValue< T >::TExprLValue().

◆ EXPRFUNC_3ARG_FULL

#define EXPRFUNC_3ARG_FULL (   name,
  body,
  ret,
  arg1,
  arg2,
  arg3 
)
Value:
template < class Iterator1, class Iterator2, class Iterator3 > \
ret \
name (Iterator1 & arg1, Iterator2 & arg2, Iterator3 & arg3) \
{ \
body \
} \

Definition at line 45 of file TExprMacros.h.

◆ EXPRFUNC_3ARG_RET

#define EXPRFUNC_3ARG_RET (   name,
  body,
  ret 
)    EXPRFUNC_3ARG_FULL(name, body, ret, i1, i2, i3)

◆ TIL_COMMA

#define TIL_COMMA   ,

Definition at line 16 of file TExprMacros.h.