pygccxml.declarations.filtering'.filtering

Package pygccxml :: Package declarations :: Module filtering' :: Class filtering |

# ClassType filtering

source code

deprecated!

defines few algorithms for filtering declarations

Static Methods
by_location(decls, locations) returns list of declarations that belongs to specified locations. | source code
contains_parent_dir(fpath, dirs) | source code
normalize_path(some_path) return os.path.normcase( os.path.normpath( some_path ) ) | source code
user_defined(decls, matcher) returns list of declarations that match user specified criteria. | source code

Method Details

### by_location(decls, locations) Static Method | source code
returns list of declarations that belongs to specified locations. This function works recursively. Pay attention: if you remove namespace, then you remove all declarations defined within the namespace. Parameters: `decls` (declaration or list of declarations) - declaration or list of declarations `locations` (list of strings) - list of directories and/or files names Returns: list of declarations

### user_defined(decls, matcher) Static Method | source code
returns list of declarations that match user specified criteria. This function works recursively. Parameters: `decls` (declaration or list of declarations) - declaration or list of declarations `matcher` - callable object, that takes 1 argument - declaration and returns True if object should stay, and false otherwise Returns: list of declarations