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/String.h"
18 #include "GDCore/Tools/MakeUnique.h"
19 #include "GDCore/Vector2.h"
22 class PropertyDescriptor;
25 class ArbitraryResourceWorker;
26 class InitialInstance;
27 class SerializerElement;
28 class EffectsContainer;
45 std::unique_ptr<gd::ObjectConfiguration> configuration);
65 if ((
this) != &
object) Init(
object);
82 virtual std::unique_ptr<gd::Object>
Clone()
const {
83 return gd::make_unique<gd::Object>(*
this);
86 void CopyWithoutConfiguration(
const gd::Object&
object);
111 assetStoreId = assetStoreId_;
137 std::vector<gd::String> GetAllBehaviorNames()
const;
152 bool HasBehaviorNamed(
const gd::String& name)
const;
182 const std::map<gd::String, std::unique_ptr<gd::Behavior>>&
184 return behaviors.GetAllBehaviorContents();
243 Object& ResetPersistentUuid();
249 Object& ClearPersistentUuid();
256 std::unique_ptr<gd::ObjectConfiguration> configuration;
283 struct ObjectHasName :
public std::binary_function<std::unique_ptr<gd::Object>,
286 bool operator()(
const std::unique_ptr<gd::Object>&
object,
288 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:23
Represent an behaviors container of a platform.
Definition: BehaviorsContainer.h:37
Contains effects applied to an entity on screen (i.e: a Layer or an Object).
Definition: EffectsContainer.h:29
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:38
Object(const gd::Object &object)
Definition: Object.h:59
const gd::String & GetType() const
Return the type of the object.
Definition: Object.h:124
const gd::String & GetAssetStoreId() const
Return the asset store id of the object.
Definition: Object.h:116
gd::EffectsContainer effectsContainer
The effects container for the object.
Definition: Object.h:264
gd::VariablesContainer objectVariables
List of the variables of the object.
Definition: Object.h:262
void SetAssetStoreId(const gd::String &assetStoreId_)
Change the asset store id of the object.
Definition: Object.h:110
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:183
gd::VariablesContainer & GetVariables()
Provide access to the gd::VariablesContainer member containing the object variables.
Definition: Object.h:202
gd::BehaviorsContainer behaviors
Definition: Object.h:258
gd::String name
The full name of the object.
Definition: Object.h:253
void SetType(const gd::String &type_)
Change the type of the object.
Definition: Object.h:120
gd::String persistentUuid
Definition: Object.h:265
virtual std::unique_ptr< gd::Object > Clone() const
Definition: Object.h:82
gd::EffectsContainer & GetEffects()
Provide access to the gd::EffectsContainer member containing the effects.
Definition: Object.h:220
gd::String assetStoreId
Definition: Object.h:254
void SetName(const gd::String &name_)
Change the name of the object with the name passed as parameter.
Definition: Object.h:102
Object & operator=(const gd::Object &object)
Definition: Object.h:64
const gd::String & GetName() const
Return the name of the object.
Definition: Object.h:106
const gd::VariablesContainer & GetVariables() const
Provide access to the gd::VariablesContainer member containing the object variables.
Definition: Object.h:196
const gd::EffectsContainer & GetEffects() const
Provide access to the gd::EffectsContainer member containing the effects.
Definition: Object.h:214
Base class representing a project (game), including all resources, scenes, objects,...
Definition: Project.h:50
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:28
Definition: CommonTools.h:24
Functor testing object name.
Definition: Object.h:285