Practice Project
 All Classes Functions Pages
Particle.h
1 #pragma once
2 #include <string>
3 #include <vector>
4 
9 class Particle {
10 public:
16  Particle(const std::string& name) :
17  m_name(name) {
18  }
19 
26  unsigned getNDaughters() const;
27 
32  void addDaughter(const Particle& particle);
33 
35  std::string getName() const;
36 
37  bool operator == (const Particle& particle) {
38  return (m_name == particle.m_name);
39  }
40 
41 private:
42  std::string m_name;
43  std::vector<Particle const*> m_directDaughters;
44 };
std::string getName() const
Getter for the name of the particle.
Definition: Particle.cc:22
unsigned getNDaughters() const
Getter for Numer of Daughter Particles.
Definition: Particle.cc:6
void addDaughter(const Particle &particle)
Adding a daughter Particle to this Particle.
Definition: Particle.cc:15
Particle(const std::string &name)
Constructing Particle with a name.
Definition: Particle.h:16
This is a base class for particles in out Project.
Definition: Particle.h:9