Lumiera  0.pre.03
»edit your freedom«
nodewiring-def.hpp
Go to the documentation of this file.
1 /*
2  NODEWIRING-DEF.hpp - Implementation of the node network and operation control
3 
4  Copyright (C) Lumiera.org
5  2009, 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 
39 #ifndef ENGINE_NODEWIRING_DEF_H
40 #define ENGINE_NODEWIRING_DEF_H
41 
42 
44 #include "lib/ref-array.hpp"
45 #include "lib/util-foreach.hpp"
46 #include "lib/nocopy.hpp"
47 
48 
49 
50 namespace steam {
51 namespace engine {
52 
53  using lib::RefArray;
54 
55 
73  {
74  long flags_;
75  asset::Proc::ProcFunc* function_;
76 
77  public: /* === API for querying collected data === */
79  makeOutDescriptor() const
80  {
81  UNIMPLEMENTED ("build new output descriptors for the node under construction");
82  }
83 
85  makeInDescriptor() const
86  {
87  UNIMPLEMENTED ("build new input descriptors for the node under construction");
88  }
89 
90  WiringDescriptor::ProcFunc*
91  resolveProcessingFunction() const
92  {
93  REQUIRE (function_);
94  return function_;
95  }
96 
97  lumiera::NodeID const&
98  createNodeID() const
99  {
100  UNIMPLEMENTED ("initiate generation of a new unique node-ID"); // see rendergraph.cpp
101  }
102 
103 
104 
105  public: /* === API for specifying the desired wiring === */
106 
112  : flags_(0)
113  , function_(0)
114  {
115  UNIMPLEMENTED ("representation of the intended wiring");
116  }
117 
118 
122  WiringSituation (PNode predecessor)
123  : flags_(0)
124  , function_(0)
125  {
126  UNIMPLEMENTED ("wiring representation; hook up connections 1:1");
127  REQUIRE (predecessor);
128 
130  // for_each (predecessor->outputs(), ..... see also Ticket 183 (invoking member fun in for_each)
131 
132  }
133 
134 
137  defineInput (uint inPin, PNode pred, uint outPin)
138  {
139  UNIMPLEMENTED ("wiring representation; define new connection");
140  return *this;
141  }
142 
146  defineInput (PNode pred, uint outPin)
147  {
148  UNIMPLEMENTED ("wiring representation; define new connection");
149  return *this;
150  }
151 
155  defineInput (uint inPin, PNode pred)
156  {
157  UNIMPLEMENTED ("wiring representation; define new connection");
158  return *this;
159  }
160 
161 
164  setFlag (long code)
165  {
166  flags_ |= code;
167  return *this;
168  }
169 
170  long getFlags () const { return flags_; }
171 
172 
175  resolveProcessor (asset::Proc const& procAsset)
176  {
177  function_ = procAsset.resolveProcessor();
178  ENSURE (function_);
179  }
180 
181  };
182 
183 
184 
185 }} // namespace steam::engine
186 #endif
Interface to the processing nodes and the render nodes network.
Abstraction: Array of const references.
Definition: ref-array.hpp:48
WiringSituation(PNode predecessor)
Continue the wiring by hooking directly into the output of an existing predecessor node...
Any copy and copy construction prohibited.
Definition: nocopy.hpp:46
WiringSituation & defineInput(uint inPin, PNode pred, uint outPin)
set up a connection leading to a specific input pin of the new node
WiringSituation & setFlag(long code)
set detail flags regarding the desired node operation mode
Steam-Layer implementation namespace root.
Mix-Ins to allow or prohibit various degrees of copying and cloning.
key abstraction: data processing asset
Definition: proc.hpp:72
Abstraction interface: array-like access by subscript.
WiringSituation & resolveProcessor(asset::Proc const &procAsset)
trigger resolving of the actual processing function
Key abstraction of the Render Engine: A Data processing Node.
Definition: procnode.hpp:135
WiringSituation & defineInput(PNode pred, uint outPin)
set up the next input connection, originating at a specific output pin of the predecessor ...
Identification tuple for denoting render nodes unambiguously.
Definition: frameid.hpp:51
WiringSituation()
A default WiringSituation doesn&#39;t specify any connections.
virtual ProcFunc * resolveProcessor() const =0
resolve any plugin and configuration info to yield the actual media data processing function...
WiringSituation & defineInput(uint inPin, PNode pred)
set up the next input connection to a specific input pin, originating at a the next/sole output pin o...
Perform operations "for each element" of a collection.
Finding out about a concrete way of wiring up a ProcNode about to be built.