Classical mutex is provided by the rtMutex class. It got essentialy
two accesors : P(void) (pick the ``token'') and R(void)
(release it).
rtRecursiveMutex (that inherits from rtMutex class) allows
a predefined number of ``token'' to be picked at a time. Number is an
optional argument to class's constructor (default is 16).
A shared data can be written by one writer, at a time, or readen by many
readers. Basic operations are provided by
begWrite(void)/endWrite(void) and begRead(void)
/endRead(void) methods.
Readers(void) method give the reader's number, and
DirectReaders(void) does the same thing without implicitly
assuming any other concurent access (this can be useful precautions have
been taken by programmer). Anyway, those methods are situated at a very
low level, and you probably won't care.
rtSharedInt holds a single shared integer that can be read using
Value(void) or DirectValue(void) methods, and sets
by set(int _value) or prefixed ++ and --
operators.
A paramater (rtParameter class) has following protected char* members:
namelabelunitAccessors have same name, with an upcased first character.
rtIntegerParameter is derived from rtParameter and rtSharedInt and can be cloned using the
rtIntegerParameter *clone(void) method.
It appears that a intermediate class could introduce a more flexible implementation.
rtParameters defines a fixed number of pointers to some parameters.
You'll probably need the AddInt(...), GetInt(int _index),
and GetInt(char *_name) methods to handle parameters.