添加c++版本的prototype
parent
5aedbe969a
commit
929c964164
|
@ -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" />
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue