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(
116 bool searchInGroups =
true)
const;
124 bool searchInGroups =
true)
const;
134 const gd::String& objectName,
bool searchInGroups =
true)
const;
143 std::vector<gd::String>
146 bool searchInGroups =
true)
const;
155 std::vector<gd::String>
156 GetAnimationNamesOfObject(
const gd::String &objectOrGroupName)
const;
167 std::vector<gd::String> ExpandObjectName(
169 const gd::String& onlyObjectToSelectIfPresent =
"")
const;
171 void ForEachObject(std::function<
void(
const gd::Object&
object)> fn)
const;
177 void ForEachNameMatchingSearch(
187 void ForEachObjectOrGroupVariableMatchingSearch(
190 std::function<
void(
const gd::String& variableName,
197 const gd::ObjectsContainer::SourceType GetObjectsContainerSourceType(
204 GetObjectsContainerFromObjectName(
const gd::String &objectOrGroupName)
const;
221 std::size_t GetObjectsContainersCount()
const;
230 bool HasObjectWithVariableNamed(
const gd::String& objectName,
233 bool HasObjectVariablesContainer(
242 void ForEachObjectVariableMatchingSearch(
245 std::function<
void(
const gd::String& variableName,
249 objectsContainers.push_back(&objectsContainer);
252 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:225
Base class representing a project (game), including all resources, scenes, objects,...
Definition: Project.h:51
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