# pygccxml.declarations.matchers module

defines all “built-in” classes that implement declarations compare functionality according to some criteria

class `access_type_matcher_t`(access_type)

  Bases: `pygccxml.declarations.matchers.matcher_base_t`

  Instance of this class will match declaration by its access type: public, private or protected. If declarations does not have access type, for example free function, then False will be returned.

class `and_matcher_t`(matchers)

  Bases: `pygccxml.declarations.matchers.matcher_base_t`

  Combine several other matchers with “&” (and) operator.

  For example: find all private functions with name XXX

      matcher = access_type_matcher_t( 'private' ) &            calldef_matcher_t( name='XXX' )

class `custom_matcher_t`(function)

  Bases: `pygccxml.declarations.matchers.matcher_base_t`

  Instance of this class will match declaration by user custom criteria.

class `matcher_base_t`

  Bases: `object`

  matcher_base_t class defines interface for classes that will implement compare functionality according to some criteria.

class `not_matcher_t`(matcher)

  Bases: `pygccxml.declarations.matchers.matcher_base_t`

  return the inverse result of a matcher

  For example: find all public and protected declarations

      matcher = ~access_type_matcher_t( 'private' )

class `or_matcher_t`(matchers)

  Bases: `pygccxml.declarations.matchers.matcher_base_t`

  Combine several other matchers with “|” (or) operator.

  For example: find all functions and variables with name ‘XXX’

      matcher = variable_matcher_t( name='XXX' ) |            calldef_matcher_t( name='XXX' )

class `regex_matcher_t`(regex, function=None)

  Bases: `pygccxml.declarations.matchers.matcher_base_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.

class `virtuality_type_matcher_t`(virtuality_type)

  Bases: `pygccxml.declarations.matchers.matcher_base_t`

  Instance of this class will match declaration by its virtual type: not virtual, virtual or pure virtual. If declarations does not have “virtual” property, for example free function, then False will be returned.