finalize entity functions
This commit is contained in:
parent
ba62206c0c
commit
e6233cf3f2
18 changed files with 523 additions and 181 deletions
|
|
@ -181,8 +181,6 @@ IKA_API void ikarus_entity_link_blueprint(
|
|||
enum IkarusEntityUnlinkBlueprintFlags {
|
||||
/// \brief No flags.
|
||||
IkarusEntityUnlinkBlueprintFlags_None = 0,
|
||||
/// \brief Keep the values associated with the blueprint, transforming them into entity values.
|
||||
IkarusEntityUnlinkBlueprintFlags_KeepValues = 1,
|
||||
};
|
||||
|
||||
/// \brief Unlinks an entity from a blueprint.
|
||||
|
|
@ -203,17 +201,27 @@ IKA_API void ikarus_entity_unlink_blueprint(
|
|||
IkarusErrorData * error_out
|
||||
);
|
||||
|
||||
/// \brief Struct for an entity value.
|
||||
struct IkarusEntityValue {
|
||||
/// \brief The name of the value.
|
||||
char const * name;
|
||||
/// \brief The value in json format. \see value.h
|
||||
char const * value;
|
||||
};
|
||||
|
||||
/// \brief Gets the values of an entity.
|
||||
/// \param entity The entity to get the values of.
|
||||
/// \pre \li Must not be null.
|
||||
/// \pre \li Must exist.
|
||||
/// \param size_out An out parameter for the number of values in the returned array
|
||||
/// or undefined if an error occurs.
|
||||
/// \param error_out \see errors.h
|
||||
/// \return The values, in json format of or null if an error occurs.
|
||||
/// The json representation is an array of objects with the following keys:
|
||||
/// - `name`: The name of the value.
|
||||
/// - `value`: The value itself. \see value.h
|
||||
IKA_API char const *
|
||||
ikarus_entity_get_values(IkarusEntity * entity, IkarusErrorData * error_out);
|
||||
/// \return The values or null if an error occurs.
|
||||
IKA_API IkarusEntityValue * ikarus_entity_get_values(
|
||||
IkarusEntity * entity,
|
||||
size_t * size_out,
|
||||
IkarusErrorData * error_out
|
||||
);
|
||||
|
||||
/// \brief Gets a value of an entity.
|
||||
/// \param entity The entity to get the value of.
|
||||
|
|
@ -279,16 +287,25 @@ IKA_API void ikarus_entity_delete_value(
|
|||
IkarusErrorData * error_out
|
||||
);
|
||||
|
||||
/// \brief Struct for an entity property value.
|
||||
struct IkarusEntityPropertyValue {
|
||||
/// \brief The property.
|
||||
struct IkarusProperty * property;
|
||||
/// \brief The value in json format. \see value.h
|
||||
char const * value;
|
||||
};
|
||||
|
||||
/// \brief Gets the property values of an entity.
|
||||
/// \param entity The entity to get the property values of.
|
||||
/// \pre \li Must not be null.
|
||||
/// \pre \li Must exist.
|
||||
/// \param size_out An out parameter for the number of property values in the
|
||||
/// returned array or undefined if an error occurs.
|
||||
/// \param error_out \see errors.h
|
||||
/// \return The property values, in msgpack format of or null if an error occurs.
|
||||
/// The format is a map of property pointers (as integers) to values. \see
|
||||
/// value.h
|
||||
IKA_API char const * ikarus_entity_get_property_values(
|
||||
/// \return The property values, or null if an error occurs.
|
||||
IKA_API IkarusEntityPropertyValue * ikarus_entity_get_property_values(
|
||||
IkarusEntity * entity,
|
||||
size_t * size_out,
|
||||
IkarusErrorData * error_out
|
||||
);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue