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;
162 bool searchInGroups =
true)
const;
171 std::vector<gd::String>
172 GetAnimationNamesOfObject(
const gd::String &objectOrGroupName)
const;
183 std::vector<gd::String> ExpandObjectName(
185 const gd::String& onlyObjectToSelectIfPresent =
"")
const;
187 void ForEachObject(std::function<
void(
const gd::Object&
object)> fn)
const;
193 void ForEachNameMatchingSearch(
203 void ForEachObjectOrGroupVariableMatchingSearch(
206 std::function<
void(
const gd::String& variableName,
213 const gd::ObjectsContainer::SourceType GetObjectsContainerSourceType(
220 GetObjectsContainerFromObjectName(
const gd::String &objectOrGroupName)
const;
237 std::size_t GetObjectsContainersCount()
const;
246 bool HasObjectWithVariableNamed(
const gd::String& objectName,
249 bool HasObjectVariablesContainer(
258 void ForEachObjectVariableMatchingSearch(
261 std::function<
void(
const gd::String& variableName,
265 objectsContainers.push_back(&objectsContainer);
268 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:241
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:434
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:522
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:689
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:744
bool GD_CORE_API IsDefaultBehavior(const gd::ObjectsContainer &project, const gd::ObjectsContainer &layout, gd::String objectOrGroupName, gd::String behaviorName, bool searchInGroups)
Check if a behavior is a default one or doesn't exist in an object or all objects of a group.
Definition: Layout.cpp:638
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:766
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:591