diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 4129c36..9dc000d 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -20,8 +20,7 @@
-
-
+
@@ -86,21 +85,24 @@
-
-
+
+
+
+
+
-
-
-
-
-
-
-
-
-
@@ -174,12 +176,13 @@
-
diff --git a/general/src/pattern/factory.hpp b/general/src/pattern/factory.hpp
index aeb07c4..8a6ce5c 100644
--- a/general/src/pattern/factory.hpp
+++ b/general/src/pattern/factory.hpp
@@ -13,18 +13,24 @@ public:
return nullptr;
}
};
+template
+class CloneAble{
+public:
+ virtual T* Clone(){
+ }
+}
template
class Prototype{
public:
- Prototype(T ){
+ Prototype(CloneAble *){
}
virtual T*GetProduct(){
-
+ return mProto->Clone();
}
private:
- T *mProto;
+ CloneAble *mProto;
Prototype(){}
};
#endif //GENERAL_FACTORY_HPP