GDevelop Core
Core library for developing platforms and tools compatible with GDevelop.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Public Member Functions | List of all members
DependenciesAnalyzer Class Reference

Compute the dependencies of a scene or external events. More...

#include <DependenciesAnalyzer.h>

Public Member Functions

 DependenciesAnalyzer (gd::Project &project_, gd::Layout &layout_)
 Constructor for analyzing the dependencies of a layout.
 
 DependenciesAnalyzer (gd::Project &project_, gd::ExternalEvents &externalEvents)
 Constructor for analyzing the dependencies of external events. More...
 
bool Analyze ()
 Search the dependencies and return true if there are no circular dependencies in the events of the layout or external events passed in the constructor. More...
 
gd::String ExternalEventsCanBeCompiledForAScene ()
 
const std::set< gd::String > & GetScenesDependencies () const
 Return the scenes being dependencies of the scene or external events passed in the constructor.
 
const std::set< gd::String > & GetExternalEventsDependencies () const
 Return the external events being dependencies of the scene or external events passed in the constructor.
 
const std::set< gd::String > & GetSourceFilesDependencies () const
 Return the source files being dependencies of the scene or external events passed in the constructor.
 
const std::set< gd::String > & GetNotTopLevelScenesDependencies () const
 Return the scenes being dependencies of the scene or external events passed in the constructor, but being not top level dependencies: The links including them are not a top level events (i.e: They have a parent event).
 
const std::set< gd::String > & GetNotTopLevelExternalEventsDependencies () const
 Return the external events being dependencies of the scene or external events passed in the constructor, but being not top level dependencies: The links including them are not a top level events (i.e: They have a parent event).
 

Detailed Description

Compute the dependencies of a scene or external events.

Constructor & Destructor Documentation

DependenciesAnalyzer::DependenciesAnalyzer ( gd::Project project_,
gd::ExternalEvents externalEvents 
)

Constructor for analyzing the dependencies of external events.

You can also call then DependenciesAnalyzer::ExternalEventsCanBeCompiledForAScene to check if the external events can be compiled separatly and called by a scene.

See also
DependenciesAnalyzer::ExternalEventsCanBeCompiledForAScene

Member Function Documentation

bool DependenciesAnalyzer::Analyze ( )

Search the dependencies and return true if there are no circular dependencies in the events of the layout or external events passed in the constructor.

Returns
true if there are no circular dependencies, false otherwise (in this case, no events code generation must done).
gd::String DependenciesAnalyzer::ExternalEventsCanBeCompiledForAScene ( )

Check if the external events (passed in the constructor) can be compiled and called by a single scene:
This is possible when the link calling the external events does not have any parent event and when this situation occurs only in a single scene and not in another.

Returns
The name of the scene which is able to call the compiled external events. If empty, no scene is able to call them. (So external events have to be included directly by links).

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