Practice Project
 All Classes Functions Pages
Public Member Functions | List of all members
Particle Class Reference

This is a base class for particles in out Project. More...

#include <Particle.h>

Public Member Functions

 Particle (const std::string &name)
 Constructing Particle with a name. More...
 
unsigned getNDaughters () const
 Getter for Numer of Daughter Particles. More...
 
void addDaughter (const Particle &particle)
 Adding a daughter Particle to this Particle. More...
 
std::string getName () const
 Getter for the name of the particle. More...
 
bool operator== (const Particle &particle)
 

Detailed Description

This is a base class for particles in out Project.

Later we will subclass this.

Definition at line 9 of file Particle.h.

Constructor & Destructor Documentation

Particle::Particle ( const std::string &  name)
inline

Constructing Particle with a name.

The syntax after the colon means, that the member m_name will be constructed with the value of the argument name and is called an initialization list.

Definition at line 16 of file Particle.h.

Member Function Documentation

void Particle::addDaughter ( const Particle particle)

Adding a daughter Particle to this Particle.

We will take the address of the particle and store it internally.

Definition at line 15 of file Particle.cc.

std::string Particle::getName ( ) const

Getter for the name of the particle.

Definition at line 22 of file Particle.cc.

unsigned Particle::getNDaughters ( ) const

Getter for Numer of Daughter Particles.

The "const" tells the compiler, that it is not allowed to change a member of the class Particle inside the function.
This function is only DECLARED here, but DEFINED in a separate .cc file.

Definition at line 6 of file Particle.cc.


The documentation for this class was generated from the following files: