10 #include "GDCore/Project/MemoryTrackedRegistry.h"
11 #include "GDCore/Project/Variable.h"
12 #include "GDCore/String.h"
14 class SerializerElement;
50 SourceType GetSourceType()
const {
return sourceType; }
82 const Variable& Get(std::size_t index)
const;
94 std::size_t position);
99 std::size_t
Count()
const {
return variables.size(); };
104 const gd::String& GetNameAt(std::size_t index)
const;
110 std::size_t GetPosition(
const gd::String& name)
const;
141 void Swap(std::size_t firstVariableIndex, std::size_t secondVariableIndex);
146 void Move(std::size_t oldIndex, std::size_t newIndex);
151 inline void Clear() { variables.clear(); }
193 SourceType sourceType = Unknown;
194 std::vector<std::pair<gd::String, std::shared_ptr<gd::Variable>>> variables;
205 void Init(
const VariablesContainer& other);
Represent a layout ( also called a scene ) of a project.
Definition: Layout.h:41
A non-copyable, non-movable member object that registers/unregisters its owner with MemoryTrackedRegi...
Definition: MemoryTrackedRegistry.h:238
Represent an object of a platform.
Definition: Object.h:39
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
Defines a variable which can be used by an object, a layout or a project.
Definition: Variable.h:29
Class defining a container for gd::Variable.
Definition: VariablesContainer.h:29
const gd::String & GetPersistentUuid() const
Get the persistent UUID used to recognize the same variables between serialization.
Definition: VariablesContainer.h:189
void Clear()
Clear all variables of the container.
Definition: VariablesContainer.h:151
std::size_t Count() const
Return the number of variables.
Definition: VariablesContainer.h:99
Definition: CommonTools.h:24