// 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; }; void foo (_F_foo &c) { c.func1(); c.func2(); } #ifndef _TLMP_foo #error TLMP module 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 17 "simple.tlcc" int main() { class __sc_tests_simple_tlcc1: public _F_foo{ public: __sc_tests_simple_tlcc1 () { } _F_foo_func1( ) { #line 21 "simple.tlcc" printf ("This is func1\n"); } // #line 23 "simple.tlcc" _F_foo_func2( ) { #line 24 "simple.tlcc" printf ("This is func2\n"); } // #line 26 "simple.tlcc" }; static __sc_tests_simple_tlcc1 _scopeobj1; #line 20 "simple.tlcc" ::foo(_scopeobj1); #line 27 "simple.tlcc" return 0; } #line 30 "simple.tlcc"