AddFunctionComment_2 Aspect
[C-language Group]

This aspect is defined in file: ../../AspectXLib/c/quickSort/aspects/AddFunctionComment_2.ax

Aspect Description

Sample aspect program to modify a function comment. This aspect program defines a text fragment that can be added to the comment of a set of target functions. The target functions are defined through the return type. The target functions are those that have return type void. A related aspect program (AddFunctionComment_1) shows an alternative way to modify function comments.
Author:
I. Birrer
See also:
AddFunctionComment_1

Pointcuts

functiontargetFunction
 Points to the target functions whose comment should be modified
commenttargetFunctionComment
 Points to the comments that must be modified

Advices

endaddFunctionComment
 Add a comment at the end of the comment of the target function

Pointcut Documentation

function targetFunction (source)
Points to the target functions whose comment should be modified. The target functions are identified as follows. In srcML, functions are described by a function element which have a subelement called type which holds the return type of the function. The type of the function is itself enclosed by a name element. The target functions are identified using an XPath expression that identifies all function elements which have the return type void.
comment targetFunctionComment (source)
Points to the comments that must be modified. These comments are defined as the comments that are followed by the targetFunction pointcut.

Advice Documentation

end addFunctionComment (source)

Triplet: comment end comment

Add a comment at the end of the comment of the target function. A CDATA section is used in order to allow use of HTML tags in the comment text. Aspect program AddFunctionComment_1 shows an alternative way to express the HTML tag.

Refers to global pointcut: comment targetFunctionComment