// Very simple code to understand how tlcc works #include #define _TLMP_FOO struct _F_FOO{ #define _F_FOO_func1(x) void x func1() virtual _F_FOO_func1( )=0; #define _F_FOO_func2(x) void x func2() virtual _F_FOO_func2( )=0; }; struct FOO{ _F_FOO &c; FOO(_F_FOO &_c):c(_c){} void exec(){ c.func1(); c.func2(); } }; #ifndef _TLMP_FOO #error TLMP class FOO unknown #endif #ifndef _F_FOO_func1 #error Unknown logical function func1 for module/class FOO #endif #ifndef _F_FOO_func2 #error Unknown logical function func2 for module/class FOO #endif #line 20 "obj1.tlcc" int main() { class __sc_tests_obj1_tlcc1: public _F_FOO{ public: __sc_tests_obj1_tlcc1 () { } _F_FOO_func1( ) { #line 24 "obj1.tlcc" printf ("This is func1\n"); } // #line 26 "obj1.tlcc" _F_FOO_func2( ) { #line 27 "obj1.tlcc" printf ("This is func2\n"); } // #line 29 "obj1.tlcc" }; static __sc_tests_obj1_tlcc1 _scopeobj1; #line 23 "obj1.tlcc" FOO f(_scopeobj1); #line 30 "obj1.tlcc" f.exec(); return 0; } #line 34 "obj1.tlcc"