/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2013,2014,2015,2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
#ifndef GMX_SELECTION_TESTS_TOPUTILS_H
#define GMX_SELECTION_TESTS_TOPUTILS_H
+#include <memory>
#include <vector>
struct gmx_mtop_t;
void initFrameIndices(const ArrayRef<const int> &index);
- gmx_mtop_t *topology() { return mtop_; }
+ gmx_mtop_t *topology() { return mtop_.get(); }
t_atoms &atoms();
t_trxframe *frame() { return frame_; }
private:
- gmx_mtop_t *mtop_;
- t_trxframe *frame_;
- std::vector<char *> atomtypes_;
+ std::unique_ptr<gmx_mtop_t> mtop_;
+ t_trxframe *frame_;
+ std::vector<char *> atomtypes_;
};
} // namespace test