00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef Fennel_ExecStreamGraphEmbryo_Included
00025 #define Fennel_ExecStreamGraphEmbryo_Included
00026
00027 #include "fennel/exec/ExecStreamDefs.h"
00028
00029 #include <boost/utility.hpp>
00030 #include <map>
00031
00032 FENNEL_BEGIN_NAMESPACE
00033
00041 class FENNEL_EXEC_EXPORT ExecStreamGraphEmbryo
00042 : public boost::noncopyable
00043 {
00044 typedef std::map<std::string,ExecStreamEmbryo> StreamMap;
00045 typedef StreamMap::const_iterator StreamMapConstIter;
00046 typedef StreamMap::iterator StreamMapIter;
00047
00051 SharedExecStreamGraph pGraph;
00052
00056 SharedExecStreamScheduler pScheduler;
00057
00061 SharedCacheAccessor pCacheAccessor;
00062
00066 SegmentAccessor scratchAccessor;
00067
00071 StreamMap allStreamEmbryos;
00072
00084 void initializeAdapter(
00085 ExecStreamEmbryo &embryo,
00086 std::string const &streamName,
00087 uint iOutput,
00088 std::string const &adapterName);
00089
00090 public:
00091 explicit ExecStreamGraphEmbryo(
00092 SharedExecStreamGraph pGraph,
00093 SharedExecStreamScheduler pScheduler,
00094 SharedCache pCache,
00095 SharedSegmentFactory pSegmentFactory);
00096
00097 virtual ~ExecStreamGraphEmbryo();
00098
00104 void initStreamParams(ExecStreamParams ¶ms);
00105
00109 ExecStreamGraph &getGraph();
00110
00114 SegmentAccessor &getScratchAccessor();
00115
00135 SharedExecStream addAdapterFor(
00136 const std::string &name,
00137 uint iOutput,
00138 ExecStreamBufProvision requiredDataFlow);
00139
00145 void saveStreamEmbryo(
00146 ExecStreamEmbryo &embryo);
00147
00155 ExecStreamEmbryo &getStreamEmbryo(
00156 const std::string &name);
00157
00170 void addDataflow(
00171 const std::string &source,
00172 const std::string &target,
00173 bool isImplicit = false);
00174
00182 void prepareGraph(
00183 SharedTraceTarget pTraceTarget,
00184 std::string const &tracePrefix);
00185 };
00186
00187 FENNEL_END_NAMESPACE
00188
00189 #endif
00190
00191