mirror of
https://github.com/4ian/GDevelop.git
synced 2025-10-15 10:19:04 +00:00
Compare commits
1 Commits
v5.4.218
...
generated-
Author | SHA1 | Date | |
---|---|---|---|
![]() |
3a113ea419 |
@@ -1256,6 +1256,11 @@ size_t EventsCodeGenerator::GenerateSingleUsageUniqueIdFor(
|
|||||||
|
|
||||||
gd::String EventsCodeGenerator::GetObjectListName(
|
gd::String EventsCodeGenerator::GetObjectListName(
|
||||||
const gd::String& name, const gd::EventsCodeGenerationContext& context) {
|
const gd::String& name, const gd::EventsCodeGenerationContext& context) {
|
||||||
|
return GetObjectListNameWithoutNamespace(name, context);
|
||||||
|
}
|
||||||
|
|
||||||
|
gd::String EventsCodeGenerator::GetObjectListNameWithoutNamespace(
|
||||||
|
const gd::String& name, const gd::EventsCodeGenerationContext& context) {
|
||||||
return ManObjListName(name);
|
return ManObjListName(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -435,6 +435,15 @@ class GD_CORE_API EventsCodeGenerator {
|
|||||||
*/
|
*/
|
||||||
virtual gd::String GetObjectListName(
|
virtual gd::String GetObjectListName(
|
||||||
const gd::String& name, const gd::EventsCodeGenerationContext& context);
|
const gd::String& name, const gd::EventsCodeGenerationContext& context);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief Get the list of objects full name without the namespace.
|
||||||
|
*
|
||||||
|
* Default implementation simply returns the name mangled using
|
||||||
|
* gd::EventsCodeNameMangler.
|
||||||
|
*/
|
||||||
|
virtual gd::String GetObjectListNameWithoutNamespace(
|
||||||
|
const gd::String& name, const gd::EventsCodeGenerationContext& context);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Generate the code to notify the profiler of the beginning of a
|
* \brief Generate the code to notify the profiler of the beginning of a
|
||||||
|
@@ -945,7 +945,13 @@ gd::String EventsCodeGenerator::GenerateBehaviorAction(
|
|||||||
|
|
||||||
gd::String EventsCodeGenerator::GetObjectListName(
|
gd::String EventsCodeGenerator::GetObjectListName(
|
||||||
const gd::String& name, const gd::EventsCodeGenerationContext& context) {
|
const gd::String& name, const gd::EventsCodeGenerationContext& context) {
|
||||||
return GetCodeNamespaceAccessor() + ManObjListName(name) +
|
return GetCodeNamespaceAccessor() +
|
||||||
|
GetObjectListNameWithoutNamespace(name, context);
|
||||||
|
}
|
||||||
|
|
||||||
|
gd::String EventsCodeGenerator::GetObjectListNameWithoutNamespace(
|
||||||
|
const gd::String& name, const gd::EventsCodeGenerationContext& context) {
|
||||||
|
return ManObjListName(name) +
|
||||||
gd::String::From(context.GetLastDepthObjectListWasNeeded(name));
|
gd::String::From(context.GetLastDepthObjectListWasNeeded(name));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1159,8 +1165,8 @@ gd::String EventsCodeGenerator::GenerateObject(
|
|||||||
|
|
||||||
// Map each declared object to its list.
|
// Map each declared object to its list.
|
||||||
for (auto& objectName : declaredObjectNames) {
|
for (auto& objectName : declaredObjectNames) {
|
||||||
objectsMapName +=
|
objectsMapName += ManObjListName(
|
||||||
ManObjListName(GetObjectListName(objectName, context));
|
GetObjectListNameWithoutNamespace(objectName, context));
|
||||||
|
|
||||||
if (!mapDeclaration.empty()) mapDeclaration += ", ";
|
if (!mapDeclaration.empty()) mapDeclaration += ", ";
|
||||||
mapDeclaration += "\"" + ConvertToString(objectName) +
|
mapDeclaration += "\"" + ConvertToString(objectName) +
|
||||||
|
@@ -190,6 +190,12 @@ class EventsCodeGenerator : public gd::EventsCodeGenerator {
|
|||||||
*/
|
*/
|
||||||
virtual gd::String GetObjectListName(
|
virtual gd::String GetObjectListName(
|
||||||
const gd::String& name, const gd::EventsCodeGenerationContext& context);
|
const gd::String& name, const gd::EventsCodeGenerationContext& context);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief Get the list of objects full name without the namespace.
|
||||||
|
*/
|
||||||
|
virtual gd::String GetObjectListNameWithoutNamespace(
|
||||||
|
const gd::String& name, const gd::EventsCodeGenerationContext& context);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Get the namespace to be used to store code generated
|
* \brief Get the namespace to be used to store code generated
|
||||||
|
Reference in New Issue
Block a user