Beispiel #1
0
    def __init__(self, config, cache=None, decl_factory=None, join_decls=True):
        """
        :param config: Instance of :class:`xml_generator_configuration_t`
                       class, that contains GCC-XML or CastXML configuration.

        :param cache: Reference to cache object, that will be updated after a
                      file has been parsed.
        :type cache: Instance of :class:`cache_base_t` class

        :param decl_factory: Declarations factory, if not given default
                             declarations factory( :class:`decl_factory_t` )
                             will be used.

        :param join_decls: Skip the joining of the declarations for the file.
                           This can then be done once, in the case where
                           there are multiple files, for example in the
                           project_reader. Is True per default.
        :type boolean

        """

        self.logger = utils.loggers.cxx_parser
        self.__join_decls = join_decls
        self.__search_directories = []
        self.__config = config
        self.__cxx_std = utils.cxx_standard(config.cflags)
        self.__search_directories.append(config.working_directory)
        self.__search_directories.extend(config.include_paths)
        if not cache:
            cache = declarations_cache.dummy_cache_t()
        self.__dcache = cache
        self.__config.raise_on_wrong_settings()
        self.__decl_factory = decl_factory
        if not decl_factory:
            self.__decl_factory = declarations.decl_factory_t()
Beispiel #2
0
    def __init__(self, configuration, cache=None, decl_factory=None):
        """
        :param configuration:
                       Instance of :class:`xml_generator_configuration_t`
                       class, that contains GCC-XML or CastXML configuration.

        :param cache: Reference to cache object, that will be updated after a
                      file has been parsed.
        :type cache: Instance of :class:`cache_base_t` class

        :param decl_factory: Declarations factory, if not given default
                             declarations factory( :class:`decl_factory_t` )
                             will be used.

        """

        self.logger = utils.loggers.cxx_parser
        self.__search_directories = []
        self.__config = configuration
        self.__cxx_std = utils.cxx_standard(configuration.cflags)
        self.__search_directories.append(configuration.working_directory)
        self.__search_directories.extend(configuration.include_paths)
        if not cache:
            cache = declarations_cache.dummy_cache_t()
        self.__dcache = cache
        self.__config.raise_on_wrong_settings()
        self.__decl_factory = decl_factory
        if not decl_factory:
            self.__decl_factory = declarations.decl_factory_t()
        self.__xml_generator_from_xml_file = None
Beispiel #3
0
    def __init__(self, config, cache=None, decl_factory=None, join_decls=True):
        """
        :param config: Instance of :class:`xml_generator_configuration_t`
                       class, that contains GCC-XML or CastXML configuration.

        :param cache: Reference to cache object, that will be updated after a
                      file has been parsed.
        :type cache: Instance of :class:`cache_base_t` class

        :param decl_factory: Declarations factory, if not given default
                             declarations factory( :class:`decl_factory_t` )
                             will be used.

        :param join_decls: Skip the joining of the declarations for the file.
                           This can then be done once, in the case where
                           there are multiple files, for example in the
                           project_reader. Is True per default.
        :type boolean

        """

        self.logger = utils.loggers.cxx_parser
        self.__join_decls = join_decls
        self.__search_directories = []
        self.__config = config
        self.__search_directories.append(config.working_directory)
        self.__search_directories.extend(config.include_paths)
        if not cache:
            cache = declarations_cache.dummy_cache_t()
        self.__dcache = cache
        self.__config.raise_on_wrong_settings()
        self.__decl_factory = decl_factory
        if not decl_factory:
            self.__decl_factory = declarations.decl_factory_t()