00001 00002 // 00003 // YASA results 00004 // 00005 // Project: Yasa 2 00006 // Author : Jan Blumenthal 00007 // Start : 2002/02/28 00008 // $Header: /sources/yasa/yasagui/results.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_RESULTS_INCLUDE 00029 #define YASAGUI_RESULTS_INCLUDE 00030 00031 00033 #include <yasagui/yasagui.h> 00034 #include "translations.h" 00035 #include "config.h" 00036 #include "object.h" 00037 00038 00040 class YResults; 00041 00042 00044 class YResultArgs 00045 {public: 00046 enum RESULT_TYPE { PROJECT_RESULTS=0, 00047 ENVIRONMENT_RESULTS, 00048 MAX_RESULTS 00049 }; 00050 YResultArgs(RESULT_TYPE rt) : 00051 resulttype(rt) 00052 {} 00053 RESULT_TYPE GetResultType() const { return resulttype; } 00054 private:RESULT_TYPE resulttype; 00055 }; 00056 00057 00059 class YResult : public YObject 00060 { YResults *parent; 00061 public: YResult( const YObjectArgs &objectargs) : 00062 YObject(objectargs), parent(0) 00063 {} 00064 virtual int SetConfig(YInputParser &parser); 00065 virtual int GetConfig(YOutputParser &parser); 00066 YResults* GetParent() const { return parent; } 00067 void SetParent(YResults *p) { parent=p; } 00068 }; 00069 00071 class YTimingResults : public YResult 00072 { public: YTimingResults(); 00073 }; 00074 00076 class YStatisticResults : public YResult 00077 { public: YStatisticResults(); 00078 }; 00079 00080 00083 class YResults : public YObject 00084 { YResultArgs resultargs; 00085 YTimingResults timings; 00086 YStatisticResults statistics; 00088 YObject *parent; 00089 public: YResults(const YResultArgs &args); 00090 const YResultArgs & GetResultArgs() const { return resultargs; } 00091 YTimingResults & GetTimingResults() { return timings; } 00092 YStatisticResults & GetStatisticResults() { return statistics; } 00093 virtual int SetConfig(YInputParser &parser); 00094 virtual int GetConfig(YOutputParser &parser); 00095 YObject* GetParent() const { return parent; } 00096 void SetParent(YObject* p) { parent=p; } 00097 }; 00098 00099 00100 00101 00102 00103 00104 00105 00106 00107 00109 #endif // ifndef YASAGUI_RESULTS_INCLUDE