GDevelop Core
Core library for developing platforms and tools compatible with GDevelop.
Public Member Functions | Protected Member Functions | List of all members

A container of tests (gd::Test), used by gd::Project and gd::EventsFunctionsExtension. More...

#include <TestsContainer.h>

Inherits gd::SerializableWithNameList< gd::Test >.

Public Member Functions

 TestsContainer (const TestsContainer &other)
 
TestsContaineroperator= (const TestsContainer &other)
 
Tests management
bool HasTestNamed (const gd::String &name) const
 Check if a test with the specified name exists.
 
gd::TestGetTest (const gd::String &name)
 Get the test with the specified name. More...
 
const gd::TestGetTest (const gd::String &name) const
 Get the test with the specified name. More...
 
gd::TestGetTest (std::size_t index)
 Get the test at the specified index in the list. More...
 
const gd::TestGetTest (std::size_t index) const
 Get the test at the specified index in the list. More...
 
std::size_t GetTestsCount () const
 Return the number of tests.
 
gd::TestInsertNewTest (const gd::String &name, std::size_t position)
 
gd::TestInsertTest (const gd::Test &test, std::size_t position)
 
void RemoveTest (const gd::String &name)
 
void ClearTests ()
 
void MoveTest (std::size_t oldIndex, std::size_t newIndex)
 
std::size_t GetTestPosition (const gd::Test &test)
 
const std::vector< std::unique_ptr< gd::Test > > & GetInternalVector () const
 Provide a raw access to the vector containing the tests.
 
std::vector< std::unique_ptr< gd::Test > > & GetInternalVector ()
 Provide a raw access to the vector containing the tests.
 
Serialization
void SerializeTestsTo (SerializerElement &element) const
 Serialize the tests.
 
void UnserializeTestsFrom (const SerializerElement &element)
 Unserialize the tests.
 

Protected Member Functions

void Init (const gd::TestsContainer &other)
 

Detailed Description

A container of tests (gd::Test), used by gd::Project and gd::EventsFunctionsExtension.

See also
gd::Test

Member Function Documentation

◆ GetTest() [1/4]

gd::Test& gd::TestsContainer::GetTest ( const gd::String name)
inline

Get the test with the specified name.

Warning
Trying to access a not existing test will result in undefined behavior.

◆ GetTest() [2/4]

const gd::Test& gd::TestsContainer::GetTest ( const gd::String name) const
inline

Get the test with the specified name.

Warning
Trying to access a not existing test will result in undefined behavior.

◆ GetTest() [3/4]

gd::Test& gd::TestsContainer::GetTest ( std::size_t  index)
inline

Get the test at the specified index in the list.

Warning
Trying to access a not existing test will result in undefined behavior.

◆ GetTest() [4/4]

const gd::Test& gd::TestsContainer::GetTest ( std::size_t  index) const
inline

Get the test at the specified index in the list.

Warning
Trying to access a not existing test will result in undefined behavior.

◆ Init()

void gd::TestsContainer::Init ( const gd::TestsContainer other)
inlineprotected

Initialize object using another object. Used by copy-ctor and assign-op. Don't forget to update me if members were changed!


The documentation for this class was generated from the following file: