Inviwo 0.9.12-pre
Inviwo documentation
|
Namespaces | |
namespace | filter |
Classes | |
class | DispatchException |
Functions | |
template<typename Result , template< class > class Predicate, typename Callable , typename... Args> | |
auto | singleDispatch (DataFormatId format, Callable &&obj, Args &&... args) -> Result |
template<typename Result , template< class > class Predicate1, template< class > class Predicate2, typename Callable , typename... Args> | |
auto | doubleDispatch (DataFormatId format1, DataFormatId format2, Callable &&obj, Args &&... args) -> Result |
template<typename Result , template< class > class Predicate1, template< class > class Predicate2, template< class > class Predicate3, typename Callable , typename... Args> | |
auto | tripleDispatch (DataFormatId format1, DataFormatId format2, DataFormatId format3, Callable &&obj, Args &&... args) -> Result |
template<typename Result , template< class > class Predicate, typename Callable , typename... Args> | |
auto | dispatch (DataFormatId format, Callable &&obj, Args &&... args) -> Result |
dispatching
auto inviwo::dispatching::dispatch | ( | DataFormatId | format, |
Callable && | obj, | ||
Args &&... | args ) -> Result |
Same functionality as singleDispatch, but the callable is passed both the dispatch type and the return type as template arguments. And the dispatch type is passed as a DataFormat<T> where as singleDispatch passes T directly.
auto inviwo::dispatching::doubleDispatch | ( | DataFormatId | format1, |
DataFormatId | format2, | ||
Callable && | obj, | ||
Args &&... | args ) -> Result |
Function for dispatching on two DataFormats
Add two VolumeRAMPrecisions with different runtime types
Result | the return type of the lambda. |
Predicate1 | a type that is used to filter the list of types to consider in the dispatching for the first format1. The dispatching::filter namespace have a few standard ones predefined. |
Predicate2 | a type that is used to filter the list of types to consider in the dispatching for the second format2. The dispatching::filter namespace have a few standard ones predefined. |
format1 | ID if for the first dataformat to dispatch on |
format2 | ID if for the second dataformat to dispatch on |
obj | This should be a callable with a generic call operator taking two template arguments T1 and T2 of the dispatch types. The callable will be called with the supplied arguments (args ). For example []<typename T1, typename T2>() {}. T1 and T2 here will be, float, double, int, ... vec2, dvec2, etc. |
args | Any arguments that should be passed on to the callable. |
dispatching::DispatchException | in the case that the format is not in the list of formats after the filtering. |
auto inviwo::dispatching::singleDispatch | ( | DataFormatId | format, |
Callable && | obj, | ||
Args &&... | args ) -> Result |
Function for dispatching on a DataFormat
Create a VolumeRAMPrecision<T> with the type of T given by the runtime dataFormatId.
Result | the return type of the lambda. |
Predicate | a type that is used to filter the list of types to consider in the dispatching. The dispatching::filter namespace have a few standard ones predefined. |
format | ID if for the dataformat to dispatch on |
obj | This should be a callable with a generic call operator taking a template argument T of the dispatch type. The callable will be called with the supplied arguments (args ). For example []<typename T>() {}. T here will be, float, double, int, ... vec2, dvec2, etc. |
args | Any arguments that should be passed on to the callable. |
dispatching::DispatchException | in the case that the format is not in the list of formats after the filtering. |
auto inviwo::dispatching::tripleDispatch | ( | DataFormatId | format1, |
DataFormatId | format2, | ||
DataFormatId | format3, | ||
Callable && | obj, | ||
Args &&... | args ) -> Result |
Function for dispatching on three DataFormats
Add two VolumeRAMPrecisions with different runtime types and a runtime result type
Result | the return type of the lambda. |
Predicate1 | a type that is used to filter the list of types to consider in the dispatching for the first format1. The dispatching::filter namespace have a few standard ones predefined. |
Predicate2 | a type that is used to filter the list of types to consider in the dispatching for the second format2. The dispatching::filter namespace have a few standard ones predefined. |
Predicate3 | a type that is used to filter the list of types to consider in the dispatching for the third format3. The dispatching::filter namespace have a few standard ones predefined. |
format1 | ID if for the first dataformat to dispatch on |
format2 | ID if for the second dataformat to dispatch on |
format3 | ID if for the third dataformat to dispatch on |
obj | This should be a callable with a generic call operator taking three template arguments T1, T2 and T3 of the dispatch types. The callable will be called with the supplied arguments (args ). For example []<typename T1, typename T2, typename T3>() {}. T1 and T2 here will be, float, double, int, ... vec2, dvec2, etc. |
args | Any arguments that should be passed on to the callable. |
dispatching::DispatchException | in the case that the format is not in the list of formats after the filtering. |