Thread: [Compbench-devel] CompBenchmarks++/libcompbenchmarks/Compiler Compiler.h, 1.13, 1.14 Compiler-Optio
Brought to you by:
xfred
|
From: Frederic T. <xf...@us...> - 2007-09-04 19:45:53
|
Update of /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/Compiler In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv12236 Modified Files: Compiler.h Compiler-Option-Description.h Log Message: For SF's TID #141819 : improving Doxygen documentation. Index: Compiler.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/Compiler/Compiler.h,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** Compiler.h 17 May 2007 14:31:12 -0000 1.13 --- Compiler.h 4 Sep 2007 19:45:50 -0000 1.14 *************** *** 152,170 **** virtual CompilerOptionLogicVar* colVarGet(std::string _id); ! /** _writerOption is the option (ID) that sets the value */ virtual void colVarSet(std::string _id, std::string _value, std::string _writerOption); virtual std::string colVarWriter(std::string _id); virtual int colOptionHas(std::string _option); virtual std::string analyzeOptions(std::string _options); virtual std::string shortHelpOptions(std::string _options); virtual int supportedVersionNumber(void); virtual std::string supportedVersion(int _index); virtual ~Compiler(); }; --- 152,218 ---- virtual CompilerOptionLogicVar* colVarGet(std::string _id); ! /** Change value of an internal variable ! * ! * This is useful for option logics. ! * \sa CBM::CompilerOptionDescriptions ! * \sa CBM::CompilerOptionLogic ! * \param _id Variable's identifier ! * \param _value Variable's (new) value ! * \param _writerOption is the option (ID) that sets the value */ virtual void colVarSet(std::string _id, std::string _value, std::string _writerOption); + /** Get latest writer to a variable. + * + * \param _id Variable's identifier + * \return writer's identifier. + * \sa colVarSet */ virtual std::string colVarWriter(std::string _id); + /** Checks if a variable is defined. + * + * \param _option Option or Variable's identifier + * \return 1 if the variable or option has been defined, 0 otherwise. */ virtual int colOptionHas(std::string _option); + /** Analyze a set of options + * + * This uses knowledge-base through CBM::CompilerOptionLogic instances + * and cacheOptionDescriptions to evaluate compatibility or functional + * redondancies (and others couple of things) between given option + * string. + * + * \param _options Option string + * \return An std::string with comments or errors found. + */ virtual std::string analyzeOptions(std::string _options); + + /** Give short option's documentation(s) + * + * \param _options Option string + * \return Short help about options (from knowledge base). + */ virtual std::string shortHelpOptions(std::string _options); + /** Returns supported branches' number + * + * Apply to current compiler's familly (eg. gcc, g++, tcc). + * \return Number of supported branches. + */ virtual int supportedVersionNumber(void); + + /** Returns a supported branch identifier + * + * Identifier looks like 3.0.x or 4.1.x (for GCC). This information + * comes from knowledge base. + * + * \param _index Index of branch + * \return A std::string containing a branch identifier. + * \sa supportedVersionNumber + */ virtual std::string supportedVersion(int _index); + /** Destructor */ virtual ~Compiler(); }; *************** *** 178,188 **** private: protected: class System *system; public: ! /** Constructor */ CompilerSelector(class System *_system); ! /** Main method. * Returns a Compiler object. * \param compilerBinary Absolute or relative name of the compiler program --- 226,240 ---- private: protected: + /** A CBM::System instance */ class System *system; public: ! /** Constructor ! * \param _system A CBM::System instance */ ! CompilerSelector(class System *_system); ! /** Returns a CBM::Compiler object according to a (compiler) binary program. ! * * Returns a Compiler object. * \param compilerBinary Absolute or relative name of the compiler program Index: Compiler-Option-Description.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/Compiler/Compiler-Option-Description.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Compiler-Option-Description.h 1 May 2007 19:43:18 -0000 1.8 --- Compiler-Option-Description.h 4 Sep 2007 19:45:50 -0000 1.9 *************** *** 69,94 **** public: /** Constructor ! \param _from XML node to initialise object */ CompilerOptionDescription(XMLNode *_from, CBM_CODs *_parent); ! /** Get option's internal ID ! \return std::string with ID */ virtual std::string Id(void); ! /** Get option's short description ! \return std::string containing a short description */ virtual std::string ShortDescription(void); ! /** Get editor's compiler option description ! \return std::string containing the option's editor description */ virtual std::string EditorDescription(void); ! /** Retrieves compiler's option ! \return Option string to pass to compiler */ virtual std::string Option(void); ! /** \brief Detect two-passes' compilations * \return Returns 1 if current option need two-passes */ virtual int CompilationTwoPassNeeded(void); --- 69,100 ---- public: /** Constructor ! * \param _from XML node to initialise object ! * \param _parent Descriptions' set (context). */ CompilerOptionDescription(XMLNode *_from, CBM_CODs *_parent); ! /** Get option's internal ID. ! * ! * \return std::string with ID */ virtual std::string Id(void); ! /** Get option's short description. ! * ! * \return std::string containing a short description */ virtual std::string ShortDescription(void); ! /** Get editor's compiler option description. ! * ! * \return std::string containing the option's editor description */ virtual std::string EditorDescription(void); ! /** Retrieves compiler's option. ! * ! * \return Option string to pass to compiler */ virtual std::string Option(void); ! /** \brief Detect two-passes' compilations. ! * * \return Returns 1 if current option need two-passes */ virtual int CompilationTwoPassNeeded(void); *************** *** 109,114 **** --- 115,126 ---- virtual std::string CompilationFirstPassOption(void); + /** Fake option's usage. + * + * Within a given context, put current option in used ones. + * \return Error, warning or comments as english plain text messages. + */ virtual std::string Use(void); + /** Virtual destructor */ virtual ~CompilerOptionDescription(); }; *************** *** 125,131 **** /** Descriptions read */ std::vector<CompilerOptionDescription*> descriptions; CBM_COM *compiler; ! std::string descriptionFile; --- 137,144 ---- /** Descriptions read */ std::vector<CompilerOptionDescription*> descriptions; + /** Compiler */ CBM_COM *compiler; ! /** Internal description file used. */ std::string descriptionFile; *************** *** 142,146 **** public: ! /** Constructor * \param _baseDir Directory containings description.xml for the compiler */ --- 155,161 ---- public: ! /** Constructor. ! * ! * \param _compiler Related compiler * \param _baseDir Directory containings description.xml for the compiler */ *************** *** 148,161 **** std::string _baseDir); ! /** Retrive description file used ! * \param std::string for description file name */ virtual std::string DescriptionFile(void); ! /** Returns descriptions' number * \return Integer (numbe of read descriptions * \sa Description(int _index) */ virtual int DescriptionNumber(void); ! /** Returns a description by its index * \param _index Index of the description * \return Option's description --- 163,179 ---- std::string _baseDir); ! /** Retrive description file used. ! * ! * \return std::string for description file name */ virtual std::string DescriptionFile(void); ! /** Returns descriptions' number. ! * * \return Integer (numbe of read descriptions * \sa Description(int _index) */ virtual int DescriptionNumber(void); ! /** Returns a description by its index. ! * * \param _index Index of the description * \return Option's description *************** *** 165,169 **** virtual CompilerOptionDescription *Description(int _index); ! /** Returns a description by its id * \param _id description's ID * \return Option's description --- 183,188 ---- virtual CompilerOptionDescription *Description(int _index); ! /** Returns a description by its id. ! * * \param _id description's ID * \return Option's description *************** *** 172,176 **** virtual CompilerOptionDescription *Description(std::string _id); ! /** Returns a description by its litteral option * \return Option's description * \sa Description(std::string _id) --- 191,196 ---- virtual CompilerOptionDescription *Description(std::string _id); ! /** Returns a description by its litteral option. ! * * \return Option's description * \sa Description(std::string _id) *************** *** 178,186 **** virtual CompilerOptionDescription *DescriptionLitteral(std::string _litt); ! /** Retrieve associated compiler * \return Compiler used to initialize descriptions */ virtual CBM_COM *Compiler(void); ! /** Destructor */ virtual ~CompilerOptionDescriptions(); }; --- 198,207 ---- virtual CompilerOptionDescription *DescriptionLitteral(std::string _litt); ! /** Retrieve associated compiler. ! * * \return Compiler used to initialize descriptions */ virtual CBM_COM *Compiler(void); ! /** Destructor. */ virtual ~CompilerOptionDescriptions(); }; |