add src/ikarus subdir and make names unique for objects per scope
Signed-off-by: Folling <mail@folling.io>
This commit is contained in:
parent
ced123b628
commit
9f943cc6a2
51 changed files with 590 additions and 735 deletions
|
|
@ -41,9 +41,9 @@ struct IkarusEntity;
|
|||
/// \param name The name of the entity.
|
||||
/// \pre \li Must not be null.
|
||||
/// \pre \li Must not be empty.
|
||||
/// \pre \li Must be unique among all entities in the project.
|
||||
/// \param error_out \see errors.h
|
||||
/// \return The created entity or null if an error occurs.
|
||||
/// \remark Must be freed using #ikarus_free.
|
||||
IKA_API IkarusEntity * ikarus_entity_create(struct IkarusProject * project, char const * name, IkarusErrorData * error_out);
|
||||
|
||||
/// \brief Deletes an entity.
|
||||
|
|
@ -54,6 +54,33 @@ IKA_API IkarusEntity * ikarus_entity_create(struct IkarusProject * project, char
|
|||
/// \remark The entity must not be accessed after deletion.
|
||||
IKA_API void ikarus_entity_delete(IkarusEntity * entity, IkarusErrorData * error_out);
|
||||
|
||||
/// \brief Gets the project an entity is part of.
|
||||
/// \param entity The entity to get the project of.
|
||||
/// \pre \li Must not be null.
|
||||
/// \pre \li Must exist.
|
||||
/// \param error_out \see errors.h
|
||||
/// \return The project the entity is part of or null if an error occurs.
|
||||
IKA_API IkarusProject * ikarus_entity_get_project(IkarusEntity const * entity, IkarusErrorData * error_out);
|
||||
|
||||
/// \brief Gets the name of an entity.
|
||||
/// \param entity The entity to get the name of.
|
||||
/// \pre \li Must not be null.
|
||||
/// \pre \li Must exist.
|
||||
/// \param error_out \see errors.h
|
||||
/// \return The name of the entity or null if an error occurs.
|
||||
IKA_API char const * ikarus_entity_get_name(IkarusEntity const * entity, IkarusErrorData * error_out);
|
||||
|
||||
/// \brief Sets the name of an entity.
|
||||
/// \param entity The entity to set the name of.
|
||||
/// \pre \li Must not be null.
|
||||
/// \pre \li Must exist.
|
||||
/// \param name The new name of the entity.
|
||||
/// \pre \li Must not be null.
|
||||
/// \pre \li Must not be empty.
|
||||
/// \pre \li Must be unique among all entities in the project.
|
||||
/// \param error_out \see errors.h
|
||||
IKA_API void ikarus_entity_set_name(IkarusEntity * entity, char const * name, IkarusErrorData * error_out);
|
||||
|
||||
/// \brief Checks if an entity is linked to a blueprint.
|
||||
/// \param entity The entity to check.
|
||||
/// \pre \li Must not be null.
|
||||
|
|
@ -182,18 +209,6 @@ IKA_API void ikarus_entity_set_value(
|
|||
IkarusErrorData * error_out
|
||||
);
|
||||
|
||||
/// \brief Casts an entity to an object.
|
||||
/// \param entity The entity to cast.
|
||||
/// \pre \li Must not be null.
|
||||
/// \pre \li Must exist.
|
||||
/// \param error_out \see errors.h
|
||||
/// \return The entity represented as an object or null if an error occurs.
|
||||
/// \remark This operation is guaranteed to be very fast and is intended to be used frequently.
|
||||
IKA_API struct IkarusObject * ikarus_entity_to_object(IkarusEntity * entity, IkarusErrorData * error_out);
|
||||
|
||||
/// \see ikarus_entity_to_object
|
||||
IKA_API struct IkarusObject const * ikarus_entity_to_object_const(IkarusEntity const * entity, IkarusErrorData * error_out);
|
||||
|
||||
IKARUS_END_HEADER
|
||||
|
||||
// @}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue