ExecStreamGraphEmbryo.h

Go to the documentation of this file.
00001 /*
00002 // $Id: //open/dev/fennel/exec/ExecStreamGraphEmbryo.h#14 $
00003 // Fennel is a library of data storage and processing components.
00004 // Copyright (C) 2005-2009 The Eigenbase Project
00005 // Copyright (C) 2005-2009 SQLstream, Inc.
00006 // Copyright (C) 2005-2009 LucidEra, Inc.
00007 // Portions Copyright (C) 2004-2009 John V. Sichi
00008 //
00009 // This program is free software; you can redistribute it and/or modify it
00010 // under the terms of the GNU General Public License as published by the Free
00011 // Software Foundation; either version 2 of the License, or (at your option)
00012 // any later version approved by The Eigenbase Project.
00013 //
00014 // This program is distributed in the hope that it will be useful,
00015 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00016 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017 // GNU General Public License for more details.
00018 //
00019 // You should have received a copy of the GNU General Public License
00020 // along with this program; if not, write to the Free Software
00021 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
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 &params);
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 // End ExecStreamGraphEmbryo.h

Generated on Mon Jun 22 04:00:18 2009 for Fennel by  doxygen 1.5.1