1. Using tags
2. Tag list
3. One little example
4. Tag definition
4.1 call
4.2 f
4.3 glocal
4.3.1 Using nested glocals
4.4 mod
4.5 obj
5. Creating components
5.1 Definition
5.2 Implementation
5.3 Taking advantage of the C++ implementation
5.4 Calling functags
5.5 Extending the functor classes
5.6 Adding content to the functor
5.7 Grabbing the functor address
Top 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 Up
Prec

Next
One big HTML document