Skip to content

Free Function Stereotypes

Ali F. Al-Ramadan edited this page May 22, 2025 · 1 revision

A free function is a function that is not bound to a particular class. Static methods/functions as well as friend functions (C++) are also considered as free functions.

Type Description
predicate Returns a bool derived from the parameters
property Returns a non-bool derived from the parameters
global-command Changes a global or a static variable
command Changes a parameter passed by reference
factory Creates and returns a new locally created object
main A main function
literal Does not read or change parameters
wrapper Does not change parameters. Has at least one call to other class methods or to a free function
empty Has no statements

TABLE 1. Taxonomy of Free Function Stereotypes.

Clone this wiki locally