![]() |
PandA-2024.02
|
Superclass include. More...
#include <tree-panda-gcc-Parameter.hpp>


Public Member Functions | |
| tree_panda_gcc_parameter (const std::string &program_name, int argc, char **const argv) | |
| Constructor. More... | |
| ~tree_panda_gcc_parameter () override | |
| Destructor. More... | |
| int | Exec () override |
| Execute parameter parsing. More... | |
| void | SetDefaults () override |
| Sets the default values for the tree-panda-gcc tool. More... | |
Public Member Functions inherited from Parameter | |
| Parameter (const std::string &program_name, int argc, char **const argv, int debug_level=0) | |
| Constructor. More... | |
| Parameter (const Parameter &other) | |
| Copy Constructor. More... | |
| virtual | ~Parameter () |
| Destructor. More... | |
| void | load_xml_configuration_file (const std::string &filename) |
| Loads an XML configuration file. More... | |
| void | write_xml_configuration_file (const std::string &filename) |
| Write an XML configuration file with the parameters actually stored. More... | |
| template<typename G > | |
| void | getOption (const std::string &name, G &variable) const |
| Returns the value of an option. More... | |
| template<typename G > | |
| void | getOption (const char *name, G &variable) const |
| Returns the value of an option. More... | |
| template<typename G > | |
| G | getOption (const std::string &name) const |
| Returns the value of an option. More... | |
| template<typename G > | |
| G | getOption (const char *name) const |
| Returns the value of an option. More... | |
| template<typename G > | |
| G | getOption (const enum enum_option name) const |
| Returns the value of an option. More... | |
| template<typename G > | |
| void | setOption (const std::string &name, const G value) |
| Sets the value of an option. More... | |
| template<typename G > | |
| void | setOption (const char *name, const G value) |
| Sets the value of an option. More... | |
| template<typename G > | |
| void | setOption (const enum enum_option name, const G value) |
| Sets the value of an option. More... | |
| bool | isOption (const std::string &name) const |
| Tests if an option has been stored. More... | |
| bool | isOption (const char *name) const |
| Tests if an option has been stored. More... | |
| bool | isOption (const enum enum_option name) const |
| Tests if an option has been stored. More... | |
| bool | removeOption (const enum enum_option name) |
| Remove an option. More... | |
| bool | removeOption (const char *name) |
| Remove an option. More... | |
| bool | removeOption (const std::string &name) |
| Remove an option. More... | |
| int | get_class_debug_level (const std::string &class_name, int debug_level=-1) const |
| Return the debug level for a specific class. More... | |
| int | GetFunctionDebugLevel (const std::string &class_name, const std::string &function_name) const |
| Return the debug_level of a function. More... | |
| void | print (std::ostream &os) const |
| void | add_debug_class (const std::string &class_name) |
| Add a class to be debugged. More... | |
| void | PrintUsage (std::ostream &os) const |
| Print the usage of this tool = PrintHeader() + PrintHelp() More... | |
| std::string | PrintVersion () const |
| This function prints the version of the tool. More... | |
| virtual void | PrintFullHeader (std::ostream &os) const |
| This function prints the header of the tool = PrintProgramName() + PrintVersion() More... | |
| void | PrintBugReport (std::ostream &os) const |
| Print the bug report request. More... | |
| Parameters_FileFormat | GetFileFormat (const std::filesystem::path &file, bool check_cml_root_node=false) const |
| Return the file format given the file name or the extension. More... | |
| template<typename G > | |
| G | GetParameter (const std::string &name) const |
| Returns the value of a parameter. More... | |
| bool | IsParameter (const std::string &name) const |
| Return if a parameter has been set. More... | |
| const std::vector< std::string > | CGetArgv () const |
| Return argv. More... | |
| template<> | |
| CustomSet< std::string > | getOption (const enum enum_option name) const |
| template<> | |
| std::list< std::string > | getOption (const enum enum_option name) const |
| template<> | |
| std::vector< std::string > | getOption (const enum enum_option name) const |
| template<> | |
| Parameters_FileFormat | getOption (const enum enum_option name) const |
Private Member Functions | |
| void | CheckParameters () override |
| Checks parameter values to set implicit one. More... | |
| void | PrintHelp (std::ostream &os) const override |
| Print the usage of this tool. More... | |
| void | PrintProgramName (std::ostream &os) const override |
| Print the name of the program to be included in the header. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from Parameter | |
| void | load_xml_configuration_file_rec (const xml_element *node) |
| Loads an XML configuration file (recursive method) More... | |
| bool | ManageDefaultOptions (int next_option, char *optarg_param, bool &exit_success) |
| Manage default options (common to all tools) More... | |
| void | PrintGeneralOptionsUsage (std::ostream &os) const |
| Print the usage of the general common options. More... | |
| void | PrintOutputOptionsUsage (std::ostream &os) const |
| Print the usage of the output common options. More... | |
| void | SetCommonDefaults () |
| Sets the default values common to all tools. More... | |
Protected Attributes inherited from Parameter | |
| int | argc |
| The number of input paramters. More... | |
| char **const | argv |
| The input parameters;. More... | |
| OptionMap | Options |
| Map between the name of the option and the related string-form value. More... | |
| CustomMap< std::string, std::string > | panda_parameters |
| Map between the name of a parameter and the related string-form value. More... | |
| std::map< enum enum_option, std::string > | enum_options |
| Map between an enum option and the related string-form value. More... | |
| std::map< enum enum_option, std::string > | option_name |
| Name of the enum options. More... | |
| CustomUnorderedSet< std::string > | debug_classes |
| Classes to be debugged. More... | |
| int | debug_level |
| debug level More... | |
| tree_panda_gcc_parameter::tree_panda_gcc_parameter | ( | const std::string & | program_name, |
| int | argc, | ||
| char **const | argv | ||
| ) |
Constructor.
| program_name | is the name of the executable |
| argc | is the number of arguments |
| argv | is the array of arguments passed to program. |
Definition at line 82 of file tree-panda-gcc-Parameter.cpp.
References SetDefaults(), and ~tree_panda_gcc_parameter().

