*
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
#ifndef IShaderGraphNodeFactory_h__
|
||||
#define IShaderGraphNodeFactory_h__
|
||||
|
||||
#include "shaders/IShaderGraphNode.h"
|
||||
#include <hash_map>
|
||||
#include <Singleton.h>
|
||||
|
||||
namespace LifeGraphics
|
||||
{
|
||||
class IShaderGraphNodeFactory;
|
||||
class IShaderGraphNodeFactory : public Singleton<IShaderGraphNodeFactory>
|
||||
{
|
||||
public:
|
||||
friend class Singleton<IShaderGraphNodeFactory>;
|
||||
typedef IShaderGraphNode* (*NodeFactoryFunc)();
|
||||
void RegisterNode(const String& name, NodeFactoryFunc func);
|
||||
IShaderGraphNode* Build(const String& name);
|
||||
private:
|
||||
IShaderGraphNodeFactory(){}
|
||||
typedef std::hash_map<String, NodeFactoryFunc> FactoryArray;
|
||||
FactoryArray FactoryFuncs;
|
||||
};
|
||||
}
|
||||
|
||||
#endif // IShaderGraphNodeFactory_h__
|
||||
Reference in New Issue
Block a user