[Compbench-devel] CompBenchmarks++/libcompbenchmarks/Compiler Compiler-Option-Logic.h, 1.2, 1.3
Brought to you by:
xfred
|
From: Frederic T. <xf...@us...> - 2007-09-04 17:33:40
|
Update of /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/Compiler In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv27459 Modified Files: Compiler-Option-Logic.h Log Message: For SF's TID #141819 : documenting (Doxygen). Index: Compiler-Option-Logic.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/Compiler/Compiler-Option-Logic.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Compiler-Option-Logic.h 12 Apr 2007 19:55:37 -0000 1.2 --- Compiler-Option-Logic.h 4 Sep 2007 17:33:35 -0000 1.3 *************** *** 13,44 **** namespace CBM { typedef enum CompilerOptionLogicCommandID { ! Unknown, Exclusive, ImpliedBy, Requires }; typedef struct CompilerOptionLogicCommand { ! CompilerOptionLogicCommandID id; ! int testOption; /* 1 for option, 0 internal */ ! std::string internalVarName; /* argumentOption; */ ! std::string internalVarValue; ! std::string optionReferred; }; class CompilerOptionLogic { private: protected: CompilerOptionDescriptions *context; CompilerOptionDescription *description; std::vector<CompilerOptionLogicCommand*> commands; public: CompilerOptionLogic(CompilerOptionDescriptions *_context, CompilerOptionDescription *_description, XMLNode *_from); virtual std::string use(void); virtual ~CompilerOptionLogic(); }; --- 13,75 ---- namespace CBM { + /** Defines logical operators for compiler's option handling logics. */ typedef enum CompilerOptionLogicCommandID { ! Unknown, /*!< Not supported/unknown operator */ ! Exclusive, /*!< Bijective exclusion operator */ ! ImpliedBy, /*!< Left item is implied by right one */ ! Requires /*!< Left item requieres right one */ }; + /** Define logical commands for compiler's option handling logics. */ typedef struct CompilerOptionLogicCommand { ! CompilerOptionLogicCommandID id; /*!< Operator identifier. */ ! int testOption; /*!< 1 for option, 0 for an internal variable */ ! std::string internalVarName; /*!< variable name */ ! std::string internalVarValue; /*!< variable (desired) value */ ! std::string optionReferred; /*!< option's name */ }; + /** \brief Handles logic for a given compiler's option. + * + * The "logic" refers to (in)compatibility, inclusion or dependencies + * between options. + * + * \sa use + */ class CompilerOptionLogic { private: protected: + /** Internal reference to context. */ CompilerOptionDescriptions *context; + /** Internal reference to option's description. */ CompilerOptionDescription *description; + /** List of commands to be applied. + * \sa use() + */ std::vector<CompilerOptionLogicCommand*> commands; public: + /** Constructor. + * \param _context Whole options' descriptions. + * \param _description Option on which defined logics are applied on. + * \param _from XML description defining logic. */ CompilerOptionLogic(CompilerOptionDescriptions *_context, CompilerOptionDescription *_description, XMLNode *_from); + /** Applied/append the option. + * + * This method append the option to current options' list (associated + * to context variable) and returns detected faults or remarks as + * an std::string. + * + * \return std::string with comments on option's usage within current context. + * \sa context + */ virtual std::string use(void); + /** Desctructor */ virtual ~CompilerOptionLogic(); }; |