[Compbench-devel] CompBenchmarks++/libcompbenchmarks/Base Config.h, 1.6, 1.7
Brought to you by:
xfred
From: Frederic T. <xf...@us...> - 2007-04-19 17:51:15
|
Update of /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/Base In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv4878 Modified Files: Config.h Log Message: Doxygen documentation updated. Index: Config.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/Base/Config.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Config.h 25 Jan 2007 22:15:59 -0000 1.6 --- Config.h 19 Apr 2007 17:51:09 -0000 1.7 *************** *** 15,48 **** namespace CBM { /** \brief Interface to configuration ! * Class proposing API to libbenchmarks configuration parameters and run context. */ class Config { protected: XMLNode *root; XMLNode *benchmarks; XMLNode *paths; XMLNode *plan; int changes; /** Check if the given directory holds patches. ! * Check if given arguments holds patches needed by libcompbenchmarks. * \param dir directory to check ! * \return non-null if ok. */ virtual int verifyPatchDirectory(std::string dir); virtual std::string defaultPath(CBM::System::Dir dir); virtual XMLNode *bmNode(std::string _bid); virtual XMLNode *pathNode(CBM::System::Dir dir); public: ! /** Constructor */ Config(std::string _filename); virtual XMLNode *planNode(void); virtual CBM::Package::Status getStatus(std::string _bid); virtual void setStatus(std::string _bid, CBM::Package::Status _status); --- 15,100 ---- namespace CBM { /** \brief Interface to configuration ! * Class proposing API to libcompbenchmarks configuration parameters */ class Config { protected: + /** Root XML node given by configuration file + * \sa Config() + */ XMLNode *root; + /** Benchmarks' XML node found. + * \sa root + */ XMLNode *benchmarks; + + /** Default paths configuration. + * \sa root + * \sa defaultPath + */ XMLNode *paths; + + /** Planned benchmarks' description. + * \sa root + */ XMLNode *plan; + /** Boolean to check if configuration was changed. + * \sa Changes() + */ int changes; /** Check if the given directory holds patches. ! * Check if given arguments really holds patches needed by libcompbenchmarks. * \param dir directory to check ! * \return 0 on error. */ virtual int verifyPatchDirectory(std::string dir); + /** Retrieves the a path from configuration. + * Referenced as default since default values may be modified by user + * using CBM::Config methods, but may have been left unchanged. + * \param dir Directory type. + * \return Path to directory. + * \sa paths */ virtual std::string defaultPath(CBM::System::Dir dir); + /** Get a benchmark's XML description + * This internal convenience method to get the stored or in-memory XML + * description of a benchmark. + * \param _bid Benchmark ID. + * \return XML Description. + * \sa CBM::Benchmark */ virtual XMLNode *bmNode(std::string _bid); + + /** Get a path XML description + * This internal convenience method to get the stored or in-memory XML + * description of paths used by libcompbenchmarks. + * \param dir Directory type. + * \return XML Description. + * \sa CBM::Benchmark */ + virtual XMLNode *pathNode(CBM::System::Dir dir); public: ! /** Constructor. ! * Initialize a Config object by reading the given XML file. ! * \param _filename XML Configuration file. ! */ Config(std::string _filename); + /** Get XML plan node + * Used by CBM::Plan to get status of planified benchmarks and contexts. + * \return XML Node holding plan configuration and settings */ virtual XMLNode *planNode(void); + /** Get package status + * \param _bid CBM::Package ID + * \return Status. + * \sa setStatus() */ virtual CBM::Package::Status getStatus(std::string _bid); + + /** Set package's status + * \param _bid CBM::Package ID + * \param _status New status */ virtual void setStatus(std::string _bid, CBM::Package::Status _status); |