Package Yab :: Module Core :: Class CPreprocessorMixin
[show private | hide private]
[frames | no frames]

Class CPreprocessorMixin

Known Subclasses:
CPPTarget, CPPTarget, RCTarget

Scans the source files for include directives. Adds the included files to self.dependencies.
Method Summary
  calc_flattened_headers(self, source, include_path)
  calculate_depends(self, include_path, path)
Given the include path and the path of a C source file, return the list of files that this one directly includes.
  find_header(self, include_dirs, name)
Given a file name and a list of include directories, return the path of the include file if it is found in one of the directories, or None if not.
  get_includes(self, path)
Scan the path, getting the bracketed and quoted proprocessor include directives.
  source_fixup(self)
Overridden to find included files and add them to self.dependencies before calling the next method.
  update_header_info(self, include_path, path)
Update the header info stored on the File.

Class Variable Summary
SRE_Pattern b_include_re = \s*#\s*include\s*<([^>]*)>
SRE_Pattern q_include_re = \s*#\s*include\s*"([^"]*)"

Method Details

calculate_depends(self, include_path, path)

Given the include path and the path of a C source file, return the list of files that this one directly includes.

find_header(self, include_dirs, name)

Given a file name and a list of include directories, return the path of the include file if it is found in one of the directories, or None if not.

get_includes(self, path)

Scan the path, getting the bracketed and quoted proprocessor include directives. Returns a 2-tuple: first element is bracketed (<>) includes, second is quoted includes.

source_fixup(self)

Overridden to find included files and add them to self.dependencies before calling the next method.

update_header_info(self, include_path, path)

Update the header info stored on the File. Recursively updates any included files.

Class Variable Details

b_include_re

Type:
SRE_Pattern
Value:
\s*#\s*include\s*<([^>]*)>                                             

q_include_re

Type:
SRE_Pattern
Value:
\s*#\s*include\s*"([^"]*)"                                             

Generated by Epydoc 2.0 on Fri Aug 15 16:30:51 2003 http://epydoc.sf.net