Wildcards

A few commands specify wildcards for items such as procedure names. A question-mark `?' matches any single letter while an asterisk `*' or an at-sign `@' matches any number of letters so that, for example, "??*" matches all names which are at least two characters long.

There are several different formats when referring to procedures in C++:

Expression Meaning
class::func(types)
Wildcard characters may appear in both the class or the func field, and the character `@' may appear in the types list to match an arbitrary number of arguments of arbitrary types.
class::operator @(types)
Matches all operators of the given class and types.
class::func
Matches all members whose names match func of all classes whose names match class, regardless of their arguments.
class::operator op
Matches all operators which match op, and are either class members or their first operand is indicated class.
::func
Matches all functions that are not class members whose names match func. Argument types are supplied to restrict the match.
func
Matches all functions, whether class members or not, whose names match func.

When using a syntax including class::, all base classes of class are also searched. Aside from that, there is no other notion of inheritance and this match is purely syntactic.

Related topic:


Previous

Next



Copyright © 1999, Green Hills Software. All rights reserved.