Lumiera  0.pre.03
»edit your freedom«
node-graph-attachment.hpp
Go to the documentation of this file.
1 /*
2  NODE-GRAPH-ATTACHMENT.hpp - Binding from a Fixture-Segment into the low-level-Model
3 
4  Copyright (C) Lumiera.org
5  2023, Hermann Vosseler <Ichthyostega@web.de>
6 
7  This program is free software; you can redistribute it and/or
8  modify it under the terms of the GNU General Public License as
9  published by the Free Software Foundation; either version 2 of
10  the License, or (at your option) any later version.
11 
12  This program is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License
18  along with this program; if not, write to the Free Software
19  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 
21 */
22 
23 
36 #ifndef STEAM_FIXTURE_NODE_GRAPH_ATTACHMENT_H
37 #define STEAM_FIXTURE_NODE_GRAPH_ATTACHMENT_H
38 
40 //#include "lib/time/timevalue.hpp"
41 #include "lib/util.hpp"
42 
43 #include <utility>
44 
45 namespace steam {
46 namespace fixture {
47 
48  using engine::ExitNode;
49  using engine::ExitNodes;
50 
51 
64  {
65  ExitNodes exitNodes_;
66 
67  public:
69  : exitNodes_{}
70  { }
71 
72  NodeGraphAttachment (ExitNodes&& exitNodes)
73  : exitNodes_{std::move (exitNodes)}
74  { }
75 
76  // default copy acceptable
77 
78  ExitNode const&
79  operator[] (size_t idx) const
80  {
81  return idx < exitNodes_.size()? exitNodes_[idx]
82  : ExitNode::NIL;
83  }
84 
85  bool
86  empty() const
87  {
88  return util::isnil (exitNodes_);
89  }
90  };
91 
92 
93 
94 }} // namespace steam::fixture
95 #endif /*STEAM_FIXTURE_NODE_GRAPH_ATTACHMENT_H*/
Effective top-level exit point to pull rendered data from the nodes network.
Steam-Layer implementation namespace root.
A top-level point in the render node network where data generation can be driven. ...
Definition: exit-node.hpp:72
Tiny helper functions and shortcuts to be used everywhere Consider this header to be effectively incl...
Binding and access point from a given Segment to access the actual render nodes.
static ExitNode NIL
storage for the »inactive« ExitNode marker
Definition: exit-node.hpp:103