pipeline.h
Go to the documentation of this file.
1 /*
2  * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License").
5  * You may not use this file except in compliance with the License.
6  * A copy of the License is located at
7  *
8  * http://aws.amazon.com/apache2.0
9  *
10  * or in the "license" file accompanying this file. This file is distributed
11  * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12  * express or implied. See the License for the specific language governing
13  * permissions and limitations under the License.
14  */
15 
16 #pragma once
19 
20 namespace Aws {
21 namespace DataFlow {
22 
23 template <typename O>
25 template <typename I>
26 class InputStage;
27 
28 template <typename O>
29 class OutputStage {
30 public:
31  std::shared_ptr<Sink<O>> getSink() {
32  return sink_;
33  }
34 
35  template<
36  class T>
37  inline
38  typename std::enable_if<std::is_base_of<Sink<O>, T>::value, std::shared_ptr<T>>::type
39  setSink(std::shared_ptr<T> sink) {
40  sink_ = sink;
41  return sink;
42  }
43  private:
44  std::shared_ptr<Sink<O>> sink_;
45 };
46 
47 template <typename I>
48 class InputStage {
49  public:
50  inline std::shared_ptr<Source<I>> getSource() {
51  return source_;
52  }
53  inline void setSource(std::shared_ptr<Source<I>> source) {
54  source_ = source;
55  }
56  private:
57  std::shared_ptr<Source<I>> source_;
58 };
59 
60 } // namespace DataFlow
61 } // namespace Aws
void setSource(std::shared_ptr< Source< I >> source)
Definition: pipeline.h:53
std::shared_ptr< Sink< O > > sink_
Definition: pipeline.h:44
std::shared_ptr< Source< I > > source_
Definition: pipeline.h:57
std::enable_if< std::is_base_of< Sink< O >, T >::value, std::shared_ptr< T > >::type setSink(std::shared_ptr< T > sink)
Definition: pipeline.h:39
std::shared_ptr< Source< I > > getSource()
Definition: pipeline.h:50
std::shared_ptr< Sink< O > > getSink()
Definition: pipeline.h:31


dataflow_lite
Author(s): AWS RoboMaker
autogenerated on Fri May 7 2021 02:18:22