C++ Work

We are rewriting part of XSPEC using C++. Most of the real work is being done by Ben Dorman (Raytheon/GSFC). Our aims are the following.
  • Internally, XSPEC uses object-oriented concepts, but in Fortran. This has severe limitations, particularly in the use of dynamic memory, and leads to a more complex structure than is necessary. By replacing parts of the code by C++ we hope to simplify the code and make it more maintainable and extendable in the long term.

  • To add support for the Integral mission (and other coded aperture mask instruments) we want to be able to associate more than one model and response with each dataset. Retrofitting this into the current code would be horrendous but we are designing the capability into the new version.

  • We will not be replacing the CPU-intensive sections of the code since they work better using Fortran. We will also not be replacing the Fortran interface to model evaluation routines.

  • The C++ rewrite allows us to make improvements to the way that parameters and models are handled. The new version supports arbitrarily complex arrangements of model components. We also intend to allow parameters to be related in more complicated ways that the simple linking in the current version.

  • We are working with the ASCFIT team to find compatibilities between XSPEC and ASCFIT to allow us to share methods and code.

  • We are using the Rational Rose software engineering tool to aid in the design and implementation. This supports automatic generation of template code based on class diagrams and has simplified our work considerably.