OSDN Git Service
(root)
/
roast
/
roast.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2e9a2fb
)
factory.hpp
author
myun2
<myun2@nwhite.info>
Sun, 8 Jul 2012 13:18:30 +0000
(22:18 +0900)
committer
myun2
<myun2@nwhite.info>
Sun, 8 Jul 2012 13:18:30 +0000
(22:18 +0900)
roast/include/roast/tp/krass/factory.hpp
patch
|
blob
|
history
diff --git
a/roast/include/roast/tp/krass/factory.hpp
b/roast/include/roast/tp/krass/factory.hpp
index
cc924bb
..
a39dd41
100644
(file)
--- a/
roast/include/roast/tp/krass/factory.hpp
+++ b/
roast/include/roast/tp/krass/factory.hpp
@@
-5,6
+5,18
@@
namespace roast
{
+ class factory_base {
+ virtual void* create_instance() = 0;
+ };
+
+ template <typename T>
+ class factory : public factory_base
+ {
+ public:
+ void* create_instance(){
+ return new T;
+ }
+ }
}
#endif//__SFJP_ROAST___tp__krass__factory_HPP__