Inter-thread Communication System (ITC) (C) 2001 Charles Samuels <charles@kde.org> version 1.0beta2 2001-08-18 1:20am PDT ----- Easy Stub system for calling functions in other threads. ----- LICENSE: LGPL ----- Bugs: - Namespace support is lacking, classes can't be nested (Very well) - flex code looks like crap Todo: - switch to C lex (POSIX), instead of GNU's C++ version - Switch to autoconf/automake (you don't want it to be too fast...) ----- To use... 1) inherit* from ITC::Base 2) put all your exported functions under itcpublic: (behaves just like public) 3) run itcproc --header -o myclass.itc.h myclass.h 4) run itcproc -o myclass.itc.cpp myclass.h 5) #include "myclass.itc.h" above where you want to use the stubs 6) Instanciate the class that inherits ITC::Base 7) Instanciate the Stub class 8) call functions normally in the stub class * It MUST end with "Impl" Example: FooImpl fooImpl; // ... [ summon the thread ] Foo foo(&fooImpl); foo.whatever(); class FooImpl { itcpublic: void doThis(const vector<string> &strings); async doThat(); // it returns immediately from the stub double amazing(); // void whatever(double); // ILLEGAL, double needs a typename void whatever(double d); // that's ok };