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

A list of variables containers, useful for accessing variables in a scoped way. More...

#include <VariablesContainersList.h>

Public Member Functions

bool Has (const gd::String &name) const
 Return true if the specified variable is in one of the containers.
 
const VariableGet (const gd::String &name) const
 Return a reference to the variable called name.
 
bool HasVariablesContainer (const gd::VariablesContainer &variablesContainer) const
 Return true if the specified variable container is present.
 
const VariablesContainerGetTopMostVariablesContainer () const
 Avoid using apart when a scope must be forced. More...
 
const VariablesContainerGetBottomMostVariablesContainer () const
 Avoid using apart when a scope must be forced. More...
 
void ForEachVariableMatchingSearch (const gd::String &search, std::function< void(const gd::String &name, const gd::Variable &variable)> fn) const
 Call the callback for each variable having a name matching the specified search.
 
 VariablesContainersList ()
 

Static Public Member Functions

static VariablesContainersList MakeNewVariablesContainersListForProjectAndLayout (const gd::Project &project, const gd::Layout &layout)
 
static VariablesContainersList MakeNewEmptyVariablesContainersList ()
 

Detailed Description

A list of variables containers, useful for accessing variables in a scoped way.

See also
gd::Variable
gd::Project
gd::Layout

Constructor & Destructor Documentation

◆ VariablesContainersList()

gd::VariablesContainersList::VariablesContainersList ( )
inline

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

Member Function Documentation

◆ GetBottomMostVariablesContainer()

const VariablesContainer* gd::VariablesContainersList::GetBottomMostVariablesContainer ( ) const
inline

Avoid using apart when a scope must be forced.

Get the variables container at the bottom of the scope (so the most "local" one).

◆ GetTopMostVariablesContainer()

const VariablesContainer* gd::VariablesContainersList::GetTopMostVariablesContainer ( ) const
inline

Avoid using apart when a scope must be forced.

Get the variables container at the top of the scope (so the most "global" one).


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