Incendie
essence.h
1 #ifndef ESSENCE_H
2 #define ESSENCE_H
3 
4 #include <string>
5 #include <sstream>
6 
7 class Essence
8 {
9 private:
10  unsigned indice;
11  std::string name;
12  unsigned masse_V;
13  float diametre;
14  float hauteur;
15  unsigned ageMaturite;
16  bool type; // 0 pour résineux, 1 pour feuillu
17 
18 public:
19  // Constructors
20  Essence(unsigned int i, std::string nom, int masse, float _diametre, float _hauteur, unsigned int age, bool t);
21  Essence(const Essence& other);
22 
23  // Getters and setters
24  unsigned getIndice() const {return indice;};
25  std::string getName() const {return name;};
26  unsigned getMasse() const {return masse_V;};
27  float getDiametre() const {return diametre;};
28  float getHauteur() const {return hauteur;};
29  unsigned getAgeMaturite() const {return ageMaturite;};
30  bool getType() const {return type;};
31 
32  void setName(std::string x);
33  void setMasse(int x);
34  void setType(bool t);
35  void setHauteur(float h);
36  void setDiametre(float d);
37 
38  // Operateurs
39  virtual Essence& operator=(const Essence& other);
40 
41  // Autres méthodes
42  std::string toString() const;
43 
44 };
45 
46 #endif // ESSENCE_H
47 
Definition: essence.h:7