5 #include "GDCore/Project/ObjectsContainer.h"
11 class VariablesContainer;
13 class ObjectConfiguration;
51 bool HasObjectOrGroupNamed(
const gd::String& name)
const;
56 bool HasObjectNamed(
const gd::String& name)
const;
58 enum VariableExistence {
62 ExistsOnlyOnSomeObjectsOfTheGroup
69 VariableExistence HasObjectOrGroupWithVariableNamed(
77 bool HasObjectOrGroupVariablesContainer(
121 bool searchInGroups =
true)
const;
129 bool searchInGroups =
true)
const;
139 const gd::String& objectName,
bool searchInGroups =
true)
const;
148 std::vector<gd::String>
151 bool searchInGroups =
true)
const;
160 std::vector<gd::String>
161 GetAnimationNamesOfObject(
const gd::String &objectOrGroupName)
const;
172 std::vector<gd::String> ExpandObjectName(
174 const gd::String& onlyObjectToSelectIfPresent =
"")
const;
176 void ForEachObject(std::function<
void(
const gd::Object&
object)> fn)
const;
182 void ForEachNameMatchingSearch(
192 void ForEachObjectOrGroupVariableMatchingSearch(
195 std::function<
void(
const gd::String& variableName,
202 const gd::ObjectsContainer::SourceType GetObjectsContainerSourceType(
209 GetObjectsContainerFromObjectName(
const gd::String &objectOrGroupName)
const;
226 std::size_t GetObjectsContainersCount()
const;
235 bool HasObjectWithVariableNamed(
const gd::String& objectName,
238 bool HasObjectVariablesContainer(
247 void ForEachObjectVariableMatchingSearch(
250 std::function<
void(
const gd::String& variableName,
254 objectsContainers.push_back(&objectsContainer);
257 std::vector<const gd::ObjectsContainer*> objectsContainers;
Represent a layout ( also called a scene ) of a project.
Definition: Layout.h:40
Base class used to represent an object configuration. For example, this can be the animations in a sp...
Definition: ObjectConfiguration.h:38
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:37
A list of objects containers, useful for accessing objects in a scoped way, along with methods to acc...
Definition: ObjectsContainersList.h:29
ObjectsContainersList()
Definition: ObjectsContainersList.h:230
Base class representing a project (game), including all resources, scenes, objects,...
Definition: Project.h:50
String represents an UTF8 encoded string.
Definition: String.h:33
Defines a variable which can be used by an object, a layout or a project.
Definition: Variable.h:29
Type
Definition: Variable.h:32
Class defining a container for gd::Variable.
Definition: VariablesContainer.h:28
Definition: CommonTools.h:24
gd::String GD_CORE_API GetTypeOfObject(const gd::ObjectsContainer &project, const gd::ObjectsContainer &layout, gd::String name, bool searchInGroups)
Get a type from an object/group name.
Definition: Layout.cpp:422
std::vector< gd::String > GD_CORE_API GetBehaviorNamesInObjectOrGroup(const gd::ObjectsContainer &project, const gd::ObjectsContainer &layout, const gd::String &objectOrGroupName, const gd::String &behaviorType, bool searchInGroups)
Get the names of behavior of a given type if an object or all objects of a group has it.
Definition: Layout.cpp:510
gd::String GD_CORE_API GetTypeOfBehaviorInObjectOrGroup(const gd::ObjectsContainer &project, const gd::ObjectsContainer &layout, const gd::String &objectOrGroupName, const gd::String &behaviorName, bool searchInGroups)
Get the type of a behavior if an object or all objects of a group has it.
Definition: Layout.cpp:677
gd::String GD_CORE_API GetTypeOfBehavior(const gd::ObjectsContainer &project, const gd::ObjectsContainer &layout, gd::String name, bool searchInGroups)
Get a type from a behavior name.
Definition: Layout.cpp:732
vector< gd::String > GD_CORE_API GetBehaviorsOfObject(const gd::ObjectsContainer &project, const gd::ObjectsContainer &layout, const gd::String &name, bool searchInGroups)
Get behaviors of an object/group.
Definition: Layout.cpp:754
bool GD_CORE_API HasBehaviorInObjectOrGroup(const gd::ObjectsContainer &project, const gd::ObjectsContainer &layout, const gd::String &objectOrGroupName, const gd::String &behaviorName, bool searchInGroups)
Check if an object or all objects of a group has a behavior.
Definition: Layout.cpp:579