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

Class containing functions to do refactoring tasks on events. More...

#include <EventsRefactorer.h>

Static Public Member Functions

static void RenameObjectInEvents (const gd::Platform &platform, const gd::ProjectScopedContainers &projectScopedContainers, gd::EventsList &events, const gd::ObjectsContainer &targetedObjectsContainer, gd::String oldName, gd::String newName)
 
static std::vector< EventsSearchResultSearchInEvents (const gd::Platform &platform, gd::EventsList &events, gd::String search, bool matchCase, bool inConditions, bool inActions, bool inEventStrings, bool inEventSentences)
 
static std::vector< EventsSearchResultReplaceStringInEvents (gd::ObjectsContainer &project, gd::ObjectsContainer &layout, gd::EventsList &events, gd::String toReplace, gd::String newString, bool matchCase, bool inConditions, bool inActions, bool inEventString)
 

Detailed Description

Class containing functions to do refactoring tasks on events.

Class containing functions to do refactoring tasks on events like changing an object name, deleting an object...

Todo:
Refactor this class using ArbitraryEventsWorker!

Member Function Documentation

◆ RenameObjectInEvents()

void gd::EventsRefactorer::RenameObjectInEvents ( const gd::Platform platform,
const gd::ProjectScopedContainers projectScopedContainers,
gd::EventsList events,
const gd::ObjectsContainer targetedObjectsContainer,
gd::String  oldName,
gd::String  newName 
)
static

Replace all occurrences of an object name by another name ( include : objects in parameters and in math/text expressions of all events ).

◆ ReplaceStringInEvents()

std::vector< EventsSearchResult > gd::EventsRefactorer::ReplaceStringInEvents ( gd::ObjectsContainer project,
gd::ObjectsContainer layout,
gd::EventsList events,
gd::String  toReplace,
gd::String  newString,
bool  matchCase,
bool  inConditions,
bool  inActions,
bool  inEventString 
)
static

Replace all occurrences of a gd::String in events

Returns
A vector of all modified events.

◆ SearchInEvents()

vector< EventsSearchResult > gd::EventsRefactorer::SearchInEvents ( const gd::Platform platform,
gd::EventsList events,
gd::String  search,
bool  matchCase,
bool  inConditions,
bool  inActions,
bool  inEventStrings,
bool  inEventSentences 
)
static

Search for a gd::String in events

Returns
A vector containing EventsSearchResult objects filled with events containing the string

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