1 /*******************************************************************************
2  * thrill/api/source_node.hpp
3  *
4  * Part of Project Thrill - http://project-thrill.org
5  *
6  * Copyright (C) 2016 Timo Bingmann <tb@panthema.net>
7  *
8  * All rights reserved. Published under the BSD-2 license in the LICENSE file.
9  ******************************************************************************/
10 
11 #pragma once
12 #ifndef THRILL_API_SOURCE_NODE_HEADER
13 #define THRILL_API_SOURCE_NODE_HEADER
14 
15 #include <thrill/api/dia_node.hpp>
16 
17 namespace thrill {
18 namespace api {
19 
20 //! \ingroup api_layer
21 //! \{
22 
23 template <typename ValueType>
24 class SourceNode : public DIANode<ValueType>
25 {
26 public:
27     using Super = DIANode<ValueType>;
28 
SourceNode(Context & ctx,const char * label)29     SourceNode(Context& ctx, const char* label)
30         : Super(ctx, label, { /* parent_ids */ }, { /* parents */ })
31     { }
32 
33     //! SourceNodes generally do not Execute, they only PushData.
Execute()34     void Execute() override { }
35 };
36 
37 //! \}
38 
39 } // namespace api
40 } // namespace thrill
41 
42 #endif // !THRILL_API_SOURCE_NODE_HEADER
43 
44 /******************************************************************************/
45