Skip to content

Commit ce795e4

Browse files
author
jason_yao
committed
update
1 parent 4f63bc3 commit ce795e4

16 files changed

Lines changed: 33 additions & 51 deletions

File tree

大話/cpp/README

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
singleton // TODO
2+
flyWeight // TODO
3+
prototype // TODO

大話/cpp/brige/brige.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ class NokiaMobile : public Mobile {
5050
NokiaMobile(std::string brand);
5151

5252
virtual void run();
53-
5453
};
5554

5655
MotoMible::MotoMible(std::string brand)
@@ -110,5 +109,3 @@ int main() {
110109
moto->run();
111110
return 0;
112111
}
113-
114-

大話/cpp/chainOfResponsibility/chainOfResponsibility.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ class Director : public RequestHandler {
4141

4242
};
4343

44-
4544
class Manager : public RequestHandler {
4645
public:
4746
virtual void handleRequest(Request* que);

大話/cpp/decorator/decorator.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
#include <string>
44

55
class Person {
6-
76
private:
87
std::string name;
98
public:
@@ -43,8 +42,6 @@ class TShirt : public Finery {
4342
virtual void show();
4443
};
4544

46-
47-
4845
class DecoraterMain {
4946

5047
///

大話/cpp/facade/facade.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,13 @@ class Stock2 {
99
};
1010

1111
class Stock1 {
12-
1312
public:
1413
virtual void buy();
1514

1615
virtual void sell();
1716
};
1817

1918
class Fund {
20-
2119
private:
2220
Stock1* s1;
2321
Stock2* s2;
@@ -27,7 +25,6 @@ class Fund {
2725
virtual void method1();
2826

2927
virtual void method2();
30-
3128
};
3229

3330
void Stock1::buy() {

大話/cpp/factoryMethod/factoryMethod.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,11 @@ class LeiFeng {
1111
};
1212

1313
class IFactory {
14-
1514
public:
1615
virtual LeiFeng* createLeiFeng() = 0;
1716
};
1817

1918
class VolunteerFactory : public IFactory {
20-
2119
public:
2220
virtual LeiFeng* createLeiFeng();
2321

大話/cpp/mediator/mediator.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ class Country {
1717
virtual UnionNations* getUn();
1818

1919
virtual void setUn(UnionNations* un);
20-
2120
};
2221

2322
class USA : public Country {
@@ -27,7 +26,6 @@ class USA : public Country {
2726
virtual void declare(std::string message);
2827

2928
virtual void getMessage(std::string message);
30-
3129
};
3230

3331
class Iraq : public Country {
@@ -37,7 +35,6 @@ class Iraq : public Country {
3735
virtual void declare(std::string message);
3836

3937
virtual void getMessage(std::string message);
40-
4138
};
4239

4340
class UnionNationsSecurityCouncil : public UnionNations {
@@ -55,7 +52,6 @@ class UnionNationsSecurityCouncil : public UnionNations {
5552
virtual void setIraq(Iraq* iraq);
5653

5754
virtual void declare(std::string message, Country* country);
58-
5955
};
6056

6157
Iraq::Iraq(UnionNations* un) : Country(un) {

大話/cpp/prototype/prototype.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ class Resume : public Cloneable {
2626
virtual Resume* clone();
2727
};
2828

29-
3029
Resume::Resume(std::string name) {
3130
this->name = name;
3231
}

大話/cpp/simpleFactory/SimpleFactoryMain.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#include <iostream>
44

55
using namespace std;
6-
using namespace simpleFactory;
6+
using namespace simpleFactory;
77

88
int main() {
99
Operation* operAdd = OperationFactory::createOperation('+');

大話/cpp/singleton/singleton.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#include <string>
22

33
class Person {
4-
54
private:
65
std::string name;
76
Person* child;

0 commit comments

Comments
 (0)