This document briefly describe how to install and expand the library. If you want to learn how to use it, please read the tutorial.
To be quite honest, there's nothing
really special to do. Just copy the slotsig
directory in a place you can reach to include files it contains.
Under Linux, for example, you can do a system-wide installation just
by copying this directory into /usr/include
.
The installation can be something as simple as (being root) :
# tar jxvf
slotsig-x.y.tar.bz2
# cp -Rv slotsig-x.y/slotsig /usr/include
And that's it... almost.
Most of SlotSig is template
classes. But there's one file you must compile and link with your
project (whatever it is, a library or a program), it's the file
slotsig_bases.cpp
contained in the same
directory as the other header files.
By default, the library provides support for signals and slots sending (or receiving) up to 16 parameters. If you need more, for your convenience a Python script is provided in the root directory. For example, to provide support for 17 parameters, run :
# cd
/your/path/to/slotsig-x.y
# python generate_slotsig.py 17
This will generate two files :
one in the slotsig
directory, named slotsig_17.h
;
one in the tests
directory, named test_17.cpp
.
You can check if everything if OK by compiling and running the test program, for example, using g++ :
# g++ -Wall
-lstdc++ -o test_17.x tests/test_17.cpp slotsig/slotsig_bases.cpp &&
./test_17.x
The program should compile without any warning, and run without crashing. Please note the last parameter, this file really must be compiled and linked with your project.
Of course, you may need to copy the
newly-generated slotsig_17.h
file to an
appropriate place, where all the other files already rely.