-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathComponents.h
63 lines (47 loc) · 1.16 KB
/
Components.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#ifndef COMPONENTS_H
#define COMPONENTS_H
#include <string>
#include <fstream>
class Components{
friend std::ostream &operator<<(std::ostream &os, const Components &c){
os << c.ID << " " << c.Components_Name << " " << c.Type << std::endl;
return os;
}
public:
std::string ID;
std::string Components_Name;
std::string Type;
Components(std::string t, std::string i, std::string n);
Components();
std::string set_Components_ID(std::string i);
std::string set_Components_Name(std::string n);
std::string set_Type(std::string t);
std::string get_Components_ID();
std::string get_Components_Name();
std::string get_Type();
};
class cube : public Components
{
public:
cube(std::string t, std::string i, std::string n) : Components( t, i, n){
};
};
class pyramid : public Components
{
public:
pyramid(std::string t, std::string i, std::string n) : Components( t, i, n){
};
};
class line : public Components
{
public:
line(std::string t, std::string i, std::string n) : Components( t, i, n){
};
};
class sphere : public Components
{
public:
sphere(std::string t, std::string i, std::string n) : Components( t, i, n){
};
};
#endif // COMPONENTS_H