Use smart pointers to manage the selection tree.
Changed t_selelem to gmx::SelectionTreeElement and t_selelem * to
gmx::SelectionTreeElementPointer (or a const reference). The latter is
a boost::shared_ptr because there may be multiple references to some
elements in the evaluation tree. Some exceptions to the above rule are
present, because it was not straightforward to change those parts.
Prerequisite for using exceptions throughout the selection code, which
in turn is a prerequisite for many tasks that would introduce more C++
there.
There are some parts that are not yet exception-safe, but may throw
std::bad_alloc as the result of these changes. Will fix those in
subsequent commits.
Related to #655 and #880.
Change-Id: Ib36c08bac1ab2c9818604e45e2eb14a90069efdb
23 files changed: