GDevelop Core
Core library for developing platforms and tools compatible with GDevelop.
Public Member Functions | Static Public Member Functions | List of all members
gd::ProjectScopedContainers Class Reference

Holds references to variables, objects, properties and other containers. More...

#include <ProjectScopedContainers.h>

Public Member Functions

 ProjectScopedContainers (const gd::ObjectsContainersList &objectsContainersList_, const gd::VariablesContainersList &variablesContainersList_, const gd::VariablesContainer *legacyGlobalVariables_, const gd::VariablesContainer *legacySceneVariables_, const gd::PropertiesContainersList &propertiesContainersList_)
 
ProjectScopedContainersAddPropertiesContainer (const gd::PropertiesContainer &container)
 
ProjectScopedContainersAddParameters (const ParameterMetadataContainer &parameters)
 
template<class ReturnType >
ReturnType MatchIdentifierWithName (const gd::String &name, std::function< ReturnType()> objectCallback, std::function< ReturnType()> variableCallback, std::function< ReturnType()> propertyCallback, std::function< ReturnType()> parameterCallback, std::function< ReturnType()> notFoundCallback) const
 
void ForEachIdentifierMatchingSearch (const gd::String &search, std::function< void(const gd::String &name, const ObjectConfiguration *objectConfiguration)> objectCallback, std::function< void(const gd::String &name, const gd::Variable &variable)> variableCallback, std::function< void(const gd::NamedPropertyDescriptor &property)> propertyCallback, std::function< void(const gd::ParameterMetadata &parameter)> parameterCallback) const
 
const gd::ObjectsContainersListGetObjectsContainersList () const
 
const gd::VariablesContainersListGetVariablesContainersList () const
 
gd::VariablesContainersListGetVariablesContainersList ()
 Allow modification of the variables containers list. This is used by code generation which does push and pop of local variable containers.
 
const gd::VariablesContainerGetLegacyGlobalVariables () const
 Return the global variables of the current scene or the current extension. It allows legacy "globalvar" parameters to accept extension variables.
 
const gd::VariablesContainerGetLegacySceneVariables () const
 Return the scene variables of the current scene or the current extension. It allows legacy "scenevar" parameters to accept extension variables.
 
const gd::PropertiesContainersListGetPropertiesContainersList () const
 
const std::vector< const ParameterMetadataContainer * > & GetParametersVectorsList () const
 
 ProjectScopedContainers ()
 

Static Public Member Functions

static ProjectScopedContainers MakeNewProjectScopedContainersForProjectAndLayout (const gd::Project &project, const gd::Layout &layout)
 
static ProjectScopedContainers MakeNewProjectScopedContainersForProject (const gd::Project &project)
 
static ProjectScopedContainers MakeNewProjectScopedContainersFor (const gd::ObjectsContainer &globalObjectsContainers, const gd::ObjectsContainer &objectsContainers)
 
static ProjectScopedContainers MakeNewProjectScopedContainersForEventsFunctionsExtension (const gd::Project &project, const gd::EventsFunctionsExtension &eventsFunctionsExtension)
 
static ProjectScopedContainers MakeNewProjectScopedContainersForFreeEventsFunction (const gd::Project &project, const gd::EventsFunctionsExtension &eventsFunctionsExtension, const gd::EventsFunction &eventsFunction, gd::ObjectsContainer &parameterObjectsContainer)
 
static ProjectScopedContainers MakeNewProjectScopedContainersForBehaviorEventsFunction (const gd::Project &project, const gd::EventsFunctionsExtension &eventsFunctionsExtension, const gd::EventsBasedBehavior &eventsBasedBehavior, const gd::EventsFunction &eventsFunction, gd::ObjectsContainer &parameterObjectsContainer)
 
static ProjectScopedContainers MakeNewProjectScopedContainersForObjectEventsFunction (const gd::Project &project, const gd::EventsFunctionsExtension &eventsFunctionsExtension, const gd::EventsBasedObject &eventsBasedObject, const gd::EventsFunction &eventsFunction, gd::ObjectsContainer &parameterObjectsContainer)
 
static ProjectScopedContainers MakeNewProjectScopedContainersForEventsBasedObject (const gd::Project &project, const gd::EventsFunctionsExtension &eventsFunctionsExtension, const gd::EventsBasedObject &eventsBasedObject, gd::ObjectsContainer &outputObjectsContainer)
 
static ProjectScopedContainers MakeNewProjectScopedContainersWithLocalVariables (const ProjectScopedContainers &projectScopedContainers, const gd::BaseEvent &event)
 

Detailed Description

Holds references to variables, objects, properties and other containers.

This is useful to access elements of a project from a specific location, honoring the scope of each element.

For example, in an expression, when an identifier is written, this class is used to know what this identifier refers too.

Constructor & Destructor Documentation

◆ ProjectScopedContainers()

gd::ProjectScopedContainers::ProjectScopedContainers ( )
inline

Do not use - should be private but accessible to let Emscripten create a temporary.

Member Function Documentation

◆ MakeNewProjectScopedContainersFor()

ProjectScopedContainers gd::ProjectScopedContainers::MakeNewProjectScopedContainersFor ( const gd::ObjectsContainer globalObjectsContainers,
const gd::ObjectsContainer objectsContainers 
)
static
Deprecated:
Use another method for an explicit context instead.

The documentation for this class was generated from the following files: