KurusView  1.0
MMaterial.h
1 #ifndef INC_KURUSVIEW_MMATERIAL_H
2 #define INC_KURUSVIEW_MMATERIAL_H
3 
4 #include <string>
5 #include <fstream>
6 
7 // Class for the Material and its properties.
8 class MMaterial {
9 private:
10  const unsigned int ID; // Object for the material ID.
11  std::string name; // Object of the material name.
12  std::string colour; // Object for the material colour.
13  double density; // Object for the material density.
14 public:
18  MMaterial();
26  MMaterial(std::string name, std::string colour, double density, unsigned int id);
27  /*
28  * @breif ~Material - Destructor
29  */
30  ~MMaterial() = default;
31 
38  friend std::ofstream &operator<<(std::ofstream &os, MMaterial &obj);
39 
40  unsigned int getId() const;
41 
46  std::string getName() const;
47 
52  void setName(const std::string name);
53 
58  std::string getColour() const;
59 
64  void setColour(const std::string colour);
65 
70  double getDensity() const;
71 
76  void setDensity(double density);
77 
78 };
79 
80 #endif //INC_KURUSVIEW_MMATERIAL_H
void setName(const std::string name)
Definition: MMaterial.cpp:12
void setColour(const std::string colour)
setColour - Sets the colour of the material
Definition: MMaterial.cpp:20
void setDensity(double density)
setDensity - Sets the density of the material
Definition: MMaterial.cpp:28
double getDensity() const
Definition: MMaterial.cpp:24
Definition: MMaterial.h:8
std::string getName() const
getName - Gets the name of the material
Definition: MMaterial.cpp:8
std::string getColour() const
getColour - Gets the colour of the material
Definition: MMaterial.cpp:16
friend std::ofstream & operator<<(std::ofstream &os, MMaterial &obj)
Definition: MMaterial.cpp:40