-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDrawing.cpp
50 lines (50 loc) · 1.17 KB
/
Drawing.cpp
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
//#include "Shape.h"
//#include<vector>
//#include "TPstash2.h"
//#include "Tstack2.h"
//using namespace std;
//class Drawing:public PStash<Shape>{
//public:
// ~Drawing(){cout<<"~Drawing"<<endl;}
//};
//class Plan:public Stack<Shape>{
//public:
// ~Plan(){cout<<"~plan"<<endl;}
//
//};
//class Schematic:public vector<Shape*>{
//public:
// ~Schematic(){cout<<"~Schematic()"<<endl;}
//
//};
//template<class Iter>
//void drawAll(Iter start,Iter end){
// while(start!=end) { (*start)->draw();start++; }
//}
//int main()
//{
// Drawing d;
// d.add(new Circle);
// d.add(new Square);
// d.add(new Line);
// Plan p;
// p.push(new Line);
// p.push(new Square);
// p.push(new Circle);
// Schematic s;
// s.push_back(new Square);
// s.push_back(new Circle);
// s.push_back(new Line);
// Shape*sarray[]={new Circle,new Square,new Line};
// cout<<"Drawing d:"<<endl;
// drawAll(d.begin(),d.end());
// cout<<"PLan p:"<<endl;
// drawAll(p.begin(),p.end());
// cout<<"Schematic s:"<<endl;
// drawAll(s.begin(),s.end());
// cout<<"Array sarray:"<<endl;
// drawAll(sarray,sarray+sizeof(sarray)/sizeof(*sarray));
// cout<<"End of main()"<<endl;
//
//
//}