11 #include "GDCore/Serialization/SerializerElement.h"
12 #include "GDCore/String.h"
13 #include "GDCore/Project/QuickCustomization.h"
14 #include "GDCore/Project/MemoryTrackedRegistry.h"
19 class SerializerElement;
20 class ObjectsContainer;
58 bool IsFolder()
const {
return !folderName.empty(); }
86 if (IsFolder())
return children.size();
112 if (parent ==
nullptr) {
113 return badObjectFolderOrObject;
127 void MoveChild(std::size_t oldIndex, std::size_t newIndex);
137 void RemoveRecursivelyObjectNamed(
const gd::String& name);
148 std::size_t position = (
size_t)-1);
154 std::size_t position);
177 void MoveObjectFolderOrObjectToAnotherFolder(
180 std::size_t newPosition);
184 quickCustomizationVisibility = visibility;
194 void SerializeTo(SerializerElement& element)
const;
200 const SerializerElement& element,
201 ObjectsContainer& objectsContainer);
216 std::vector<std::unique_ptr<ObjectFolderOrObject>>
A non-copyable, non-movable member object that registers/unregisters its owner with MemoryTrackedRegi...
Definition: MemoryTrackedRegistry.h:238
Class representing a folder structure in order to organize objects in folders (to be used with an Obj...
Definition: ObjectFolderOrObject.h:31
bool IsRootFolder()
Returns true if the instance is a root folder (that's to say it has no parent).
Definition: ObjectFolderOrObject.h:122
const gd::String & GetFolderName() const
Returns the name of the folder.
Definition: ObjectFolderOrObject.h:62
gd::Object & GetObject() const
Returns the object behind the instance.
Definition: ObjectFolderOrObject.h:53
ObjectFolderOrObject & GetParent()
Returns the parent of the instance. If the instance has no parent (root folder), the null object is r...
Definition: ObjectFolderOrObject.h:111
bool IsFolder() const
Returns true if the instance represents a folder.
Definition: ObjectFolderOrObject.h:58
std::size_t GetChildrenCount() const
Returns the number of children. Returns 0 if the instance represents an object.
Definition: ObjectFolderOrObject.h:85
Represent an object of a platform.
Definition: Object.h:39
Base class representing a project (game), including all resources, scenes, objects,...
Definition: Project.h:51
Visibility
Definition: QuickCustomization.h:8
String represents an UTF8 encoded string.
Definition: String.h:33
Definition: CommonTools.h:24