6 #ifndef GDCORE_OBJECTFOLDEROROBJECT_H
7 #define GDCORE_OBJECTFOLDEROROBJECT_H
11 #include "GDCore/Serialization/SerializerElement.h"
12 #include "GDCore/String.h"
17 class SerializerElement;
18 class ObjectsContainer;
56 bool IsFolder()
const {
return !folderName.empty(); }
84 if (IsFolder())
return children.size();
110 if (parent ==
nullptr) {
111 return badObjectFolderOrObject;
125 void MoveChild(std::size_t oldIndex, std::size_t newIndex);
135 void RemoveRecursivelyObjectNamed(
const gd::String& name);
142 std::size_t position = (
size_t)-1);
148 std::size_t position);
164 void MoveObjectFolderOrObjectToAnotherFolder(
167 std::size_t newPosition);
197 std::vector<std::unique_ptr<ObjectFolderOrObject>>
Class representing a folder structure in order to organize objects in folders (to be used with an Obj...
Definition: ObjectFolderOrObject.h:29
bool IsRootFolder()
Returns true if the instance is a root folder (that's to say it has no parent).
Definition: ObjectFolderOrObject.h:120
const gd::String & GetFolderName() const
Returns the name of the folder.
Definition: ObjectFolderOrObject.h:60
gd::Object & GetObject() const
Returns the object behind the instance.
Definition: ObjectFolderOrObject.h:51
ObjectFolderOrObject & GetParent()
Returns the parent of the instance. If the instance has no parent (root folder), the null object is r...
Definition: ObjectFolderOrObject.h:109
bool IsFolder() const
Returns true if the instance represents a folder.
Definition: ObjectFolderOrObject.h:56
std::size_t GetChildrenCount() const
Returns the number of children. Returns 0 if the instance represents an object.
Definition: ObjectFolderOrObject.h:83
Represent an object of a platform.
Definition: Object.h:37
Used as a base class for classes that will own objects (see gd::Object).
Definition: ObjectsContainer.h:36
Base class representing a project (game), including all resources, scenes, objects,...
Definition: Project.h:50
A generic container that can represent a value ( containing a string, double, bool or int),...
Definition: SerializerElement.h:37
String represents an UTF8 encoded string.
Definition: String.h:31
Definition: CommonTools.h:24