[Compbench-devel] CompBenchmarks++/libcompbenchmarks/Base Config.h, 1.8, 1.9 XML.h, 1.6, 1.7
Brought to you by:
xfred
From: Frederic T. <xf...@us...> - 2007-05-01 15:05:10
|
Update of /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/Base In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv4822 Modified Files: Config.h XML.h Log Message: Updated documentation. Index: XML.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/Base/XML.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** XML.h 1 May 2007 14:40:35 -0000 1.6 --- XML.h 1 May 2007 15:05:00 -0000 1.7 *************** *** 15,18 **** --- 15,19 ---- namespace CBM { /** \brief XML Attribute + * * Internal representation for an XML attribute. * \sa XMLNode *************** *** 27,31 **** public: ! /** Constructor * Initialise a new attribute. * \param _name Attribute's name --- 28,33 ---- public: ! /** Constructor. ! * * Initialise a new attribute. * \param _name Attribute's name *************** *** 34,54 **** std::string _value = ""); ! /** Get attribute's name ! \return a std::string */ virtual std::string Name(void); ! /** Get attribute's value ! \return a std::string */ virtual std::string Value(void); ! /** Set attribute's value ! \param _value new value (std::string) */ virtual void setValue(std::string _value); ! /** Append a string to attribute's value ! \param _value string to append */ virtual void append(std::string _value); virtual void setParent(class XMLNode *_parent); --- 36,62 ---- std::string _value = ""); ! /** Get attribute's name. ! * ! * \return a std::string */ virtual std::string Name(void); ! /** Get attribute's value. ! * ! * \return a std::string */ virtual std::string Value(void); ! /** Set attribute's value. ! * \param _value new value (std::string) */ virtual void setValue(std::string _value); ! /** Append a string to attribute's value. ! * ! * \param _value string to append */ virtual void append(std::string _value); + /** Set parent's node. + * + * \param _parent New parent's XMLNode for current instance. */ virtual void setParent(class XMLNode *_parent); *************** *** 58,61 **** --- 66,70 ---- /** \brief XML Node + * * Internal representation of an XML node. * \sa XMLAttribute *************** *** 76,80 **** virtual void unreference(class XMLNode *_child); public: ! /** Constructor * Initialise a new node. * \param _name Node's name --- 85,90 ---- virtual void unreference(class XMLNode *_child); public: ! /** Constructor. ! * * Initialise a new node. * \param _name Node's name *************** *** 85,126 **** virtual void unreference(XMLAttribute *_attribute); ! /** Get node's name ! \return a std::string */ virtual std::string Name(void); ! /** Get node's value ! \return a std::string */ virtual std::string Value(void); ! /** Set node's value ! \param _value new value (std::string) */ virtual void setValue(std::string _value); ! /** Append a string to node's value ! \param _value string to append */ virtual void append(std::string _value); ! /** Get childs' number * \return number of nodes held by current node * \sa getNode() */ virtual int nodeNumber(void); ! /** Get a child node according to its index * \return A node * \sa nodeNumber() */ virtual XMLNode *getNode(int _index); ! /** Get a child node according to its name * \return A node * \sa getChild() */ virtual XMLNode *getNode(std::string _name); ! /** Get attributes' number * \return number of attributes on current node * \sa getAttribute() */ virtual int attributeNumber(void); ! /** Get an attribute according to its name * \return An attribute * \sa getAttribute()() */ --- 95,144 ---- virtual void unreference(XMLAttribute *_attribute); ! /** Get node's name. ! * ! * \return a std::string */ virtual std::string Name(void); ! /** Get node's value. ! * \return a std::string */ virtual std::string Value(void); ! /** Set node's value. ! * ! * \param _value new value (std::string) */ virtual void setValue(std::string _value); ! /** Append a string to node's value. ! * ! * \param _value string to append */ virtual void append(std::string _value); ! /** Get childs' number. ! * * \return number of nodes held by current node * \sa getNode() */ virtual int nodeNumber(void); ! /** Get a child node according to its index. ! * * \return A node * \sa nodeNumber() */ virtual XMLNode *getNode(int _index); ! /** Get a child node according to its name. ! * * \return A node * \sa getChild() */ virtual XMLNode *getNode(std::string _name); ! /** Get attributes' number. ! * * \return number of attributes on current node * \sa getAttribute() */ virtual int attributeNumber(void); ! /** Get an attribute according to its name. ! * * \return An attribute * \sa getAttribute()() */ *************** *** 132,136 **** virtual XMLAttribute *getAttribute(int _index); ! /** Add a node into current node * \param _child node to add * \return node added (_child) --- 150,155 ---- virtual XMLAttribute *getAttribute(int _index); ! /** Add a node into current node. ! * * \param _child node to add * \return node added (_child) *************** *** 138,142 **** virtual XMLNode *add(XMLNode *_child); ! /** Add a node into current node * \param _name name of the node * \param _value value of the node (optional) --- 157,162 ---- virtual XMLNode *add(XMLNode *_child); ! /** Add a node into current node. ! * * \param _name name of the node * \param _value value of the node (optional) *************** *** 146,150 **** std::string _value = ""); ! /** Add an attribute on current node * \param _attribute to add * \return attribute added (_attribute) --- 166,171 ---- std::string _value = ""); ! /** Add an attribute on current node. ! * * \param _attribute to add * \return attribute added (_attribute) *************** *** 153,157 **** ! /** Add an attribute on current node * \param _name name of the attribute * \param _value value of the attribute (optional) --- 174,179 ---- ! /** Add an attribute on current node. ! * * \param _name name of the attribute * \param _value value of the attribute (optional) *************** *** 161,165 **** std::string _value = ""); ! /** Get textual (XML) representation of the node * Build a string corresponding to the XML elements of current node and * childs (includes attributes and value). --- 183,188 ---- std::string _value = ""); ! /** Get textual (XML) representation of the node. ! * * Build a string corresponding to the XML elements of current node and * childs (includes attributes and value). *************** *** 171,174 **** --- 194,198 ---- virtual ~XMLNode(); }; + } Index: Config.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/Base/Config.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Config.h 1 May 2007 14:40:35 -0000 1.8 --- Config.h 1 May 2007 15:05:00 -0000 1.9 *************** *** 14,19 **** namespace CBM { ! /** \brief Interface to configuration ! * Class proposing API to libcompbenchmarks configuration parameters */ class Config { --- 14,20 ---- namespace CBM { ! /** \brief Interface to configuration handling. ! * ! * This class provides API to use libcompbenchmarks configuration parameters. */ class Config { *************** *** 45,48 **** --- 46,50 ---- /** Check if the given directory holds patches. + * * Check if given arguments really holds patches needed by libcompbenchmarks. * \param dir directory to check *************** *** 52,55 **** --- 54,58 ---- /** 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. *************** *** 59,63 **** 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. --- 62,67 ---- 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. *************** *** 67,71 **** 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. --- 71,76 ---- 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. *************** *** 78,81 **** --- 83,87 ---- public: /** Constructor. + * * Initialize a Config object by reading the given XML file. * \param _filename XML Configuration file. *************** *** 88,92 **** virtual XMLNode *planNode(void); ! /** Get package status * \param _bid CBM::Package ID * \return Status. --- 94,99 ---- virtual XMLNode *planNode(void); ! /** Get package status. ! * * \param _bid CBM::Package ID * \return Status. *************** *** 94,98 **** virtual CBM::Package::Status getStatus(std::string _bid); ! /** Set package's status * \param _bid CBM::Package ID * \param _status New status */ --- 101,106 ---- virtual CBM::Package::Status getStatus(std::string _bid); ! /** Set package's status. ! * * \param _bid CBM::Package ID * \param _status New status */ *************** *** 100,104 **** CBM::Package::Status _status); ! /** Set benchmark's context * For a benchmark, a context keeps the compiler and options used at compilation * time. This prevent re-compilation when performance evaluation on same --- 108,113 ---- CBM::Package::Status _status); ! /** Set benchmark's context. ! * * For a benchmark, a context keeps the compiler and options used at compilation * time. This prevent re-compilation when performance evaluation on same *************** *** 115,119 **** class CompilerOptions *_currentOptions); ! /** Retrieve compiler previously used * Restore compiler stored by setContext() * \param _bid Benchmark's ID --- 124,129 ---- class CompilerOptions *_currentOptions); ! /** Retrieve compiler previously used. ! * * Restore compiler stored by setContext() * \param _bid Benchmark's ID *************** *** 122,126 **** virtual std::string getContextCompiler(std::string _bid); ! /** Retrieves options previously used * Restore options stored by setContext() * \param _bid Benchmark's ID --- 132,137 ---- virtual std::string getContextCompiler(std::string _bid); ! /** Retrieves options previously used. ! * * Restore options stored by setContext() * \param _bid Benchmark's ID *************** *** 128,132 **** virtual std::string getContextCompilerOptions(std::string _bid); ! /** Check if previous context matches previous one * This method avoids useless compilation passes when a benchmark/package is * asked to be compilated with same options. --- 139,144 ---- virtual std::string getContextCompilerOptions(std::string _bid); ! /** Check if previous context matches previous one. ! * * This method avoids useless compilation passes when a benchmark/package is * asked to be compilated with same options. *************** *** 141,145 **** class CompilerOptions *_currentOptions); ! /** Reset benchmark's context * Used in CBM::Package::Release() to invalidate current context. * \param _bid Benchmark's ID --- 153,158 ---- class CompilerOptions *_currentOptions); ! /** Reset benchmark's context. ! * * Used in CBM::Package::Release() to invalidate current context. * \param _bid Benchmark's ID *************** *** 148,152 **** virtual void contextReset(std::string _bid); ! /** Returns a libcompbenchmarks path * Many default/user set paths are used to store packages, uncompress or compile * them and so on. This method retrieves them. --- 161,166 ---- virtual void contextReset(std::string _bid); ! /** Returns a libcompbenchmarks path. ! * * Many default/user set paths are used to store packages, uncompress or compile * them and so on. This method retrieves them. *************** *** 155,163 **** virtual std::string Path(CBM::System::Dir dir); ! /** Returns related XML configuration data as std::string * \return Configuration (XML dump to std::string) */ virtual std::string str(void); ! /** Set a new Plan node * A plan holds all options to apply to selected compilers for a bunch of * benchmarks. This method set these data. --- 169,179 ---- virtual std::string Path(CBM::System::Dir dir); ! /** Returns related XML configuration data as std::string. ! * * \return Configuration (XML dump to std::string) */ virtual std::string str(void); ! /** Set a new Plan node. ! * * A plan holds all options to apply to selected compilers for a bunch of * benchmarks. This method set these data. *************** *** 167,182 **** virtual void setPlan(XMLNode *_plan); ! /** Detect changes * \return 1 if configuration has changed since last save. */ virtual int Changes(void); ! /** Don't save changes * Disable automatic saving of configuration changes */ virtual void ignoreChanges(void); /** Destructor ! * !!! May (re-)write file specified in Config() construction if Changes() returns 1 ! * and ignoreChanges() has not been called. */ virtual ~Config(); }; --- 183,201 ---- virtual void setPlan(XMLNode *_plan); ! /** Detect changes. ! * * \return 1 if configuration has changed since last save. */ virtual int Changes(void); ! /** Don't save changes. ! * * Disable automatic saving of configuration changes */ virtual void ignoreChanges(void); /** Destructor ! * ! * TODO ? May (re-)write file specified in Config() construction if Changes() ! * returns 1 and ignoreChanges() has not been called. */ virtual ~Config(); }; |