1 #ifndef I_ANIMATION_NODE_CONSTRUCT_H_
2 #define I_ANIMATION_NODE_CONSTRUCT_H_
3 
4 #include "IAnimationNode.h"
5 #include "IAnimationGraph.h"
6 
7 namespace animation
8 {
9 
10 	class IAnimationNodeConstruct
11 	{
12 	public:
~IAnimationNodeConstruct()13 		virtual ~IAnimationNodeConstruct() { }
14 		virtual IAnimationNode* create(const std::string& _name, IAnimationGraph* _holder) = 0;
15 	};
16 
17 	template <typename Type>
18 	class AnimationNodeConstruct :
19 		public IAnimationNodeConstruct
20 	{
21 	public:
create(const std::string & _name,IAnimationGraph * _holder)22 		virtual IAnimationNode* create(const std::string& _name, IAnimationGraph* _holder)
23 		{
24 			return new Type(_name, _holder);
25 		}
26 	};
27 
28 } // namespace animation
29 
30 #endif // I_ANIMATION_NODE_CONSTRUCT_H_
31