Top Content Up
Prec

5.4 Calling functags

Next

For a component foo, there is a struct _F_foo. For a given call foo, the functags are member functions of a new class derived from _F_too.

Look at the following example:

<mod>
int f()
{
	<call foo>();
		<f print>
			// Print some output
			if (some condition){
				error();
			}
		</f>
		<f error>
			// Print some error
		</f>
	</call>
}
</mod>

Calling functags

This is tranlated in C++ as (aproximatly):
class scopecls1: public _F_foo{
	void print();
	void error();
}
void scopecls1::print()
{
	// Print some output
	if (some_condition){
		error();
	}
}
void scopecls1::error()
{
	// Print some error
}
int f()
{
	scopecls1 c;
	foo (c);
}


As you see, the error functag is called from the print functag which is possible because both functag are indeed member functions of the same classes.
Top Content Up
Prec

Next
Table of content
One big HTML document