13 #ifndef ML_TYPED_PROCESSING_H
14 #define ML_TYPED_PROCESSING_H
27 template <
class Processor,
template <
typename,
int,
typename>
class VariableType>
31 inline void process(
int dataType, Processor& f)
34 internal::EmptyType args;
35 this->
template doSwitchingCode<internal::EmptyTypeTuple4, internal::EmptyType >(dataType, args);
38 template<
typename Types>
41 _f->template process<typename Types::T0>();
49 template <
class Processor,
50 template <
typename,
int,
typename>
class VariableType1,
51 template <
typename,
int,
typename>
class VariableType2>
53 public VariableType1<DualTypeCaller<Processor, VariableType1, VariableType2>, 0, internal::EmptyType >,
54 public VariableType2<DualTypeCaller<Processor, VariableType1, VariableType2>, 1, internal::EmptyType >
57 inline void process(
int firstDataType,
int secondDataType, Processor& f)
60 _secondDataType = secondDataType;
61 internal::EmptyType args;
62 static_cast<VariableType1<DualTypeCaller<Processor, VariableType1, VariableType2>, 0, internal::EmptyType
> *>(
this)->
template doSwitchingCode<internal::EmptyTypeTuple4, internal::EmptyType >(firstDataType, args);
65 template<
typename Types>
68 static_cast<VariableType2<DualTypeCaller<Processor, VariableType1, VariableType2>, 1, internal::EmptyType
> *>(
this)->
template doSwitchingCode<Types, internal::DispatchVariableType1Label >(_secondDataType, args);
71 template<
typename Types>
74 _f->template process<typename Types::T0, typename Types::T1>();
84 namespace TypedProcessing
129 template <
template <
typename,
int,
typename>
class VariableType,
class Processor>
133 caller.
process(dataType, processor);
142 template <
template <
typename,
int,
typename>
class VariableType1,
143 template <
typename,
int,
typename>
class VariableType2,
148 caller.
process(firstDataType, secondDataType, processor);
Base class for all variable types, mainly for Doxygen documentation purpose.
Internal helper class that uses VariableType1 and VariableType2 to convert two data type integers to ...
void process(int firstDataType, int secondDataType, Processor &f)
void doSwitchingWithLabel(const internal::EmptyType &, internal::DispatchVariableType1Label *)
void doSwitchingWithLabel(const internal::EmptyType &args, internal::EmptyType *)
Internal helper class that uses a VariableType to convert a data type integer to the correct Processo...
void process(int dataType, Processor &f)
void doSwitchingWithLabel(const internal::EmptyType &, internal::EmptyType *)
MLint32 MLDataType
MLDataType.
static void call(MLDataType firstDataType, MLDataType secondDataType, Processor &processor)
Call the process<DataType1, DataType2>() method on the given processor, where the DataType1 and DataT...