|
overridedefault |
|
overrideprivatevirtual |
Checks parameter values to set implicit one.
add -I <ac_types_dir> and -I <ac_math_dir>
Implements Parameter.
Definition at line 369 of file tree-panda-gcc-Parameter.cpp.
References Parameter::CheckParameters(), CT_I386_GCC5, CT_I386_GCC6, CompilerWrapper::isCurrentOrNewer(), CompilerWrapper::isGccCheck(), Parameter::isOption(), relocate_compiler_path(), Parameter::setOption(), and STR_CST_string_separator.
Referenced by Exec().


|
overridevirtual |
Execute parameter parsing.
variable used into option parsing
the default of tree-panda-gcc is the silent mode so nothing has to be done
do nothing passed to tree-panda-gcc when it work as ld
Implements Parameter.
Definition at line 90 of file tree-panda-gcc-Parameter.cpp.
References Parameter::argc, Parameter::argv, CheckParameters(), COMMON_LONG_OPTIONS, COMMON_SHORT_OPTIONS_STRING, CT_NO_COMPILER, exit_code, GCC_LONG_OPTIONS, GCC_SHORT_OPTIONS_STRING, GetPath(), Parameter::isOption(), Parameter::ManageDefaultOptions(), OPT_END_GROUP, OPT_GC_SECTIONS, OPT_IPLUGINDIR, OPT_MF, OPT_MINUS_INCLUDE, OPT_MINUS_MAP, OPT_MQ, OPT_MT, OPT_PRINT_FILE_NAME, OPT_START_GROUP, param, PARAMETER_NOTPARSED, PARAMETER_PARSED, Parameter::PrintUsage(), Parameter::setOption(), starts_with(), STR_CST_string_separator, THROW_ERROR, and Parameter::write_xml_configuration_file().

|
overrideprivatevirtual |
Print the usage of this tool.
| os | is the stream where the message has to be printed |
Implements Parameter.
Definition at line 434 of file tree-panda-gcc-Parameter.cpp.
References Parameter::PrintGeneralOptionsUsage(), and Parameter::PrintOutputOptionsUsage().

|
overrideprivatevirtual |
Print the name of the program to be included in the header.
| os | is the stream on which the program name has to be printed |
Implements Parameter.
Definition at line 450 of file tree-panda-gcc-Parameter.cpp.
|
overridevirtual |
Sets the default values for the tree-panda-gcc tool.
Debugging level
Output level
-------— frontend analysis -------—//
Implements Parameter.
Definition at line 462 of file tree-panda-gcc-Parameter.cpp.
References DEBUG_LEVEL_NONE, CompilerWrapper::getCompatibleCompilers(), CompilerWrapper::getDefaultCompiler(), MINIMAL_INTERFACE_GENERATION, O0, OBAMBU, OUTPUT_LEVEL_NONE, and Parameter::setOption().
Referenced by tree_panda_gcc_parameter().


1.8.13