ECS/Project/Project/Resources/ResourceManager/MaterialResourceManager/MaterialResourceManager.cpp
//	Add a Material to the Material Resource Manager, specified by name.
Add a Material to the Material Resource Manager, specified by name.
Add a Material to the Material Resource Manager specified by name .
void MaterialResourceManager::addMaterial(std::string newMaterialName, std::shared_ptr<MaterialData> newMaterialData)
{
	auto materialIterator = mapNameToMaterialData.find(newMaterialName);
	if (materialIterator != mapNameToMaterialData.end())
	{
	}
	else
	{
		mapNameToMaterialData.insert(std::make_pair(newMaterialName, newMaterialData));
		std::shared_ptr<ResourceEvent> newEvent = std::make_shared<ResourceEvent>(ResourceType::MATERIAL_RESOURCE, ResourceEventType::RESOURCE_ADDED, ModuleType::MATERIAL_MANAGER, newMaterialName, std::dynamic_pointer_cast<const ResourceData>(newMaterialData));
		getDispatcher()->dispatchToEventQueue(newEvent);
	}
}
void MaterialResourceManager :: addMaterial ( std :: string newMaterialName , std :: shared_ptr < MaterialData > newMaterialData ) { auto materialIterator = mapNameToMaterialData . find ( newMaterialName ) ; if ( materialIterator != mapNameToMaterialData . end ( ) ) { } else { mapNameToMaterialData . insert ( std :: make_pair ( newMaterialName , newMaterialData ) ) ; std :: shared_ptr < ResourceEvent > newEvent = std :: make_shared < ResourceEvent > ( ResourceType :: MATERIAL_RESOURCE , ResourceEventType :: RESOURCE_ADDED , ModuleType :: MATERIAL_MANAGER , newMaterialName , std :: dynamic_pointer_cast < const ResourceData > ( newMaterialData ) ) ; getDispatcher ( ) -> dispatchToEventQueue ( newEvent ) ; } }
Add a Material to the Material Resource Manager, specified by name.
Add a Material to the Material Resource Manager specified by name .
//	Find the Material. //	TO DO //	Throw Material already present error. //	Insert the MaterialData, under the appropriate name.