#ifndef __WFX_SCENE_MATERIALMANAGER_H__
#define __WFX_SCENE_MATERIALMANAGER_H__

#include <WFX/WFXIncludes.h>
#include <WFX/lang/Singleton.h>
#include <WFX/scene/Material.h>

namespace WFX {

    namespace scene {


        /**
         * A MaterailManager
         */
        class MaterialManager : public WFX::lang::Singleton<MaterialManager> {
            public:
                /** CTor */
                MaterialManager();
                /** Dtor - deletes all Materials */
                virtual ~MaterialManager();

                /** adds a Material */
                void regMaterial(Material* m);

                /** retrieves a Material */
                Material* getMaterial(const std::string& str);
                
            protected:
                friend class SceneGraphSerializer;
                /** the Materials */
                std::map<std::string, Material*> Materials;

        };

    }
}

#endif //GUARD
