Michele De Stefano's C++ Utilities
|
This library contains a collection of several C++ utilities for pure C++ development as well as for building Python extensions.
Starting from the 2.0.0 release, a C++ 2011 conforming compiler is needed. Any build with the previous C++ standard is not supported anymore. An mds_utils Python package is also provided; it exposes some Boost uBLAS matrices and vectors to Python. It can be built and installed using the standard setuptools. It requires SWIG to be present on your system (the package has been developed and tested with SWIG 2.0.11). Actually, SWIG is the recommended tool to use when using the mds-utils library for building Python extensions. The objects exported by the mds_utils package can be easily reused by other extension modules. An example is shown in file ublas_pkg_usage.i. The documentation of the Python package is in docstrings. Once imported, type
help(mds_utils)
That will be your starting point into the documentation.
MDS-UTILS provides:
Each class is a well-documented, small, easy to use and it should never be too difficult to learn to use it.
A large percentage of this library makes a heavy usage of the Boost C++ libraries: so, they must be installed on the system. It is assumed that the user is familiar with them.
This documentation is organized in modules. If you select the "Modules" link (either in the top tabs or into the side browser) you will find the list of the modules. Each module link expands into a list of files.
Each file is aimed to the solution of a particular group of problems and brings with it an entire group of classes and functions. Clicking on a file name gives access to the specific documentation and to the classes the file defines.
Generally, for each class or function, there is a brief usage example. It is strongly suggested first, to read the general description of a class, second, to jump directly to the usage example (just to have an idea of what can be done with the class), and, only as a last step, to go back and read the whole documentation of the methods and attributes, looking again at the example for a better understanding. This seems to be the fastest method for learning to use this library.
Release 2.1.1
Release 2.1.0
Release 2.0.0:
Release 1.3.0:
Release 1.2.0:
Release 1.1.0:
boost::python::object
that helps in using python file objects within python extensions written with Boost.Python.You can download mds-utils at the following link:
https://sourceforge.net/projects/mds-utils/
Basically, there is nothing to build, because this library is completely template based. All that you need is to place the mds_utils folder (within the include folder) where you prefer.
For Unix/Linux users, installation is facilitated by the GNU build system. So, basically, the usual sequence configure, make, make install will properly install the library.
Have a look at the INSTALL file.
If you have downloaded the development version from the repository and you use a Linux OS you first have to issue "autoreconf -i" into the main folder. This will create the proper configure and Makefile.in files. Then you will be able to follow the previous steps.
If you want to build the mds_utils Python package you have to enter the python directory and issue the command
python setup.py build
The previous command uses SWIG, so it needs to be installed on the system. The package has been developed and tested with SWIG 2.0.11 and I don't know how it behaves with other SWIG versions. The mds_utils Python package uses also NumPy and SciPy, so these packages must be present on the system together with their development headers. For installing the package issue
python setup.py install
For detailed instructions on the build process, from within the python directory, issue the command
python setup.py --help
and you will be able to see build and installation instructions. It is recommended to perform the installation of this Python package in two steps, as explained above. First run the setup.py script with the build option. Then run it again with the install option. This two-stage installation is required for working around a bug in Python distutils.
If you have manually installed the Boost C++ libraries, you can export the BOOST_DIR
environment variable on the shell, assigning to it the full path to the Boost root installation. The setup.py
script will detect the BOOST_DIR
variable and use it.
To build documentation you need doxygen (so, install it if you don't have). Go into the sources root directory and type
doxygen
this will create the "doc" directory, containing the whole documentation.
mds_utils is distributed under the MIT license (see the LICENSE file).