unit_add_definition.xsl

Weaving Rule that adds a definition to a unit.
  • srcML element: src:unit
  • advice type: add
  • codeModifier type: definition

The definition is always added at the end of the unit.

Example

#include <stdio.h>
void Foo:foo() {
  printf("foo");
}

Code Modifier

<codeModifier type="definition">
  <text>void Foo:foo1() {</text>
  <text>  printf("foo1");</text>
  <text>}</text>
</codeModifier>

Modified Code

#include <stdio.h>
void Foo:foo() {
  printf("foo");
}
void Foo:foo1() {
  printf("foo1");
}

Examples in AspectX Sample Library

Examples in AspectX Test Suite

CVS Id:
Author:
ibirrer
Copyright:
2004, P&P Software GmbH

Match Templates Summary

Match Templates Detail