[Compbench-devel] CompBenchmarks++/libcompbenchmarks/System System.cpp, 1.15, 1.16 System.h, 1.9, 1
Brought to you by:
xfred
From: Frederic T. <xf...@us...> - 2007-05-28 18:06:30
|
Update of /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/System In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv15925 Modified Files: System.cpp System.h Log Message: fileAbsoluteName(...); added. Plan related methods and elements removed. Index: System.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/System/System.cpp,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** System.cpp 16 May 2007 12:06:39 -0000 1.15 --- System.cpp 28 May 2007 18:06:26 -0000 1.16 *************** *** 9,13 **** #include <System/System.h> #include <System/System-Thread-Download.h> - #include <Plan/Plan.h> #include <Base/Config.h> #include <Base/md5.h> --- 9,12 ---- *************** *** 44,48 **** configurationFile=_filename; - plan=0; cbmSystem=this; --- 43,46 ---- *************** *** 72,80 **** } - CBM::Plan *System::Plan(void) - { - return(plan); - } - int System::CheckDirectory(Dir where) { --- 70,73 ---- *************** *** 180,185 **** packageList(); - plan=new CBM::Plan(); - plan->restore(configuration->planNode()); return(1); } --- 173,176 ---- *************** *** 600,603 **** --- 591,611 ---- } + std::string System::fileAbsoluteName(std::string fn) + { + std::string abs; + + if (fn.length()>1) { + if (fn[0]=='/') + return(fn); + else { + abs = Config()->Path(CBM::System::CurrentWD); + abs+="/"; + abs+=fn; + return(abs); + } + } else + return(fn); + } + double System::endTimer(void) { Index: System.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/System/System.h,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** System.h 16 May 2007 09:46:19 -0000 1.9 --- System.h 28 May 2007 18:06:26 -0000 1.10 *************** *** 10,26 **** #define H_CBMSYSTEM - #ifdef SWIG - /* !!! If in SWIG parser, we need to define CBM::Plan so that all methods get - * correctly wrapped. Hope there's a better solution... */ - %module CBM - %{ - #include <Plan/Plan.h> - %} - #define CBM_PLAN CBM::Plan - - #else - # define CBM_PLAN class Plan - #endif - #include <vector> --- 10,13 ---- *************** *** 43,47 **** protected: class Config *configuration; - CBM_PLAN *plan; std::string configurationFile; --- 30,33 ---- *************** *** 56,60 **** Patches, /*!< Directory holding patches */ OS, /*!< System specific material */ ! Download /*!< Downloads temporary directory */ }; --- 42,47 ---- Patches, /*!< Directory holding patches */ OS, /*!< System specific material */ ! Download, /*!< Downloads temporary directory */ ! CurrentWD /*!< Current working directory */ }; *************** *** 104,109 **** virtual std::string Version(void); - virtual CBM_PLAN *Plan(void); - /** Get used configuration. \return A configuration instance (CBM::Config) --- 91,94 ---- *************** *** 290,293 **** --- 275,280 ---- virtual int fileSize(std::string fn); + virtual std::string fileAbsoluteName(std::string fn); + /** Initialize current object's timer. * |