00001 /* -*- c++ -*- */ 00002 /* 00003 * Copyright 2003 Free Software Foundation, Inc. 00004 * 00005 * This file is part of GNU Radio 00006 * 00007 * GNU Radio is free software; you can redistribute it and/or modify 00008 * it under the terms of the GNU General Public License as published by 00009 * the Free Software Foundation; either version 2, or (at your option) 00010 * any later version. 00011 * 00012 * GNU Radio is distributed in the hope that it will be useful, 00013 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 * GNU General Public License for more details. 00016 * 00017 * You should have received a copy of the GNU General Public License 00018 * along with GNU Radio; see the file COPYING. If not, write to 00019 * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 00020 * Boston, MA 02111-1307, USA. 00021 */ 00022 00023 #ifndef _INCLUDED_GR_FLOWGRAPHIMPL_H_ 00024 #define _INCLUDED_GR_FLOWGRAPHIMPL_H_ 00025 00026 #include <gr_FlowGraph.h> 00027 #include <omnithread.h> 00028 #include <vector> 00029 00030 class VrMultiTask; 00031 00036 class gr_FlowGraphImpl : public gr_FlowGraph { 00037 private: 00038 bool d_run; 00039 bool d_has_been_started; 00040 omni_mutex d_mutex; 00041 omni_thread *d_thread; 00042 VrMultiTask *d_mt; 00043 std::vector<VrSigProc *> d_sigprocs; 00044 00045 bool add_sigproc (VrSigProc *); 00046 00047 // NOT IMPLEMENTED 00048 gr_FlowGraphImpl (const gr_FlowGraphImpl &rhs); 00049 00050 public: 00051 // CONSTRUCTORS 00052 gr_FlowGraphImpl (); 00053 ~gr_FlowGraphImpl (); 00054 00055 // MANIPULATORS 00056 bool start (); 00057 void stop (); 00058 void wait (); 00059 bool connect (VrSigProc *upstream, VrSigProc *downstream); 00060 bool connect (VrSigProc *upstream, int upstream_port, VrSigProc *downstream); 00061 00062 // ACCESSORS 00063 bool isRunning (); 00064 00065 VrMultiTask *mt () { return d_mt; } 00066 }; 00067 00068 #endif /* _INCLUDED_GR_FLOWGRAPHIMPL_H_ */