12 #include "GDCore/Project/Behavior.h"
13 #include "GDCore/Project/BehaviorsContainer.h"
14 #include "GDCore/Project/EffectsContainer.h"
15 #include "GDCore/Project/ObjectConfiguration.h"
16 #include "GDCore/Project/VariablesContainer.h"
17 #include "GDCore/Project/MemoryTrackedRegistry.h"
18 #include "GDCore/String.h"
19 #include "GDCore/Tools/MakeUnique.h"
20 #include "GDCore/Vector2.h"
23 class PropertyDescriptor;
26 class ArbitraryResourceWorker;
27 class InitialInstance;
28 class SerializerElement;
29 class EffectsContainer;
46 std::unique_ptr<gd::ObjectConfiguration> configuration);
66 if ((
this) != &
object) Init(
object);
83 virtual std::unique_ptr<gd::Object>
Clone()
const {
84 return gd::make_unique<gd::Object>(*
this);
87 void CopyWithoutConfiguration(
const gd::Object&
object);
112 assetStoreId = assetStoreId_;
138 std::vector<gd::String> GetAllBehaviorNames()
const;
153 bool HasBehaviorNamed(
const gd::String& name)
const;
183 const std::map<gd::String, std::unique_ptr<gd::Behavior>>&
185 return behaviors.GetAllBehaviorContents();
244 Object& ResetPersistentUuid();
259 std::unique_ptr<gd::ObjectConfiguration> configuration;
286 struct ObjectHasName :
public std::binary_function<std::unique_ptr<gd::Object>,
289 bool operator()(
const std::unique_ptr<gd::Object>&
object,
291 return object->GetName() == name;
Base class used to represents a behavior that can be applied to an object. It stores the content (i....
Definition: Behavior.h:24
Represent an behaviors container of a platform.
Definition: BehaviorsContainer.h:38
Contains effects applied to an entity on screen (i.e: a Layer or an Object).
Definition: EffectsContainer.h:30
A non-copyable, non-movable member object that registers/unregisters its owner with MemoryTrackedRegi...
Definition: MemoryTrackedRegistry.h:129
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:39
Object(const gd::Object &object)
Definition: Object.h:60
const gd::String & GetType() const
Return the type of the object.
Definition: Object.h:125
const gd::String & GetAssetStoreId() const
Return the asset store id of the object.
Definition: Object.h:117
gd::EffectsContainer effectsContainer
The effects container for the object.
Definition: Object.h:267
gd::VariablesContainer objectVariables
List of the variables of the object.
Definition: Object.h:265
void SetAssetStoreId(const gd::String &assetStoreId_)
Change the asset store id of the object.
Definition: Object.h:111
const std::map< gd::String, std::unique_ptr< gd::Behavior > > & GetAllBehaviorContents() const
Get a read-only access to the map containing the behaviors with their properties.
Definition: Object.h:184
gd::VariablesContainer & GetVariables()
Provide access to the gd::VariablesContainer member containing the object variables.
Definition: Object.h:203
gd::BehaviorsContainer behaviors
Definition: Object.h:261
gd::String name
The full name of the object.
Definition: Object.h:256
void SetType(const gd::String &type_)
Change the type of the object.
Definition: Object.h:121
gd::String persistentUuid
Definition: Object.h:268
virtual std::unique_ptr< gd::Object > Clone() const
Definition: Object.h:83
gd::EffectsContainer & GetEffects()
Provide access to the gd::EffectsContainer member containing the effects.
Definition: Object.h:221
gd::String assetStoreId
Definition: Object.h:257
void SetName(const gd::String &name_)
Change the name of the object with the name passed as parameter.
Definition: Object.h:103
Object & operator=(const gd::Object &object)
Definition: Object.h:65
const gd::String & GetName() const
Return the name of the object.
Definition: Object.h:107
const gd::VariablesContainer & GetVariables() const
Provide access to the gd::VariablesContainer member containing the object variables.
Definition: Object.h:197
const gd::EffectsContainer & GetEffects() const
Provide access to the gd::EffectsContainer member containing the effects.
Definition: Object.h:215
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
Class defining a container for gd::Variable.
Definition: VariablesContainer.h:29
Definition: CommonTools.h:24
Functor testing object name.
Definition: Object.h:288