Commit 52d39102 by FritzFlorian

Restructure to allow a clean interface for end users.

We need some tricks in template programming to have a clean user facing API while internally using our classes with more capabilities.
parent 630d24de
#ifndef PLS_DATAFLOW_INTERNAL_INPUTS_H_
#define PLS_DATAFLOW_INTERNAL_INPUTS_H_
#include <tuple>
#include "input.h"
namespace pls {
namespace dataflow {
namespace internal {
template<int P, typename ...I>
class inputs {
using values_type = std::tuple<input<I>...>;
values_type values_;
public:
template<int N>
typename std::tuple_element<N, values_type>::type &get() {
return std::get<N>(values_);
}
};
}
}
}
#endif //PLS_DATAFLOW_INTERNAL_INPUTS_H_
#ifndef PLS_DATAFLOW_INTERNAL_OUTPUTS_H_
#define PLS_DATAFLOW_INTERNAL_OUTPUTS_H_
#include <tuple>
#include "output.h"
namespace pls {
namespace dataflow {
namespace internal {
template<int P, typename ...O>
class outputs {
using values_type = std::tuple<output<O>...>;
values_type values_;
public:
template<int N>
typename std::tuple_element<N, values_type>::type &get() {
return std::get<N>(values_);
}
};
}
}
}
#endif //PLS_DATAFLOW_INTERNAL_OUTPUTS_H_
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment