10 #include "GDCore/Project/Test.h"
11 #include "GDCore/String.h"
12 #include "GDCore/Tools/SerializableWithNameList.h"
15 class SerializerElement;
86 return InsertNew(name, position);
89 return Insert(test, position);
91 void RemoveTest(
const gd::String& name) {
return Remove(name); }
92 void ClearTests() {
return Clear(); }
93 void MoveTest(std::size_t oldIndex, std::size_t newIndex) {
94 return Move(oldIndex, newIndex);
96 std::size_t GetTestPosition(
const gd::Test& test) {
97 return GetPosition(test);
122 return SerializeElementsTo(
"test", element);
129 return UnserializeElementsFrom(
"test", element);
A class template that store a list of elements that can be accessed by their names and serialized.
Definition: SerializableWithNameList.h:33
void Init(const SerializableWithNameList< T > &other)
Definition: SerializableWithNameList.inl:190
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
A test attached to a project or an events based extension.
Definition: Test.h:28
A container of tests (gd::Test), used by gd::Project and gd::EventsFunctionsExtension.
Definition: TestsContainer.h:27
std::vector< std::unique_ptr< gd::Test > > & GetInternalVector()
Provide a raw access to the vector containing the tests.
Definition: TestsContainer.h:110
gd::Test & GetTest(std::size_t index)
Get the test at the specified index in the list.
Definition: TestsContainer.h:70
const gd::Test & GetTest(const gd::String &name) const
Get the test with the specified name.
Definition: TestsContainer.h:62
void Init(const gd::TestsContainer &other)
Definition: TestsContainer.h:138
std::size_t GetTestsCount() const
Return the number of tests.
Definition: TestsContainer.h:83
void UnserializeTestsFrom(const SerializerElement &element)
Unserialize the tests.
Definition: TestsContainer.h:128
bool HasTestNamed(const gd::String &name) const
Check if a test with the specified name exists.
Definition: TestsContainer.h:46
gd::Test & GetTest(const gd::String &name)
Get the test with the specified name.
Definition: TestsContainer.h:54
const std::vector< std::unique_ptr< gd::Test > > & GetInternalVector() const
Provide a raw access to the vector containing the tests.
Definition: TestsContainer.h:103
void SerializeTestsTo(SerializerElement &element) const
Serialize the tests.
Definition: TestsContainer.h:121
const gd::Test & GetTest(std::size_t index) const
Get the test at the specified index in the list.
Definition: TestsContainer.h:78
Definition: CommonTools.h:24