
#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 {
 public:
  using raw_types = std::tuple<O...>;
  using values_type = std::tuple<output<P, O>...>;

  template<int N>
  using raw_type_at = typename std::tuple_element<N, raw_types>::type;
  template<int N>
  using value_type_at = typename std::tuple_element<N, values_type>::type;

 private:
  values_type values_;

 public:
  template<int N>
  value_type_at<N> &get() {
    return std::get<N>(values_);
  }
};

}
}
}

#endif //PLS_DATAFLOW_INTERNAL_OUTPUTS_H_
