OpenVideo Documentation

   Main Page       Modules       Class Hierarchy       Alphabetical List       Compound List       File List       Compound Members       Related Pages   

Node.h

Go to the documentation of this file.
00001 /* ========================================================================
00002  * Copyright (C) 2005  Graz University of Technology
00003  *
00004  * This framework is free software; you can redistribute it and/or modify
00005  * it under the terms of the GNU General Public License as published by
00006  * the Free Software Foundation; either version 2 of the License, or
00007  * (at your option) any later version.
00008  *
00009  * This framework is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  * GNU General Public License for more details.
00013  *
00014  * You should have received a copy of the GNU General Public License
00015  * along with this framework; if not, write to the Free Software
00016  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00017  *
00018  * For further information please contact Denis Kalkofen under
00019  * <kalkofen@icg.tu-graz.ac.at> or write to Denis Kalkofen,
00020  * Graz University of Technology, Inffeldgasse 16a, A8010 Graz,
00021  * Austria.
00022  * ========================================================================
00023  * PROJECT: OpenVideo
00024  * ======================================================================== */
00031  /* ======================================================================= */
00032 
00033 #ifndef _NODEOV_H
00034 #define _NODEOV_H
00035 
00036 #include <openvideo/openVideo.h>
00037 
00038 #include <vector>
00039 #include <string>
00040 
00041 #include <openvideo/PixelFormat.h>
00042 
00043 namespace openvideo {
00044 class State;
00051 class OPENVIDEO_API Node
00052 {
00053 public:
00057     Node();
00058 
00062     virtual ~Node();
00063 
00067     virtual void initPixelFormats()=0;
00068 
00072     virtual bool validateCurrentPixelFormat();
00073 
00077     virtual const char*  getName();
00078 
00083     virtual void init();
00084 
00085 
00090     virtual void start();
00091 
00096     virtual void stop();
00097 
00102     virtual void process();
00103 
00108     virtual void postProcess();
00109 
00114     virtual void preProcess();
00115 
00122     virtual bool setParameter(std::string key, std::string value);
00123 
00127     openvideo::State* getState();
00128 
00129 
00134     void addOutput( openvideo::Node * output);
00135 
00141     void addInput( openvideo::Node * output);
00142 
00146     std::vector<openvideo::Node*>* getOutputs();
00147 
00151     std::vector<openvideo::Node*>* getInputs();
00152 
00156     int getInDegree();
00157 
00164     int getCurInDegree();
00165 
00172     void decCurInDegree();
00173     
00177     int getOutDegree();
00178 
00184     int getCurOutDegree();
00185 
00191     void decCurOutDegree();
00192 
00196     void resetCurInOutDegree();
00197 
00201     const char* getDefName();
00202 
00203 
00204     virtual const std::string& getTypeName() const  {  return typeName;  }
00205 
00206 
00207 protected:
00211     std::vector<openvideo::Node*> outputs;
00212 
00216     std::vector<openvideo::Node*> inputs;
00217 
00221     openvideo::State *state;
00222 
00228     int curInDegree;
00229 
00235     int curOutDegree;
00236 
00240     std::string name;
00241 
00243     std::string typeName;
00244 
00245 
00249     std::string defName;
00250 
00254     std::vector<PIXEL_FORMAT> pixelFormats;
00255 
00256     PIXEL_FORMAT curPixelFormat;
00257 };
00258 } //namespace openvideo {
00259 
00260 #endif
 This page was generated at Wed May 31 13:04:16 2006 for OpenVideo by Doxygen.
 If you have any comments, please send a message to schmalstieg@icg.tu-graz.ac.at.
www.studierstube.org