12 #include "GDCore/Project/Behavior.h"
13 #include "GDCore/Project/EffectsContainer.h"
14 #include "GDCore/Project/ObjectConfiguration.h"
15 #include "GDCore/Project/VariablesContainer.h"
16 #include "GDCore/String.h"
17 #include "GDCore/Tools/MakeUnique.h"
18 #include "GDCore/Vector2.h"
21 class PropertyDescriptor;
24 class ArbitraryResourceWorker;
25 class InitialInstance;
26 class SerializerElement;
27 class EffectsContainer;
44 std::unique_ptr<gd::ObjectConfiguration> configuration);
64 if ((
this) != &
object) Init(
object);
81 virtual std::unique_ptr<gd::Object>
Clone()
const {
82 return gd::make_unique<gd::Object>(*
this);
108 assetStoreId = assetStoreId_;
134 std::vector<gd::String> GetAllBehaviorNames()
const;
149 bool HasBehaviorNamed(
const gd::String& name)
const;
179 const std::map<gd::String, std::unique_ptr<gd::Behavior>>&
240 Object& ResetPersistentUuid();
246 Object& ClearPersistentUuid();
253 std::unique_ptr<gd::ObjectConfiguration> configuration;
254 std::map<gd::String, std::unique_ptr<gd::Behavior>>
280 struct ObjectHasName :
public std::binary_function<std::unique_ptr<gd::Object>,
283 bool operator()(
const std::unique_ptr<gd::Object>&
object,
285 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
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:37
Object(const gd::Object &object)
Definition: Object.h:58
const gd::String & GetType() const
Return the type of the object.
Definition: Object.h:121
const gd::String & GetAssetStoreId() const
Return the asset store id of the object.
Definition: Object.h:113
gd::EffectsContainer effectsContainer
The effects container for the object.
Definition: Object.h:261
gd::VariablesContainer objectVariables
List of the variables of the object.
Definition: Object.h:259
void SetAssetStoreId(const gd::String &assetStoreId_)
Change the asset store id of the object.
Definition: Object.h:107
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:180
gd::VariablesContainer & GetVariables()
Provide access to the gd::VariablesContainer member containing the object variables.
Definition: Object.h:199
gd::String name
The full name of the object.
Definition: Object.h:250
void SetType(const gd::String &type_)
Change the type of the object.
Definition: Object.h:117
gd::String persistentUuid
Definition: Object.h:262
virtual std::unique_ptr< gd::Object > Clone() const
Definition: Object.h:81
gd::EffectsContainer & GetEffects()
Provide access to the gd::EffectsContainer member containing the effects.
Definition: Object.h:217
gd::String assetStoreId
Definition: Object.h:251
void SetName(const gd::String &name_)
Change the name of the object with the name passed as parameter.
Definition: Object.h:99
std::map< gd::String, std::unique_ptr< gd::Behavior > > behaviors
Definition: Object.h:255
Object & operator=(const gd::Object &object)
Definition: Object.h:63
const gd::String & GetName() const
Return the name of the object.
Definition: Object.h:103
const gd::VariablesContainer & GetVariables() const
Provide access to the gd::VariablesContainer member containing the object variables.
Definition: Object.h:193
const gd::EffectsContainer & GetEffects() const
Provide access to the gd::EffectsContainer member containing the effects.
Definition: Object.h:211
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:282