Files
GDevelop/Extensions/PlatformBehavior/ScenePlatformObjectsManager.h
T
Florian Rival a8559bfbbc Add clang-format to format (C++) source files automatically (#491)
* Update all CMakeLists of extensions to use clang-format
* Run clang-format on all Extensions
* Update GDCore CMakeLists.txt to add clang-format
* Run clang-format on GDCore files
* Update GDJS and GDCpp CMakeLists.txt to add clang-format
* Run clang-format on GDCpp and GDJS files
2018-05-09 15:57:38 -07:00

51 lines
1.3 KiB
C++

/**
GDevelop - Platform Behavior Extension
Copyright (c) 2013-2016 Florian Rival (Florian.Rival@gmail.com)
This project is released under the MIT License.
*/
#ifndef SCENEPLATFORMOBJECTSMANAGER_H
#define SCENEPLATFORMOBJECTSMANAGER_H
#include <map>
#include <set>
#include "GDCpp/Runtime/RuntimeScene.h"
class PlatformBehavior;
/**
* \brief Contains lists of all platform related objects of a scene.
*/
class ScenePlatformObjectsManager {
public:
/**
* \brief Map containing, for each RuntimeScene, its associated
* ScenePlatformObjectsManager.
*/
static std::map<RuntimeScene*, ScenePlatformObjectsManager> managers;
ScenePlatformObjectsManager(){};
virtual ~ScenePlatformObjectsManager();
/**
* \brief Notify the manager that there is a new platform on the scene.
* \param platform The new platform
*/
void AddPlatform(PlatformBehavior* platform);
/**
* \brief Notify the manager that a platform was removed from the scene.
* \param platform The removed platform
*/
void RemovePlatform(PlatformBehavior* platform);
/**
* \brief Get a read only access to the list of all platforms
*/
const std::set<PlatformBehavior*>& GetAllPlatforms() { return allPlatforms; }
private:
std::set<PlatformBehavior*>
allPlatforms; ///< The list of all platforms of the scene.
};
#endif