| 1 |
// -*- C++ -*- |
| 2 |
// |
| 3 |
// This file is part of HepMC |
| 4 |
// Copyright (C) 2014-2019 The HepMC collaboration (see AUTHORS for details) |
| 5 |
// |
| 6 |
/// |
| 7 |
/// @file GenParticle_fwd.h |
| 8 |
/// @brief Minimal forward declarations for GenParticle |
| 9 |
/// |
| 10 |
|
| 11 |
#ifndef HEPMC3_GENPARTICLE_FWD_H |
| 12 |
#define HEPMC3_GENPARTICLE_FWD_H |
| 13 |
|
| 14 |
#include <memory> |
| 15 |
#include <vector> |
| 16 |
|
| 17 |
namespace HepMC3 { |
| 18 |
|
| 19 |
class GenParticle; |
| 20 |
|
| 21 |
using GenParticlePtr = std::shared_ptr<GenParticle>; |
| 22 |
using ConstGenParticlePtr = std::shared_ptr<const GenParticle>; |
| 23 |
|
| 24 |
using GenParticles = std::vector<GenParticlePtr>; |
| 25 |
using ConstGenParticles = std::vector<ConstGenParticlePtr>; |
| 26 |
|
| 27 |
/// An alias to a vector of GenParticle pointers whose constness depends on the |
| 28 |
/// constness of the template shared_ptr param |
| 29 |
/// This is convenient for declaring the return types based on the input type |
| 30 |
template<typename T> |
| 31 |
using GenParticles_type = typename std::conditional<std::is_const<typename T::element_type>::value, ConstGenParticles, GenParticles>::type; |
| 32 |
|
| 33 |
} |
| 34 |
|
| 35 |
#endif |