mirror of
https://github.com/Heretek-AI/GDevelop.git
synced 2026-07-25 20:35:52 -04:00
8844642ae0
Added doxygen files. Cleaned some files.
55 lines
1.3 KiB
C++
55 lines
1.3 KiB
C++
/*
|
|
* Game Develop Core
|
|
* Copyright 2008-2014 Florian Rival (Florian.Rival@gmail.com). All rights reserved.
|
|
* This project is released under the GNU Lesser General Public License.
|
|
*/
|
|
#include "PlatformManager.h"
|
|
#include "GDCore/PlatformDefinition/Platform.h"
|
|
|
|
namespace gd
|
|
{
|
|
|
|
PlatformManager *PlatformManager::_singleton = NULL;
|
|
|
|
PlatformManager::PlatformManager()
|
|
{
|
|
}
|
|
|
|
PlatformManager::~PlatformManager()
|
|
{
|
|
}
|
|
|
|
bool PlatformManager::AddPlatform(boost::shared_ptr<gd::Platform> newPlatform)
|
|
{
|
|
for (unsigned int i = 0;i<platformsLoaded.size();++i)
|
|
{
|
|
if ( platformsLoaded[i]->GetName() == newPlatform->GetName() )
|
|
return false;
|
|
}
|
|
|
|
platformsLoaded.push_back(newPlatform);
|
|
return true;
|
|
}
|
|
|
|
gd::Platform* PlatformManager::GetPlatform(const std::string & platformName) const
|
|
{
|
|
for (unsigned int i = 0;i<platformsLoaded.size();++i)
|
|
{
|
|
if ( platformsLoaded[i]->GetName() == platformName )
|
|
return platformsLoaded[i].get();
|
|
}
|
|
|
|
return NULL;
|
|
}
|
|
|
|
void PlatformManager::NotifyPlatformIDEInitialized() const
|
|
{
|
|
for (unsigned int i = 0;i<platformsLoaded.size();++i)
|
|
{
|
|
if ( platformsLoaded[i] != boost::shared_ptr<gd::Platform>() )
|
|
platformsLoaded[i]->OnIDEInitialized();
|
|
}
|
|
}
|
|
|
|
}
|