Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members

MProcess.h

00001 /*
00002 
00003     This file is part of la Marmite.
00004     Copyright (C) 2005 Nicolas Falquet.
00005 
00006     La Marmite is free software ; you can redistribute it and/or
00007     modify it under the terms of the GNU General Public License as
00008     published by the Free Software Foundation ; either version 2 of
00009     the License, or (at your option) any later version.
00010 
00011     La Marmite is distributed in the hope that it will be useful, but
00012     WITHOUT ANY WARRANTY; without even the implied warranty of
00013     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014     General Public License for more details.
00015 
00016     You should have received a copy of the GNU General Public License
00017     along with la Marmite ; if not, write to the Free Software
00018     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
00019     02111-1307  USA
00020 
00021 */
00022 
00023 #ifndef M_PROCESS_H
00024 #define M_PROCESS_H
00025 
00026 using namespace std;
00027 
00028 #include <qobject.h>
00029 
00030 #include <string>
00031 
00045 class MProcess /* abstract */ : public QObject
00046 {
00047 
00048   Q_OBJECT
00049 
00050 public :
00051 
00052   // constructor - destructor
00053 
00057   MProcess ( string name ) : _name ( name ) { }
00058 
00059   virtual ~ MProcess ( ) { }
00060 
00061   // functions
00062 
00066   virtual string Name ( ) const
00067   {
00068     return _name;
00069   }
00070 
00076   virtual MProcess * Child ( const unsigned int /*n*/ ) const
00077   {
00078     return NULL;
00079   }
00080 
00086   virtual unsigned int NumberOfChildren ( ) const 
00087   {
00088     return 0;
00089   }
00090 
00091   // methods
00092 
00096   virtual void Run ( unsigned int /*n*/ ) = 0;
00097 
00098 protected :
00099 
00100   // attributes
00101 
00103   string _name;
00104 
00105 };
00106 
00107 #endif // M_PROCESS_H

Generated on Mon Jan 31 12:43:31 2005 for la Marmite by Doxygen 1.4.1