Commit 3f44c038 authored by Jens Wehner's avatar Jens Wehner

replaced typedef by using

parent f2d06c90
Pipeline #89543570 canceled with stages
in 251 minutes and 17 seconds
......@@ -50,7 +50,7 @@ class BeadList {
void push_back(Bead *bead) { _beads.push_back(bead); }
typedef typename std::vector<Bead *>::iterator iterator;
using iterator = typename std::vector<Bead *>::iterator;
iterator begin() { return _beads.begin(); }
iterator end() { return _beads.end(); }
......
......@@ -53,7 +53,7 @@ class ExclusionList {
void CreateExclusions(Topology *top);
exclusion_t *GetExclusions(Bead *bead);
typedef std::list<exclusion_t *>::iterator iterator;
using iterator = std::list<exclusion_t *>::iterator;
iterator begin() { return _exclusions.begin(); }
iterator end() { return _exclusions.end(); }
......
......@@ -100,8 +100,7 @@ class NBList : public PairList<Bead *, BeadPair> {
return dynamic_cast<BeadPair *>(new pair_type(bead1, bead2, r));
}
typedef BeadPair *(*pair_creator_t)(Bead *bead1, Bead *bead2,
const Eigen::Vector3d &r);
using pair_creator_t = BeadPair *(*)(Bead *, Bead *, const Eigen::Vector3d &);
/// the current bead pair creator function
pair_creator_t _pair_creator;
......@@ -121,8 +120,8 @@ class NBList : public PairList<Bead *, BeadPair> {
template <typename T>
class FunctorMember : public Functor {
public:
typedef bool (T::*fkt_t)(Bead *, Bead *, const Eigen::Vector3d &,
const double dist);
using fkt_t = bool (T::*)(Bead *, Bead *, const Eigen::Vector3d &,
const double);
FunctorMember(T *cls, fkt_t fkt) : _cls(cls), _fkt(fkt) {}
......@@ -139,8 +138,8 @@ class NBList : public PairList<Bead *, BeadPair> {
/// Functor for non-member functions
class FunctorNonMember : public Functor {
public:
typedef bool (*fkt_t)(Bead *, Bead *, const Eigen::Vector3d &,
const double dist);
using fkt_t = bool (*)(Bead *, Bead *, const Eigen::Vector3d &,
const double);
FunctorNonMember(fkt_t fkt) : _fkt(fkt) {}
bool operator()(Bead *b1, Bead *b2, const Eigen::Vector3d &r,
......
......@@ -124,10 +124,10 @@ class NBList_3Body : public TripleList<Bead *, BeadTriple> {
new triple_type(bead1, bead2, bead3, r12, r13, r23));
}
typedef BeadTriple *(*triple_creator_t)(Bead *bead1, Bead *bead2, Bead *bead3,
const Eigen::Vector3d &r12,
const Eigen::Vector3d &r13,
const Eigen::Vector3d &r23);
using triple_creator_t = BeadTriple *(*)(Bead *, Bead *, Bead *,
const Eigen::Vector3d &,
const Eigen::Vector3d &,
const Eigen::Vector3d &);
/// the current bead pair creator function
triple_creator_t _triple_creator;
......@@ -149,10 +149,9 @@ class NBList_3Body : public TripleList<Bead *, BeadTriple> {
template <typename T>
class FunctorMember : public Functor {
public:
typedef bool (T::*fkt_t)(Bead *, Bead *, Bead *, const Eigen::Vector3d &,
const Eigen::Vector3d &, const Eigen::Vector3d &,
const double dist12, const double dist13,
const double dist23);
using fkt_t = bool (T::*)(Bead *, Bead *, Bead *, const Eigen::Vector3d &,
const Eigen::Vector3d &, const Eigen::Vector3d &,
const double, const double, const double);
FunctorMember(T *cls, fkt_t fkt) : _cls(cls), _fkt(fkt) {}
......@@ -171,10 +170,9 @@ class NBList_3Body : public TripleList<Bead *, BeadTriple> {
/// Functor for non-member functions
class FunctorNonMember : public Functor {
public:
typedef bool (*fkt_t)(Bead *, Bead *, Bead *, const Eigen::Vector3d &,
const Eigen::Vector3d &, const Eigen::Vector3d &,
const double dist12, const double dist13,
const double dist23);
using fkt_t = bool (*)(Bead *, Bead *, Bead *, const Eigen::Vector3d &,
const Eigen::Vector3d &, const Eigen::Vector3d &,
const double, const double, const double);
FunctorNonMember(fkt_t fkt) : _fkt(fkt) {}
bool operator()(Bead *b1, Bead *b2, Bead *b3, const Eigen::Vector3d &r12,
......
......@@ -33,8 +33,8 @@ class PairList {
// this method takes ownership of p
void AddPair(pair_type *p);
typedef typename std::vector<pair_type *>::iterator iterator;
typedef typename std::vector<pair_type *>::const_iterator const_iterator;
using iterator = typename std::vector<pair_type *>::iterator;
using const_iterator = typename std::vector<pair_type *>::const_iterator;
typedef typename std::map<element_type, pair_type *> partners;
iterator begin() { return _pairs.begin(); }
......@@ -56,8 +56,8 @@ class PairList {
partners *FindPartners(element_type e1);
typedef element_type element_t;
typedef pair_type pair_t;
using element_t = element_type;
using pair_t = pair_type;
protected:
std::vector<pair_type *> _pairs;
......
......@@ -40,10 +40,10 @@ namespace csg {
class Interaction;
typedef std::vector<Molecule *> MoleculeContainer;
typedef std::vector<Bead *> BeadContainer;
typedef std::vector<Residue *> ResidueContainer;
typedef std::vector<Interaction *> InteractionContainer;
using MoleculeContainer = std::vector<Molecule *>;
using BeadContainer = std::vector<Bead *>;
using ResidueContainer = std::vector<Residue *>;
using InteractionContainer = std::vector<Interaction *>;
/**
* \brief topology of the whole system
......
......@@ -39,7 +39,7 @@ class TopologyMap {
Topology *_in;
Topology *_out;
typedef std::vector<Map *> MapContainer;
using MapContainer = std::vector<Map *>;
MapContainer _maps;
};
......
......@@ -32,7 +32,7 @@ class TripleList {
void AddTriple(triple_type *t);
typedef typename std::vector<triple_type *>::iterator iterator;
using iterator = typename std::vector<triple_type *>::iterator;
iterator begin() { return _triples.begin(); }
iterator end() { return _triples.end(); }
......@@ -47,8 +47,8 @@ class TripleList {
triple_type *FindTriple(element_type e1, element_type e2, element_type e3);
typedef element_type element_t;
typedef triple_type triple_t;
using element_t = element_type;
using triple_t = triple_type;
private:
std::vector<triple_type *> _triples;
......
......@@ -72,9 +72,8 @@ class XYZReader : public TrajectoryReader, public TopologyReader {
void AddAtom(T &container, std::string name, int id,
const Eigen::Vector3d &pos) {
// the typedef returns the type of the objects the container holds
typedef
typename std::iterator_traits<decltype(container.begin())>::value_type
atom;
using atom =
typename std::iterator_traits<decltype(container.begin())>::value_type;
Eigen::Vector3d pos2 = pos * tools::conv::ang2bohr;
container.push_back(atom(id, name, pos2));
}
......
......@@ -23,7 +23,7 @@ using namespace votca::tools;
namespace votca {
namespace csg {
typedef boost_bimap::value_type element;
using element = boost_bimap::value_type;
void BeadMotifConnector::AddMotifAndBeadEdge(Edge motif_edge, Edge bead_edge) {
motif_and_bead_edges_.insert(element(motif_edge, bead_edge));
......
......@@ -29,7 +29,7 @@
namespace votca {
namespace csg {
typedef Eigen::MatrixXd group_matrix;
using group_matrix = Eigen::MatrixXd;
using namespace std;
void imcio_write_dS(const string &file, const tools::Table &dS,
......
......@@ -136,7 +136,7 @@ class CGForceMatching : public CsgApplication {
/// \brief list of non-bonded interactions
std::vector<votca::tools::Property *> _nonbonded;
typedef vector<SplineInfo *> SplineContainer;
using SplineContainer = vector<SplineInfo *>;
/// \brief vector of SplineInfo * for all interactions
SplineContainer _splines;
......
......@@ -84,7 +84,7 @@ class CsgREupdate : public CsgApplication {
Property _options;
std::vector<Property *> _nonbonded;
typedef std::vector<PotentialInfo *> PotentialContainer;
using PotentialContainer = std::vector<PotentialInfo *>;
PotentialContainer _potentials;
int _nlamda;
......@@ -135,7 +135,7 @@ class CsgREupdateWorker : public CsgApplication::Worker {
Property _options;
std::vector<Property *> _nonbonded;
typedef std::vector<PotentialInfo *> PotentialContainer;
using PotentialContainer = std::vector<PotentialInfo *>;
PotentialContainer _potentials;
int _nlamda;
......
......@@ -53,8 +53,8 @@ class Imc {
protected:
tools::Average<double> _avg_vol;
typedef Eigen::MatrixXd group_matrix;
typedef Eigen::Block<group_matrix> pair_matrix;
using group_matrix = Eigen::MatrixXd;
using pair_matrix = Eigen::Block<group_matrix>;
/// struct to store collected information for interactions
struct interaction_t {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment