Package pygccxml :: Package declarations :: Module matchers :: Class regex_matcher_t |

# type regex_matcher_t

source code

        object --+
                 |
    matcher_base_t --+
                     |
                    regex_matcher_t

Instance of this class will match declaration using regular expression. User should supply a function that will extract from declaration desired information as string. Later, this matcher will match that string using user regular expression.

Instance Methods
__init__(self, regex, function=None) | source code
__call__(self, decl) | source code
__str__(self) | source code
Inherited from `matcher_base_t`: `__and__`, `__invert__`, `__or__`

Method Details

### __init__(self, regex, function=None) (Constructor) | source code
Parameters: `regex` (string, an instance of this class will compile it for you) - regular expression `function` - function that will be called to get an information from declaration as string. As input this function takes 1 argument: reference to declaration. Return value should be string. If function is None, then the matcher will use declaration name. Overrides: matcher_base_t.__init__

### __call__(self, decl) (Call operator) | source code
Overrides: matcher_base_t.__call__

### __str__(self) (Informal representation operator) | source code
Overrides: matcher_base_t.__str__