
#ifndef PLS_DATAFLOW_TOKEN_H_
#define PLS_DATAFLOW_TOKEN_H_

namespace pls {
namespace dataflow {

/**
 * Parallel invocations of the same sub-graph are usually working with some kind of coloring
 * for tokens to distinguishe different invocations. As this concept is abstract and we could
 * change it in the future (for e.g. more advanced features/dataflows) we encapsulate it.
 */
struct color {
  unsigned int clock_;
};

template<typename T>
class token {
  T value_;
  color color_;

 public:
  T value() const { return value_; }
  color color() const { return color_; }
};

}
}

#endif //PLS_DATAFLOW_TOKEN_H_
