@@ -49,10 +49,10 @@ class Prototype {
49
49
* EN: ConcretePrototype1 is a Sub-Class of Prototype and implement the Clone Method
50
50
* In this example all data members of Prototype Class are in the Stack. If you
51
51
* have pointers in your properties for ex: String* name_ ,you will need to
52
- * implement the Copy-Constructor to make sure you have a deep copy from the
52
+ * implement the Copy-Constructor to make sure you have a deep copy from the
53
53
* clone method
54
54
*
55
- * RU:
55
+ * RU:
56
56
*/
57
57
58
58
class ConcretePrototype1 : public Prototype {
@@ -66,10 +66,10 @@ class ConcretePrototype1 : public Prototype {
66
66
67
67
/* *
68
68
* EN: Notice that Clone method return a Pointer to a new ConcretePrototype1 replica. so, the client
69
- * (who call the clone method) has the responsability to free that memory. I you have
69
+ * (who call the clone method) has the responsability to free that memory. If you have
70
70
* smart pointer knowledge you may prefer to use unique_pointer here.
71
71
*
72
- * RU:
72
+ * RU:
73
73
*/
74
74
Prototype *Clone () const override {
75
75
return new ConcretePrototype1 (*this );
@@ -90,11 +90,11 @@ class ConcretePrototype2 : public Prototype {
90
90
};
91
91
92
92
/* *
93
- * EN: In PrototypeFactory you have two concrete prototypes, one for each concrete
94
- * prototype class, so each time you want to create a bullet ,
93
+ * EN: In PrototypeFactory you have two concrete prototypes, one for each concrete
94
+ * prototype class, so each time you want to create a bullet ,
95
95
* you can use the existing ones and clone those.
96
96
*
97
- * RU:
97
+ * RU:
98
98
*/
99
99
100
100
class PrototypeFactory {
@@ -111,7 +111,7 @@ class PrototypeFactory {
111
111
* EN: Be carefull of free all memory allocated. Again, if you have smart pointers knowelege
112
112
* will be better to use it here.
113
113
*
114
- * RU:
114
+ * RU:
115
115
*/
116
116
117
117
~PrototypeFactory () {
@@ -123,7 +123,7 @@ class PrototypeFactory {
123
123
* EN: Notice here that you just need to specify the type of the prototype you want and the method
124
124
* will create from the object with this type.
125
125
*
126
- * RU:
126
+ * RU:
127
127
*/
128
128
Prototype *CreatePrototype (Type type) {
129
129
return prototypes_[type]->Clone ();
0 commit comments