10 #include "GDCore/Project/InitialInstance.h"
11 #include "GDCore/Project/MemoryTrackedRegistry.h"
12 #include "GDCore/String.h"
14 class InitialInstanceFunctor;
20 class SerializerElement;
43 : initialInstances(other.initialInstances) {};
46 initialInstances = other.initialInstances;
91 std::size_t GetInstancesCount()
const;
103 void IterateOverInstances(
137 void RemoveAllInstancesOnLayer(
const gd::String &layerName);
142 void MoveInstancesToLayer(
const gd::String &fromLayer,
148 void RemoveInitialInstancesOfObject(
const gd::String &objectName);
153 void RenameInstancesOfObject(
const gd::String &oldName,
159 std::size_t GetLayerInstancesCount(
const gd::String &layerName)
const;
165 bool SomeInstancesAreOnLayer(
const gd::String &layerName)
const;
170 bool HasInstancesOfObject(
const gd::String &objectName)
const;
176 IsInstancesCountOfObjectGreaterThan(
const gd::String &objectName,
177 const std::size_t minInstanceCount)
const;
204 void RemoveInstanceIf(
207 std::list<gd::InitialInstance> initialInstances;
241 layerRestricted(
false){};
250 layerName = layerName_;
251 layerRestricted =
true;
277 layerRestricted =
false;
284 size_t instancesCount;
287 bool layerRestricted;
Tool class picking returning the highest Z order of instances on a layer.
Definition: InitialInstancesContainer.h:234
void RestrictSearchToLayer(const gd::String &layerName_)
Restrict to instances on the specified layer.
Definition: InitialInstancesContainer.h:249
int GetHighestZOrder() const
After calling the instances container iterate method with this functor, this method will return the h...
Definition: InitialInstancesContainer.h:258
int GetLowestZOrder() const
After calling the instances container iterate method with this functor, this method will return the l...
Definition: InitialInstancesContainer.h:264
size_t GetInstancesCount() const
After calling the instances container iterate method with this functor, this method will return the n...
Definition: InitialInstancesContainer.h:270
Tool class to be used with gd::InitialInstancesContainer::IterateOverInstances.
Definition: InitialInstancesContainer.h:220
Represents an instance of an object to be created on a layout start up.
Definition: InitialInstance.h:29
Defines a container of gd::InitialInstances.
Definition: InitialInstancesContainer.h:39
InitialInstancesContainer * Clone() const
Return a pointer to a copy of the container. A such method is needed as the IDE may want to store cop...
Definition: InitialInstancesContainer.h:62
A non-copyable, non-movable member object that registers/unregisters its owner with MemoryTrackedRegi...
Definition: MemoryTrackedRegistry.h:238
Base class representing a project (game), including all resources, scenes, objects,...
Definition: Project.h:51
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:33
Definition: CommonTools.h:24