pygccxml.parser.config module¶
Defines C++ parser configuration classes.
-
create_compiler_path
(xml_generator, compiler_path)¶ Try to guess a path for the compiler.
If you want ot use a specific compiler, please provide the compiler path manually, as the guess may not be what you are expecting. Providing the path can be done by passing it as an argument (compiler_path) to the xml_generator_configuration_t() or by defining it in your pygccxml configuration file.
-
load_xml_generator_configuration
(configuration, **defaults)¶ Loads CastXML or GCC-XML configuration.
Parameters: - configuration (string|configparser.ConfigParser) – can be
a string (file path to a configuration file) or
instance of
configparser.ConfigParser
. - defaults – can be used to override single configuration values.
Returns: a configuration object
Return type: The file passed needs to be in a format that can be parsed by
configparser.ConfigParser
.An example configuration file skeleton can be found here.
- configuration (string|configparser.ConfigParser) – can be
a string (file path to a configuration file) or
instance of
-
class
parser_configuration_t
(working_directory='.', include_paths=None, define_symbols=None, undefine_symbols=None, cflags='', compiler=None, xml_generator=None, keep_xml=False, compiler_path=None, flags=None, castxml_epic_version=None)¶ Bases:
object
C++ parser configuration holder
This class serves as a base class for the parameters that can be used to customize the call to a C++ parser.
This class also allows users to work with relative files paths. In this case files are searched in the following order:
- current directory
- working directory
- additional include paths specified by the user
-
append_cflags
(val)¶
-
castxml_epic_version
¶ File format version used by castxml.
-
cflags
¶ additional flags to pass to compiler
-
clone
()¶
-
compiler
¶ get compiler name to simulate
-
compiler_path
¶ Get the path for the compiler.
-
define_symbols
¶ list of “define” directives
-
flags
¶ Optional flags for pygccxml.
-
include_paths
¶ list of include paths to look for header files
-
keep_xml
¶ Are xml files kept after errors.
-
raise_on_wrong_settings
()¶ Validates the configuration settings and raises RuntimeError on error
-
undefine_symbols
¶ list of “undefine” directives
-
working_directory
¶
-
xml_generator
¶ get xml_generator (gccxml or castxml)
-
class
xml_generator_configuration_t
(gccxml_path='', xml_generator_path='', working_directory='.', include_paths=None, define_symbols=None, undefine_symbols=None, start_with_declarations=None, ignore_gccxml_output=False, cflags='', compiler=None, xml_generator=None, keep_xml=False, compiler_path=None, flags=None, castxml_epic_version=None)¶ Bases:
pygccxml.parser.config.parser_configuration_t
Configuration object to collect parameters for invoking gccxml or castxml.
This class serves as a container for the parameters that can be used to customize the call to gccxml or castxml.
-
append_cflags
(val)¶
-
castxml_epic_version
¶ File format version used by castxml.
-
cflags
¶ additional flags to pass to compiler
-
clone
()¶
-
compiler
¶ get compiler name to simulate
-
compiler_path
¶ Get the path for the compiler.
-
define_symbols
¶ list of “define” directives
-
flags
¶ Optional flags for pygccxml.
-
ignore_gccxml_output
¶ set this property to True, if you want pygccxml to ignore any error warning that comes from gccxml
-
include_paths
¶ list of include paths to look for header files
-
keep_xml
¶ Are xml files kept after errors.
-
raise_on_wrong_settings
()¶
-
start_with_declarations
¶ list of declarations gccxml should start with, when it dumps declaration tree
-
undefine_symbols
¶ list of “undefine” directives
-
working_directory
¶
-
xml_generator
¶ get xml_generator (gccxml or castxml)
-
xml_generator_from_xml_file
¶ Configuration object containing information about the xml generator read from the xml file.
Returns: configuration object Return type: utils.xml_generators
-
xml_generator_path
¶ XML generator binary location
-