Lumiera  0.pre.03
»edit your freedom«
nodewiring-obsolete.cpp
Go to the documentation of this file.
1 /*
2  NodeWiring - Implementation of the node network and operation control
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 
14 
25 //#include "steam/engine/proc-node.hpp" ///////////////////////////////TODO clarify if required further on
27 #include "steam/engine/nodewiring-obsolete.hpp"
30 
32 
33 
34 namespace steam {
35 namespace engine {
36 
37  namespace config {
38 
39  using lib::meta::Flags;
42  using lib::meta::Apply;
43  using lib::meta::Filter;
44 
46 
47 
48  typedef Flags<CACHING,PROCESS,INPLACE>::Tuple AllFlags;
49 
52 
55 
58 
59 
60 
61  // internal details: setting up a factory for each required configuration
62 
63 
64 
69  template<class CONF>
71  {
72  AllocationCluster& alloc_;
73 
74  /* ==== pick actual wiring code ==== */
77 
78  // the concrete implementation of the glue code...
80 
81 
82  public:
84  : alloc_(a) {}
85 
87  operator() (WiringSituation const& intendedWiring)
88  {
89  return alloc_.create<ActualWiring> (intendedWiring);
90  }
91  };
92 
95 
98  , FunctionType
101 
102 
104  {
105  WiringSelector selector;
106 
108  : selector(config::PossibleConfigs::List(), alloc)
109  { }
110  };
111 
112  } // (END) internals (namespace config)
113 
114 
115 
116 
127  : alloc_(a),
128  pImpl_(new config::WiringFactoryImpl (alloc_))
129  { }
130 
131 
132  WiringFactory::~WiringFactory () {}
133 
134 
135 
136 
146  Connectivity&
148  {
149  long config = setup.getFlags();
150  return pImpl_->selector[config] (setup);
151  }
152 
153 
154 }} // namespace steam::engine
Fabricating a Connectivity descriptor tailored for a specific node wiring situation.
Actual implementation of the link between nodes, also acting as "track switch" for the execution path...
WiringFactory(lib::AllocationCluster &a)
As the WiringFactory (and all the embedded factories for the specific wiring situations) use the Allo...
Steam-Layer implementation namespace root.
ConfigSelector< WiringDescriptorFactory, FunctionType, AllocationCluster &> WiringSelector
preconfigured table of all possible factories
CombineFlags< AllFlags > AllFlagCombinations
build the list of all possible flag combinations
Apply< AllFlagCombinations::List, DefineConfigByFlags > AllConfigs
build a configuration type for each of those flag combinations
Connectivity & operator()(WiringSituation const &setup)
create and configure a concrete wiring descriptor to tie a ProcNode to its predecessor nodes...
Connectivity &() FunctionType(WiringSituation const &)
invocation signature of the factories
< using the parent StateAdapter for buffer allocations
generate all possible on-off combinations of the given flags
Helper for fabricating ProcNode Wiring configurations.
A pile of objects sharing common allocation and lifecycle.
filter away those types which don&#39;t fulfil a predicate metafunction
Interface: Description of the input and output ports, processing function and predecessor nodes for a...
Chunks of operation for invoking the rendernodes.
auto setup(FUN &&workFun)
Helper: setup a Worker-Pool configuration for the test.
Metaprogramming: Helpers for manipulating lists-of-types.
create a configuration type for the given list-of-flags
The real invocation context state implementation.
Filter< AllConfigs::List, Instantiation< Strategy >::Test > PossibleConfigs
filter those configurations which actually define a wiring strategy
apply a transformation (template) to each type in the list
Sometimes we need to choose a different implementation for dealing with some special cases...
Finding out about a concrete way of wiring up a ProcNode about to be built.