njårdshome

Abstract

Download

History

API Documentation for ITC 1.0 Here.

Manual

Inter-thread Communication System (ITC)
(C) 2001 Charles Samuels <charles@kde.org>

version 1.0 2002-02-26 5:04pm PDT

-----

Easy Stub system for calling functions in other threads.
Complete threading API.
Threadsafe data FIFO (Pipe)

-----

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...


- inherit* from ITC::Base
- put all your exported functions under itcpublic:
  (behaves just like public)
- run itcproc --header -o myclass.itc.h myclass.h
- run itcproc -o myclass.itc.cpp myclass.h
- #include "myclass.itc.h" above where you want to use the stubs
- Instanciate the class that inherits ITC::Base
- Instanciate the Stub class
- 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 name
    void whatever(double d); // that's ok
};