Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Examples  

project.h

Go to the documentation of this file.
00001 
00002 //
00003 // YASA project manager
00004 //
00005 // Project: Yasa 2
00006 // Author : Jan Blumenthal
00007 // Start  : 2002/02/28
00008 // $Header: /sources/yasa/yasagui/project.h,v 1.4 2003/01/24 15:47:42 bj Exp $
00009 //
00011 //
00012 // This program is free software; you can redistribute it and/or modify
00013 // it under the terms of the GNU General Public License as published by
00014 // the Free Software Foundation; either version 2 of the License, or
00015 // (at your option) any later version.
00016 //
00017 // This program is distributed in the hope that it will be useful,
00018 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00019 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00020 // GNU General Public License for more details.
00021 //
00022 // You should have received a copy of the GNU General Public License
00023 // along with this program (See the included file COPYING);
00024 // if not, write to the Free Software Foundation, Inc.,
00025 // 675 Mass Ave, Cambridge, MA 02139, USA.
00026 //
00028 #ifndef YASAGUI_PROJECT_INCLUDE
00029 #define YASAGUI_PROJECT_INCLUDE
00030 
00031 
00033 #include <yasagui/yasagui.h>
00034 #include "translations.h"
00035 #include "config.h"
00036 #include "task.h"
00037 #include "mutex.h"
00038 #include "environment.h"
00039 #include "sources.h"
00040 #include "results.h"
00041 
00043 class YProject : public YObject
00044 {
00045     Q_OBJECT
00046     YTaskSet                taskset;
00047     YMutexSet               mutexset;
00048     YEnvironmentSet         environmentset;
00049     YProjectLogFile         projectlogfile;
00050     YSourceSet              sourceset;
00051     YHeaderSet              headerset;
00052     YResults                results;
00053     YString                 projectdir;                         
00054 
00055     YASA_MAXCPU             maxcpu;                             
00056     YASA_CALCPREEMPTIONTIME calcpreemptiontime;                 
00057     YASA_TICK               timertick;                          
00058     YTIME                   endtime;
00059 public:                     YProject(const YObjectArgs &args);
00060     YTaskSet &              GetTaskSet()                        { return taskset;           }
00061     YMutexSet &             GetMutexSet()                       { return mutexset;          }
00062     YEnvironmentSet &       GetEnvironmentSet()                 { return environmentset;    }
00063     YProjectLogFile &       GetProjectLogFile()                 { return projectlogfile;    }
00064 
00065     virtual int             SetConfig(YInputParser &parser);
00066     virtual int             GetConfig(YOutputParser &parser);
00067     const YString &         GetProjectDir()                     { return projectdir;        }
00068     YSourceSet &            GetSourceSet()                      { return sourceset;         }
00069     YWorkSpace *            GetWorkSpace()                      { return ((YWorkSpace*)GetSet()->GetParent()); }
00070     QString                 CopyProjectDir(bool absdir=false);
00071 //  QString                 GetProjectDir(bool absdir=false);
00072     const YASA_CPU &        GetMaxCPU() const                   { return maxcpu;            }
00073     const YASA_TICK &       GetTimerTick() const                { return timertick;         }
00074     const YTIME &           GetEndTime() const                  { return endtime;           }
00075     const YASA_CALCPREEMPTIONTIME &
00076                             GetCalcPreemptionTime() const       { return calcpreemptiontime;}
00077     void                    SetProjectDir(const QString &pd);
00078     void                    SetMaxCPU(int c)                    { maxcpu=c;                 }
00079     void                    SetTimerTick(YASA_TIME t)           { timertick=t;              }
00080     void                    SetEndTime(YASA_TIME t)             { endtime=t;                }
00081     void                    SetCalcPreemptionTime(bool c)       { calcpreemptiontime=c;     }
00082     void                    CleanupProject();
00083     void                    RemoveProjectDirectory();
00084     int                     EvaluateLogFiles();
00085 };
00086 
00087 
00089 class YProjectSet : public YSet
00090 {
00091 public:                     YProjectSet();
00092     void                    CleanupProjects();
00093 protected:
00094     virtual YObject*        AllocNewItem(const YObjectArgs &args)   { return new YProject(args);    }
00095     virtual YActions*       GetItemActions() const
00096                             { return YActionHandler::GetActions(YActionHandler::PROJECT_ACTIONS);   }
00097 };
00098 
00099 
00100 
00101 
00102 
00103 
00104 
00105 
00106 
00107 
00109 #endif                                                                  // ifndef YASAGUI_PROJECT_INCLUDE

Generated on Thu Feb 13 23:43:55 2003 for Yasa by doxygen1.3-rc3