X-BOT/Compteur.cpp
2025-02-04 20:53:52 -05:00

35 lines
747 B
C++

//
// Created by Louis Gallet on 24/01/2025.
//
#include "Compteur.h"
int Compteur::constructeur = 0;
int Compteur::destructeur = 0;
int Compteur::constructeurCopie = 0;
void Compteur::ajouterConstructeur()
{
constructeur++;
}
void Compteur::ajouterConstructeurCopie()
{
constructeurCopie++;
}
void Compteur::ajouterDestructeur()
{
destructeur++;
}
string Compteur::getInformation()
{
string info = "\n\n-------------------------------\n";
info += (" NB constructeurs : " + to_string(Compteur::constructeur) + "\n");
info += (" NB constructeurs copie : " + to_string(Compteur::constructeurCopie) + "\n");
info += (" NB destructeurs : " + to_string(Compteur::destructeur) + "\n");
return info;
}