[ VIGRA Homepage | Class Index | Function Index | File Index | Main Page ]

| FunctorTraits Class Template Reference |
--- | --- | ---

Export associated information for a functor. More...

`#include "vigra/functortraits.hxx"`

## Detailed Description

### template<class T>
class vigra::FunctorTraits< T >

Export associated information for a functor.

The FunctorTraits class contains the following fields:

        template <class T>
        struct FunctorTraits
        {
            typedef T type;

            typedef ... isInitializer;

            typedef ... isUnaryFunctor;
            typedef ... isBinaryFunctor;
            typedef ... isTernaryFunctor;

            typedef ... isUnaryAnalyser;
            typedef ... isBinaryAnalyser;
            typedef ... isTernaryAnalyser;
        };

Where the dots are either `VigraTrueType` or `VigraFalseType` depending on whether the functor supports the respective functionality or not. If a functor `f`is a model of these categories, it supports the following calls (`v` is a variable such that the result type of the functor calls can be converted into `v`'s type, and `a1, a2, a3` are variables convertible into the functor's argument types):``

Initializer
  `v = f()` (used with initImageWithFunctor())
UnaryFunctor
  `v = f(a1)` (used with transformImage())
BinaryFunctor
  `v = f(a1, a2)` (used with combineTwoImages())
TernaryFunctor
  `v = f(a1, a2, a3)` (used with combineThreeImages())
UnaryAnalyser
  `f(a1)` (return type `void>/tt>, used with inspectImage())`
BinaryAnalyser
  `f(a1, a2)` (return type `void>/tt>, used with inspectTwoImages())`
TernaryAnalyser
  `f(a1, a2, a3)` (return type `void>/tt>)`

It should be noted that the functor's argument and result types are not contained in the traits class: Since the function calls are often member template functions in VIGRA, many functors do not have fixed argument types. Neither are the result types fixed in this case because they are computed (via a template meta-program) from the argument types.

#include "vigra/functortraits.hxx" Namespace: vigra

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

- vigra/functortraits.hxx

© Ullrich Köthe (koethe@informatik.uni-hamburg.de) Cognitive Systems Group, University of Hamburg, Germany | html generated using doxygen and Python VIGRA 1.5.0 (7 Dec 2006)