change error system & function signatures

Signed-off-by: Folling <mail@folling.io>
This commit is contained in:
Folling 2024-01-02 15:14:39 +01:00 committed by Folling
parent 1367373819
commit e1bf97704a
No known key found for this signature in database
28 changed files with 633 additions and 651 deletions

View file

@ -3,6 +3,7 @@
/// \file object.h
/// \author Folling <folling@ikarus.world>
#include <ikarus/errors.h>
#include <ikarus/macros.h>
/// \defgroup object Objects
@ -20,10 +21,14 @@ struct IkarusObject;
/// \brief Compares two objects for equality.
/// \details This neither compares the pointers nor does a deep copy. Instead it figures out if the objects _are_ the
/// same object. \param lhs The left hand side object. \pre \li Must not be null. \param rhs The right hand side object.
/// same object.
/// \param lhs The left hand side object.
/// \pre \li Must not be null.
/// \param rhs The right hand side object.
/// \pre \li Must not be null.
/// \param error_out \see errors.h
/// \return True if the objects are equal, false otherwise.
IKA_API bool ikarus_object_is_equal(IkarusObject const * lhs, IkarusObject const * rhs);
IKA_API bool ikarus_object_is_equal(IkarusObject const * lhs, IkarusObject const * rhs, IkarusErrorData * error_out);
/// \brief Visits an object. Calling the appropriate function for the object's type.
/// \param object The object to visit.
@ -34,6 +39,7 @@ IKA_API bool ikarus_object_is_equal(IkarusObject const * lhs, IkarusObject const
/// \param property_folder_visitor The function to call if the object is a property folder. Skipped if null.
/// \param entity_folder_visitor The function to call if the object is an entity folder. Skipped if null.
/// \param data The data passed to the visitor functions.
/// \param error_out \see errors.h
IKA_API void ikarus_object_visit(
IkarusObject * object,
void (*blueprint_visitor)(struct IkarusBlueprint *, void *),
@ -42,7 +48,8 @@ IKA_API void ikarus_object_visit(
void (*blueprint_folder_visitor)(struct IkarusBlueprintFolder *, void *),
void (*property_folder_visitor)(struct IkarusPropertyFolder *, void *),
void (*entity_folder_visitor)(struct IkarusEntityFolder *, void *),
void * data
void * data,
IkarusErrorData * error_out
);
/// \see ikarus_object_visit
@ -54,7 +61,8 @@ IKA_API void ikarus_object_visit_const(
void (*blueprint_folder_visitor)(struct IkarusBlueprintFolder const *, void *),
void (*property_folder_visitor)(struct IkarusPropertyFolder const *, void *),
void (*entity_folder_visitor)(struct IkarusEntityFolder const *, void *),
void * data
void * data,
IkarusErrorData * error_out
);
IKARUS_END_HEADER