Lumiera  0.pre.03
»edit your freedom«
connectivity-obsolete.hpp
Go to the documentation of this file.
1 /*
2  PROC-NODE.hpp - Key abstraction of the Render Engine: a Processing Node
3 
4  Copyright (C)
5  2008, Hermann Vosseler <Ichthyostega@web.de>
6 
7   **Lumiera** is free software; you can redistribute it and/or modify it
8   under the terms of the GNU General Public License as published by the
9   Free Software Foundation; either version 2 of the License, or (at your
10   option) any later version. See the file COPYING for further details.
11 
12 */
13 
33 #ifndef STEAM_ENGINE_CONNECTIVITY_OBSOLETE_H
34 #define STEAM_ENGINE_CONNECTIVITY_OBSOLETE_H
35 
36 #ifdef STEAM_ENGINE_PROC_NODE_H
37  #error "can not include both the old and new Render Node Connectivity scheme"
38 #endif
39 
40 #include "lib/error.hpp"
41 #include "steam/common.hpp"
42 #include "steam/asset/proc.hpp"
44 #include "steam/engine/state-closure-obsolete.hpp"
46 #include "lib/frameid.hpp"
47 #include "lib/ref-array.hpp"
48 
49 #include <vector>
50 
51 
52 
53 namespace steam {
54 namespace engine {
55 
56  using std::vector;
57  using lumiera::NodeID;
58 
60  class ProcNode_Obsolete;
61  typedef ProcNode_Obsolete* PNode;
63 
64 
79  {
80  public: /* === public information record describing the node graph === */
82  uint nrO;
83  uint nrI;
84 
87 
88  typedef asset::Proc::ProcFunc ProcFunc;
89 
90  ProcFunc* procFunction;
91 
92  NodeID const& nodeID;
93 
94  virtual ~Connectivity() {}
96 
97  protected:
101  ProcFunc pFunc, NodeID const& nID)
102  : out(o), in(i),
103  procFunction(pFunc),
104  nodeID(nID)
105  {
106  nrO = out.size();
107  nrI = in.size();
108  }
110 
111 
113  /* ==== strategy API for configuring the node operation ==== */
114 
115  friend class ProcNode_Obsolete;
116 
122  virtual BuffHandle
123  callDown (StateClosure_OBSOLETE& currentProcess, uint requiredOutputNr) const =0;
125 
126  };
127 
128 
129 
130 
144  {
146  vector<Param> params;
147 
148  const Connectivity& wiringConfig_;
149 
150  public:
152  ProcNode_Obsolete (Connectivity const& wd)
153  : wiringConfig_(wd)
154  { }
155 
156  virtual ~ProcNode_Obsolete() {};
157 
159 
160  public:
162  bool isValid() const;
163 
165  uint nrO() { return wiringConfig_.nrO; }
167 
168 
181  BuffHandle
182  pull (StateClosure_OBSOLETE& currentProcess, uint requestedOutputNr=0) const
183  {
184  return this->wiringConfig_.callDown (currentProcess, requestedOutputNr);
185  }
187 
188  };
189 
190 
192  inline bool
193  ProcNode_Obsolete::isValid() const
194  {
195  UNIMPLEMENTED ("ProcNode validity self-check");
196  return false;
197  }
198 
199 
200 }} // namespace steam::engine
201 #endif /*STEAM_ENGINE_CONNECTIVITY_OBSOLETE_H*/
Abstraction: Array of const references.
Definition: ref-array.hpp:42
Basic set of definitions and includes commonly used together.
BuffHandle pull(StateClosure_OBSOLETE &currentProcess, uint requestedOutputNr=0) const
Engine Core operation: render and pull output from this node.
Marker tuple to identify a specific frame.
Any copy and copy construction prohibited.
Definition: nocopy.hpp:37
Representation of the Media type of a data channel used within the engine.
Descriptor and access object for a plugin parameter.
Definition: parameter.hpp:40
Steam-Layer implementation namespace root.
Abstraction to access the state of a currently ongoing render/calculation process, as it is tied to the supporting facilities of the vault layer.
Data processing Plugins and Codecs can be treated as a specific Kind of Asset.
Abstraction interface: array-like access by subscript.
virtual BuffHandle callDown(StateClosure_OBSOLETE &currentProcess, uint requiredOutputNr) const =0
the wiring-dependent part of the node operation.
Lumiera error handling (C++ interface).
Handle for a buffer for processing data, abstracting away the actual implementation.
Definition: buffhandle.hpp:111
Interface: Description of the input and output ports, processing function and predecessor nodes for a...
Identification tuple for denoting render nodes unambiguously.
Definition: frameid.hpp:45
Key abstraction of the Render Engine: A Data processing Node.
Core abstraction: parameter to be controlled and possibly automated.