Package pygccxml :: Package parser :: Module project_reader :: Class project_reader_t

ClassType project_reader_t

source code

Parses header files and returns the contained declarations.

Instance Methods
 
__init__(self, config, cache=None, decl_factory=None)
Constructor.
source code
 
read_files(self, files, compilation_mode='file by file')
Parse header files.
source code
 
read_string(self, content)
Parse a string containing C/C++ source code.
source code
Static Methods
 
get_os_file_names(files)
Returns a list of OS file names
source code
Method Details

__init__(self, config, cache=None, decl_factory=None)
(Constructor)

source code 

Constructor.

config is a configuration object that contains the parameters for invoking gccxml. cache specifies the cache to use for caching declarations between separate runs. By default, no cache is used. decl_factory is an object that must provide the same interface than decl_factory_t, i.e. there must be a set of create_* methods that return an instance of an appropriate declaration class. By default, the declaration classes defined in the declarations package are used.

Parameters:
  • config (config_t) - Configuration object
  • cache (cache_base_t or str) - Declaration cache (None=no cache)
  • decl_factory (decl_factory_t) - Custom declaration factory object or None

get_os_file_names(files)
Static Method

source code 

Returns a list of OS file names

Parameters:
  • files (list) - list of strings or file_configuration_t instances. files could contain a mix of them

read_files(self, files, compilation_mode='file by file')

source code 

Parse header files.

Parameters:
  • files (list) - list of strings or file_configuration_t instances. files could contain a mix of them
  • compilation_mode (COMPILATION_MODE) - Determines whether the files are parsed individually or as one single chunk
Returns:
Declarations

read_string(self, content)

source code 

Parse a string containing C/C++ source code.

Parameters:
  • content (str) - C/C++ source code.
Returns:
Declarations