添加c++版本的prototype

master
caiyuzheng 2020-05-18 19:51:28 +08:00
parent 5aedbe969a
commit 929c964164
2 changed files with 15 additions and 0 deletions

View File

@ -31,6 +31,7 @@
</component>
<component name="ChangeListManager">
<list default="true" id="0facce0d-c642-4d80-b2fb-daf5f3e68dff" name="Default Changelist" comment="">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/general/src/pattern/factory.hpp" beforeDir="false" afterPath="$PROJECT_DIR$/general/src/pattern/factory.hpp" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />

View File

@ -13,4 +13,18 @@ public:
return nullptr;
}
};
template<typename T>
class Prototype{
public:
Prototype(T ){
}
virtual T*GetProduct(){
}
private:
T *mProto;
Prototype(){}
};
#endif //GENERAL_FACTORY_HPP