update dependencies
Signed-off-by: Folling <mail@folling.io>
This commit is contained in:
parent
c489e9e8ae
commit
6310335e41
21 changed files with 800 additions and 370 deletions
|
|
@ -20,6 +20,13 @@ IKARUS_BEGIN_HEADER
|
|||
/// in all linked entities.
|
||||
struct IkarusBlueprint;
|
||||
|
||||
/// \brief Checks whether a blueprint exists.
|
||||
/// \param blueprint The blueprint to check.
|
||||
/// \pre \li Must not be null.
|
||||
/// \param error_out \see errors.h
|
||||
/// \return True if the blueprint exists, false otherwise or if an error occurs.
|
||||
IKA_API bool ikarus_blueprint_exists(IkarusBlueprint * blueprint, IkarusErrorData * error_out);
|
||||
|
||||
/// \brief Flags for creating a blueprint.
|
||||
enum IkarusBlueprintCreateFlags {
|
||||
/// \brief No flags.
|
||||
|
|
@ -48,14 +55,10 @@ IKA_API IkarusBlueprint * ikarus_blueprint_create(
|
|||
enum IkarusBlueprintCreateFromEntityFlags {
|
||||
/// \brief No flags.
|
||||
IkarusBlueprintCreateFromEntityFlags_None = 0,
|
||||
/// \brief The default values of the properties will be set to the values of the source entity.
|
||||
IkarusBlueprintCreateFromEntityFlags_AdoptDefaultValues = 1 << 0,
|
||||
/// \brief The entity will be linked to the blueprint, and all values will be turned into properties.
|
||||
IkarusBlueprintCreateFromEntityFlags_LinkEntity = 1 << 1,
|
||||
};
|
||||
|
||||
/// \brief Creates a new blueprint from an entity.
|
||||
/// \details Each value of the entity will be copied into the blueprint as a property.
|
||||
/// \details Each value of the entity will be copied into the blueprint as a blueprint.
|
||||
/// \param entity The entity to create the blueprint from.
|
||||
/// \pre \li Must not be null.
|
||||
/// \pre \li Must exist.
|
||||
|
|
@ -117,10 +120,8 @@ IKA_API void ikarus_blueprint_delete(
|
|||
/// \param error_out \see errors.h
|
||||
/// \return The project the blueprint belongs to.
|
||||
/// \remark Ownership remains with libikarus.
|
||||
IKA_API struct IkarusProject * ikarus_blueprint_get_project(
|
||||
struct IkarusBlueprint * blueprint,
|
||||
struct IkarusErrorData * error_out
|
||||
);
|
||||
IKA_API struct IkarusProject *
|
||||
ikarus_blueprint_get_project(struct IkarusBlueprint * blueprint, struct IkarusErrorData * error_out);
|
||||
|
||||
/// \brief Gets the name of a blueprint.
|
||||
/// \param blueprint The blueprint to get the name of.
|
||||
|
|
@ -129,10 +130,7 @@ IKA_API struct IkarusProject * ikarus_blueprint_get_project(
|
|||
/// \param error_out \see errors.h
|
||||
/// \return The name of the blueprint.
|
||||
/// \remark Ownership remains with libikarus.
|
||||
IKA_API char const * ikarus_blueprint_get_name(
|
||||
struct IkarusBlueprint * blueprint,
|
||||
struct IkarusErrorData * error_out
|
||||
);
|
||||
IKA_API char const * ikarus_blueprint_get_name(struct IkarusBlueprint * blueprint, struct IkarusErrorData * error_out);
|
||||
|
||||
/// \brief Flags for setting the name of a blueprint.
|
||||
enum IkarusBlueprintSetNameFlags {
|
||||
|
|
@ -163,7 +161,7 @@ IKA_API void ikarus_blueprint_set_name(
|
|||
/// \param size_out An out parameter for the number of items in the returned array or undefined if an error occurs.
|
||||
/// \param error_out \see errors.h
|
||||
/// \return The properties of the blueprint or null if an error occurs.
|
||||
IKA_API struct IkarusProperty ** ikarus_blueprint_get_properties(
|
||||
IKA_API struct IkarusBlueprint ** ikarus_blueprint_get_properties(
|
||||
struct IkarusBlueprint * blueprint,
|
||||
size_t * size_out,
|
||||
struct IkarusErrorData * error_out
|
||||
|
|
@ -175,10 +173,8 @@ IKA_API struct IkarusProperty ** ikarus_blueprint_get_properties(
|
|||
/// \pre \li Must exist.
|
||||
/// \param error_out \see errors.h
|
||||
/// \return The number of properties of the blueprint or 0 if an error occurs.
|
||||
IKA_API size_t ikarus_blueprint_get_properties_count(
|
||||
struct IkarusBlueprint * blueprint,
|
||||
struct IkarusErrorData * error_out
|
||||
);
|
||||
IKA_API size_t
|
||||
ikarus_blueprint_get_properties_count(struct IkarusBlueprint * blueprint, struct IkarusErrorData * error_out);
|
||||
|
||||
/// \brief Gets all entities linked to a blueprint.
|
||||
/// \param blueprint The blueprint to get the entities of.
|
||||
|
|
@ -200,10 +196,8 @@ IKA_API struct IkarusEntity ** ikarus_blueprint_get_entities(
|
|||
/// \pre \li Must exist.
|
||||
/// \param error_out \see errors.h
|
||||
/// \return The number of entities linked to the blueprint or 0 if an error occurs.
|
||||
IKA_API size_t ikarus_blueprint_get_entities_count(
|
||||
struct IkarusBlueprint * blueprint,
|
||||
struct IkarusErrorData * error_out
|
||||
);
|
||||
IKA_API size_t
|
||||
ikarus_blueprint_get_entities_count(struct IkarusBlueprint * blueprint, struct IkarusErrorData * error_out);
|
||||
|
||||
IKARUS_END_HEADER
|
||||
|
||||
|
|
|
|||
|
|
@ -33,6 +33,14 @@ enum IkarusEntityCreateFlags {
|
|||
IkarusEntityCreateFlags_None = 0,
|
||||
};
|
||||
|
||||
/// \brief Checks whether an entity exists.
|
||||
/// \param entity The entity to check.
|
||||
/// \pre \li Must not be null.
|
||||
/// \param error_out \see errors.h
|
||||
/// \return True if the entity exists, false otherwise or if an error occurs.
|
||||
IKA_API bool
|
||||
ikarus_entity_exists(IkarusEntity * entity, IkarusErrorData * error_out);
|
||||
|
||||
/// \brief Creates a new entity.
|
||||
/// \param project The project to create the entity in.
|
||||
/// \pre \li Must not be null.
|
||||
|
|
@ -127,6 +135,22 @@ IKA_API void ikarus_entity_set_name(
|
|||
IkarusErrorData * error_out
|
||||
);
|
||||
|
||||
/// \brief Gets whether an entity is linked to a blueprint.
|
||||
/// \param entity The entity to check the blueprint of.
|
||||
/// \pre \li Must not be null.
|
||||
/// \pre \li Must exist.
|
||||
/// \param blueprint The blueprint to check the entity's link to.
|
||||
/// \pre \li Must not be null.
|
||||
/// \pre \li Must exist.
|
||||
/// \pre \li Must be in the same project as the entity.
|
||||
/// \param error_out \see errors.h
|
||||
/// \return True if the entity is linked to the blueprint, false otherwise or if an error occurs.
|
||||
IKA_API bool ikarus_entity_is_linked_to_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.
|
||||
|
|
@ -191,6 +215,7 @@ enum IkarusEntityUnlinkBlueprintFlags {
|
|||
/// \param blueprint The blueprint to unlink from.
|
||||
/// \pre \li Must not be null.
|
||||
/// \pre \li Must exist.
|
||||
/// \pre \li Must be in the same project as the entity.
|
||||
/// \remark If the entity is not linked to the blueprint, nothing happens.
|
||||
/// \param flags Flags for unlinking the entity from the blueprint.
|
||||
/// \param error_out \see errors.h
|
||||
|
|
@ -201,6 +226,20 @@ IKA_API void ikarus_entity_unlink_blueprint(
|
|||
IkarusErrorData * error_out
|
||||
);
|
||||
|
||||
/// \brief Gets whether an entity has a value.
|
||||
/// \param entity The entity to check the value of.
|
||||
/// \pre \li Must not be null.
|
||||
/// \pre \li Must exist.
|
||||
/// \param name The value's name.
|
||||
/// \pre \li Must not be null.
|
||||
/// \param error_out \see errors.h
|
||||
/// \return True if the entity has a value with the name, false otherwise or if an error occurs.
|
||||
IKA_API bool ikarus_entity_has_value(
|
||||
IkarusEntity * entity,
|
||||
char const * name,
|
||||
IkarusErrorData * error_out
|
||||
);
|
||||
|
||||
/// \brief Struct for an entity value.
|
||||
struct IkarusEntityValue {
|
||||
/// \brief The name of the value.
|
||||
|
|
@ -229,7 +268,7 @@ IKA_API IkarusEntityValue * ikarus_entity_get_values(
|
|||
/// \pre \li Must exist.
|
||||
/// \param name The value's name.
|
||||
/// \pre \li Must not be null.
|
||||
/// \remark Ownership remains with the client.
|
||||
/// \pre \li Must exist.
|
||||
/// \param error_out \see errors.h
|
||||
/// \return The value, in json format of or null if an error occurs. \see value.h
|
||||
IKA_API char const * ikarus_entity_get_value(
|
||||
|
|
@ -287,6 +326,22 @@ IKA_API void ikarus_entity_delete_value(
|
|||
IkarusErrorData * error_out
|
||||
);
|
||||
|
||||
/// \brief Gets whether an entity has a property value.
|
||||
/// \param entity The entity to check the property value of.
|
||||
/// \pre \li Must not be null.
|
||||
/// \pre \li Must exist.
|
||||
/// \param property The property to check the value of.
|
||||
/// \pre \li Must not be null.
|
||||
/// \pre \li Must exist.
|
||||
/// \pre \li Must be in the same project as the entity.
|
||||
/// \param error_out \see errors.h
|
||||
/// \return True if the entity has a value for the property, false otherwise or if an error occurs.
|
||||
IKA_API bool ikarus_entity_has_property_value(
|
||||
IkarusEntity * entity,
|
||||
struct IkarusProperty * property,
|
||||
IkarusErrorData * error_out
|
||||
);
|
||||
|
||||
/// \brief Struct for an entity property value.
|
||||
struct IkarusEntityPropertyValue {
|
||||
/// \brief The property.
|
||||
|
|
@ -355,6 +410,29 @@ IKA_API void ikarus_entity_set_property_value(
|
|||
IkarusErrorData * error_out
|
||||
);
|
||||
|
||||
/// \brief Flags for clearing the value of a property of an entity.
|
||||
enum IkarusEntityClearPropertyValueFlags {
|
||||
/// \brief No flags.
|
||||
IkarusEntityClearPropertyValueFlags_None = 0,
|
||||
};
|
||||
|
||||
/// \brief Clears the value of a property of an entity.
|
||||
/// \param entity The entity to clear the value of.
|
||||
/// \pre \li Must not be null.
|
||||
/// \pre \li Must exist.
|
||||
/// \param property The property to clear the value of.
|
||||
/// \pre \li Must not be null.
|
||||
/// \pre \li Must exist.
|
||||
/// \pre \li Must be linked to the entity.
|
||||
/// \param flags Flags for clearing the property value.
|
||||
/// \param error_out \see errors.h
|
||||
IKA_API void ikarus_entity_clear_property_value(
|
||||
IkarusEntity * entity,
|
||||
struct IkarusProperty * property,
|
||||
IkarusEntitySetPropertyValueFlags flags,
|
||||
IkarusErrorData * error_out
|
||||
);
|
||||
|
||||
IKARUS_END_HEADER
|
||||
|
||||
/// @}
|
||||
|
|
|
|||
|
|
@ -36,6 +36,13 @@ IKARUS_BEGIN_HEADER
|
|||
/// property's default value if none is specified.
|
||||
struct IkarusProperty;
|
||||
|
||||
/// \brief Checks whether a property exists.
|
||||
/// \param property The property to check.
|
||||
/// \pre \li Must not be null.
|
||||
/// \param error_out \see errors.h
|
||||
/// \return True if the property exists, false otherwise or if an error occurs.
|
||||
IKA_API bool ikarus_property_exists(IkarusProperty * property, IkarusErrorData * error_out);
|
||||
|
||||
/// \brief Flags for creating a property.
|
||||
enum IkarusPropertyCreateFlags {
|
||||
/// \brief No flags.
|
||||
|
|
@ -73,11 +80,8 @@ enum IkarusPropertyDeleteFlags {
|
|||
/// \param property The property to delete.
|
||||
/// \param flags Flags for deleting the property.
|
||||
/// \param error_out \see errors.h
|
||||
IKA_API void ikarus_property_delete(
|
||||
IkarusProperty * property,
|
||||
IkarusPropertyDeleteFlags flags,
|
||||
IkarusErrorData * error_out
|
||||
);
|
||||
IKA_API void
|
||||
ikarus_property_delete(IkarusProperty * property, IkarusPropertyDeleteFlags flags, IkarusErrorData * error_out);
|
||||
|
||||
/// \brief Get the project a property belongs to.
|
||||
/// \param property The property to get the project of.
|
||||
|
|
@ -86,10 +90,7 @@ IKA_API void ikarus_property_delete(
|
|||
/// \param error_out \see errors.h
|
||||
/// \return The project the property belongs to or null if an error occurred.
|
||||
/// \remark Ownership remains with libikarus.
|
||||
IKA_API struct IkarusProject * ikarus_property_get_project(
|
||||
IkarusProperty * property,
|
||||
IkarusErrorData * error_out
|
||||
);
|
||||
IKA_API struct IkarusProject * ikarus_property_get_project(IkarusProperty * property, IkarusErrorData * error_out);
|
||||
|
||||
/// \brief Get the name of a property.
|
||||
/// \param property The property to get the name of.
|
||||
|
|
@ -98,10 +99,7 @@ IKA_API struct IkarusProject * ikarus_property_get_project(
|
|||
/// \param error_out \see errors.h
|
||||
/// \return The name of the property or null if an error occurred.
|
||||
/// \remark Ownership remains with libikarus.
|
||||
IKA_API char const * ikarus_property_get_name(
|
||||
IkarusProperty * property,
|
||||
IkarusErrorData * error_out
|
||||
);
|
||||
IKA_API char const * ikarus_property_get_name(IkarusProperty * property, IkarusErrorData * error_out);
|
||||
|
||||
/// \brief Get the schema of a property.
|
||||
/// \param property The property to get the schema of.
|
||||
|
|
@ -110,10 +108,7 @@ IKA_API char const * ikarus_property_get_name(
|
|||
/// \param error_out \see errors.h
|
||||
/// \return The schema of the property or null if an error occurred.
|
||||
/// \remark Ownership remains with libikarus.
|
||||
IKA_API struct IkarusValueSchema * ikarus_property_get_schema(
|
||||
IkarusProperty * property,
|
||||
IkarusErrorData * error_out
|
||||
);
|
||||
IKA_API struct IkarusValueSchema * ikarus_property_get_schema(IkarusProperty * property, IkarusErrorData * error_out);
|
||||
|
||||
/// \brief Flags for setting the name of a property.
|
||||
enum IkarusPropertySetNameFlags {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue