implement remaining logic
Signed-off-by: Folling <mail@folling.io>
This commit is contained in:
parent
e1bf97704a
commit
1ce811d566
41 changed files with 1393 additions and 408 deletions
|
|
@ -89,6 +89,30 @@ IKA_API void ikarus_entity_link_to_blueprint(IkarusEntity * entity, struct Ikaru
|
|||
/// \remark No-op if the entity is not linked to the blueprint.
|
||||
IKA_API void ikarus_entity_unlink_from_blueprint(IkarusEntity * entity, struct IkarusBlueprint * blueprint, IkarusErrorData * error_out);
|
||||
|
||||
/// \brief Gets the blueprints an entity is linked to.
|
||||
/// \param entity The entity to get the blueprints of.
|
||||
/// \pre \li Must not be null.
|
||||
/// \pre \li Must exist.
|
||||
/// \param blueprints_out The buffer to write the blueprints to.
|
||||
/// \pre \li Must not be null.
|
||||
/// \param blueprints_out_size The size of the buffer.
|
||||
/// \param error_out \see errors.h
|
||||
/// \see ikarus_entity_get_linked_blueprint_count
|
||||
IKA_API void ikarus_entity_get_linked_blueprints(
|
||||
IkarusEntity const * entity,
|
||||
struct IkarusBlueprint ** blueprints_out,
|
||||
size_t blueprints_out_size,
|
||||
IkarusErrorData * error_out
|
||||
);
|
||||
|
||||
/// \brief Gets the number of blueprints an entity is linked to.
|
||||
/// \param entity The entity to get the number of blueprints of.
|
||||
/// \pre \li Must not be null.
|
||||
/// \pre \li Must exist.
|
||||
/// \param error_out \see errors.h
|
||||
/// \return The number of blueprints or undefined if an error occurs.
|
||||
IKA_API size_t ikarus_entity_get_linked_blueprint_count(IkarusEntity const * entity, IkarusErrorData * error_out);
|
||||
|
||||
/// \brief Checks if an entity has a specific property.
|
||||
/// \param entity The entity to check.
|
||||
/// \pre \li Must not be null.
|
||||
|
|
@ -97,17 +121,9 @@ IKA_API void ikarus_entity_unlink_from_blueprint(IkarusEntity * entity, struct I
|
|||
/// \pre \li Must not be null.
|
||||
/// \pre \li Must exist.
|
||||
/// \param error_out \see errors.h
|
||||
/// \return True if the entity has the property, false otherwise.
|
||||
/// \return False if an error occurs or the entity does not have the property, true otherwise.
|
||||
IKA_API bool ikarus_entity_has_property(IkarusEntity const * entity, struct IkarusProperty const * property, IkarusErrorData * error_out);
|
||||
|
||||
/// \brief Gets the number of properties of an entity.
|
||||
/// \param entity The entity to get the number of properties of.
|
||||
/// \pre \li Must not be null.
|
||||
/// \pre \li Must exist.
|
||||
/// \param error_out \see errors.h
|
||||
/// \return The number of properties or undefined if an error occurs.
|
||||
IKA_API size_t ikarus_entity_get_property_count(IkarusEntity const * entity, IkarusErrorData * error_out);
|
||||
|
||||
/// \brief Gets the properties of an entity.
|
||||
/// \param entity The entity to get the properties of.
|
||||
/// \pre \li Must not be null.
|
||||
|
|
@ -116,6 +132,7 @@ IKA_API size_t ikarus_entity_get_property_count(IkarusEntity const * entity, Ika
|
|||
/// \pre \li Must not be null.
|
||||
/// \param error_out \see errors.h
|
||||
/// \param properties_out_size The size of the buffer.
|
||||
/// \see ikarus_entity_get_property_count
|
||||
IKA_API void ikarus_entity_get_properties(
|
||||
IkarusEntity const * entity,
|
||||
struct IkarusProperty ** properties_out,
|
||||
|
|
@ -123,9 +140,16 @@ IKA_API void ikarus_entity_get_properties(
|
|||
IkarusErrorData * error_out
|
||||
);
|
||||
|
||||
/// \brief Gets the number of properties of an entity.
|
||||
/// \param entity The entity to get the number of properties of.
|
||||
/// \pre \li Must not be null.
|
||||
/// \pre \li Must exist.
|
||||
/// \param error_out \see errors.h
|
||||
/// \return The number of properties or undefined if an error occurs.
|
||||
IKA_API size_t ikarus_entity_get_property_count(IkarusEntity const * entity, IkarusErrorData * error_out);
|
||||
|
||||
/// \brief Gets the value of a property of an entity.
|
||||
/// \details If the entity has never set the value of the property, the default value is returned (which may be
|
||||
/// undefined).
|
||||
/// \details If the entity has never set the value of the property, the default value is returned (which may be undefined).
|
||||
/// \param entity The entity to get the value of.
|
||||
/// \pre \li Must not be null.
|
||||
/// \pre \li Must exist.
|
||||
|
|
@ -134,9 +158,8 @@ IKA_API void ikarus_entity_get_properties(
|
|||
/// \pre \li Must exist.
|
||||
/// \param error_out \see errors.h
|
||||
/// \return The value of the property or null if the entity does not have the property or an error occurs.
|
||||
/// \remark Must be freed using
|
||||
/// #ikarus_free.
|
||||
IKA_API struct IkarusEntityValue *
|
||||
/// \remark Must be freed using #ikarus_free.
|
||||
IKA_API struct IkarusEntityPropertyValue *
|
||||
ikarus_entity_get_value(IkarusEntity const * entity, struct IkarusProperty const * property, IkarusErrorData * error_out);
|
||||
|
||||
/// \brief Sets the value of a property of an entity.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue