[Compbench-devel] CompBenchmarks++/libcompbenchmarks/Compiler Compiler-Option-Description.h, 1.9, 1
Brought to you by:
xfred
From: Frederic T. <xf...@us...> - 2007-09-04 20:03:00
|
Update of /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/Compiler In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv19057 Modified Files: Compiler-Option-Description.h Compiler-Option.h Compiler-OptionSet.h Compiler-Options.h Log Message: For SF's TID #141819 : improving Doxygen documentation. Index: Compiler-Options.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/Compiler/Compiler-Options.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Compiler-Options.h 31 Jul 2007 17:23:13 -0000 1.5 --- Compiler-Options.h 4 Sep 2007 20:02:55 -0000 1.6 *************** *** 17,22 **** * * This class defines the base object for all options to supported compilers. ! * It only stores options (std::string, or char*) into an object and allows ! * querying them. */ class CompilerOptions --- 17,22 ---- * * This class defines the base object for all options to supported compilers. ! * It only stores options (CBM::CompilerOption instances) into an object ! * and allows querying them. */ class CompilerOptions *************** *** 27,63 **** */ std::vector<CBM::CompilerOption*> options; std::string id; protected: virtual void add(CBM::CompilerOption *_option); virtual void remove(CBM::CompilerOption *_option); virtual int addSingle(std::string _option); virtual int removeSingle(std::string _option); public: ! /** Constructor ! \param _options Options to manage in current object. ! */ CompilerOptions(std::string id, std::string _options = ""); virtual std::string Id(void); virtual CompilerOption *Option(std::string _id); virtual CompilerOption *Option(int i); virtual int optionNumber(void); virtual int add(std::string _options); virtual int remove(std::string _options); /** Retrives options ! \return Options (to compiler instance) declared in constructor */ virtual std::string Options(void); virtual XMLNode *XML(void); virtual void restore(XMLNode *_from); virtual ~CompilerOptions(); }; --- 27,116 ---- */ std::vector<CBM::CompilerOption*> options; + + /** Identifier for instance. */ std::string id; protected: + /** Add an option. + * + * \param _option Option to add + */ virtual void add(CBM::CompilerOption *_option); + + /** Remove an option. + * + * \param _option Option to remove + */ virtual void remove(CBM::CompilerOption *_option); + /** Add an option. + * + * \param _option Option to add + * \return 1 on success, 0 otherwise + */ virtual int addSingle(std::string _option); + + /** Remove an option. + * + * \param _option Option to remove + * \return 1 on success, 0 otherwise + */ virtual int removeSingle(std::string _option); public: ! /** Constructor. ! * ! * \param id Instance's identifier ! * \param _options Options to manage in current object ! */ CompilerOptions(std::string id, std::string _options = ""); + /** Retrieve identifier. + * \return Current instance internal identifier */ virtual std::string Id(void); + /** Retrieve an option by its identifier. + * \param _id Option's identifier + * \return Option instance */ virtual CompilerOption *Option(std::string _id); + + /** Retrieve an option by its index. + * \param i Option's index + * \return Option instance + * \sa optionNumber() */ virtual CompilerOption *Option(int i); + /** Retrive options' number + * \return Number of option in instance. + * \sa Option(int) */ virtual int optionNumber(void); + /** Add a bunch of options + * + * \param _options Options to add + * \return 1 on success, 0 otherwise */ virtual int add(std::string _options); + + /** Remove a bunch of options + * + * \param _options Options to remove + * \return 1 on success, 0 otherwise */ virtual int remove(std::string _options); /** Retrives options ! \return Options defined */ virtual std::string Options(void); + /** Retrives XML representation. + * \return Internal XML object representation */ virtual XMLNode *XML(void); + + /** Initialize from an XML representation. + * + * \param _from XML description to use for initialization */ virtual void restore(XMLNode *_from); + /** Destructor */ virtual ~CompilerOptions(); }; Index: Compiler-Option.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/Compiler/Compiler-Option.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Compiler-Option.h 17 May 2007 14:29:47 -0000 1.1 --- Compiler-Option.h 4 Sep 2007 20:02:55 -0000 1.2 *************** *** 22,26 **** * \sa Options() */ - std::string option; --- 22,25 ---- *************** *** 28,44 **** public: ! /** Constructor ! \param _options Options to manage in current object. */ CompilerOption(std::string _option); CompilerOption(); ! /** Retrives option ! \return Option (to compiler instance) declared in constructor */ virtual std::string Option(void); virtual XMLNode *XML(void); virtual void restore(XMLNode *_from); virtual ~CompilerOption(); }; --- 27,55 ---- public: ! /** Constructor. ! * ! \param _option Options to manage in current object. */ CompilerOption(std::string _option); + + /** Constructor. */ CompilerOption(); ! /** Retrives option. ! * ! * \return Option (to compiler instance) declared in constructor */ virtual std::string Option(void); + /** Retrives XML representation. + * \return XML object representation + */ virtual XMLNode *XML(void); + + /** Initialize instance from XML + * \param _from XML description to initialize current instance. + */ virtual void restore(XMLNode *_from); + /** Destructor. */ virtual ~CompilerOption(); }; Index: Compiler-Option-Description.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/Compiler/Compiler-Option-Description.h,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Compiler-Option-Description.h 4 Sep 2007 19:45:50 -0000 1.9 --- Compiler-Option-Description.h 4 Sep 2007 20:02:55 -0000 1.10 *************** *** 193,196 **** --- 193,197 ---- /** Returns a description by its litteral option. * + * \param _litt Litteral option (as -O2). * \return Option's description * \sa Description(std::string _id) Index: Compiler-OptionSet.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/Compiler/Compiler-OptionSet.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Compiler-OptionSet.h 30 May 2007 17:01:35 -0000 1.2 --- Compiler-OptionSet.h 4 Sep 2007 20:02:55 -0000 1.3 *************** *** 29,51 **** namespace CBM { /** \brief Class for handling a set of compiler's options */ class CompilerOptionSet { private: std::vector<CBM_CO*> options; std::string id; protected: public: ! /** Constructor */ CompilerOptionSet(std::string _id); virtual std::string Id(void); virtual void setId(std::string _id); virtual CBM_CO *get(std::string _id); virtual CBM_CO *add(std::string _id); virtual CBM_CO *add(CBM_CO *_options); --- 29,72 ---- namespace CBM { /** \brief Class for handling a set of compiler's options + * + * A set of options is basically a set of CBM::CompilerOptions (many + * instances representing "-O2 -march=[...]", "-O3", and so on) which + * will be considered and applied in order of appearance. */ class CompilerOptionSet { private: + /** Options definition. */ std::vector<CBM_CO*> options; + /** Internal identifier. */ std::string id; protected: public: ! /** Constructor. ! * \param _id Internal identifier */ CompilerOptionSet(std::string _id); + /** Retrives identifer. + * \param Internal instance's identifier */ virtual std::string Id(void); + + /** Set identifier. + * \param _id New identifier. + */ virtual void setId(std::string _id); + /** Get options according to an CBM::CompilerOptions identifier. + * \param _id Identifier + * \return CBM::CompilerOptions instance */ virtual CBM_CO *get(std::string _id); + /** Creates a new CBM::CompilerOptions instance. + * \param _id CBM::CompilerOptions' identifier. + */ virtual CBM_CO *add(std::string _id); + + virtual CBM_CO *add(CBM_CO *_options); |