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
c65211e4ff
commit
5dce2ced94
51 changed files with 590 additions and 735 deletions
|
|
@ -19,62 +19,6 @@ IKARUS_BEGIN_HEADER
|
|||
/// \brief A generic object. Wraps all types of objects, including folders.
|
||||
struct IkarusObject;
|
||||
|
||||
/// \brief Fetches the project of an object.
|
||||
/// \param object The object to fetch the project from.
|
||||
/// \pre \li Must not be null.
|
||||
/// \pre \li Must exist.
|
||||
/// \param error_out \see errors.h
|
||||
/// \return The project of the object or null if an error occurs.
|
||||
IKA_API struct IkarusProject * ikarus_object_get_project(IkarusObject const * object, IkarusErrorData * error_out);
|
||||
|
||||
/// \brief Fetches the name of an object.
|
||||
/// \param object The object to fetch the name from.
|
||||
/// \pre \li Must not be null.
|
||||
/// \pre \li Must exist.
|
||||
/// \param error_out \see errors.h
|
||||
/// \return The name of the object or null if an error occurs.
|
||||
IKA_API char const * ikarus_object_get_name(IkarusObject const * object, IkarusErrorData * error_out);
|
||||
|
||||
/// \brief Sets the name of an object.
|
||||
/// \param object The object to set the name of.
|
||||
/// \pre \li Must not be null.
|
||||
/// \pre \li Must exist.
|
||||
/// \param new_name The new name of the object.
|
||||
/// \pre \li Must not be null.
|
||||
/// \pre \li Must not be empty.
|
||||
/// \param error_out \see errors.h
|
||||
IKA_API void ikarus_object_set_name(IkarusObject const * object, char const * new_name, IkarusErrorData * error_out);
|
||||
|
||||
/// \brief Fetches the information of an object.
|
||||
/// \param object The object to fetch the information from.
|
||||
/// \pre \li Must not be null.
|
||||
/// \pre \li Must exist.
|
||||
/// \param error_out \see errors.h
|
||||
/// \return The information of the object or null if an error occurs.
|
||||
IKA_API char const * ikarus_object_get_info(IkarusObject const * object, IkarusErrorData * error_out);
|
||||
|
||||
/// \brief Sets the information of an object.
|
||||
/// \param object The object to set the information of.
|
||||
/// \pre \li Must not be null.
|
||||
/// \pre \li Must exist.
|
||||
/// \param new_info The new information of the object.
|
||||
/// \pre \li Must not be null.
|
||||
/// \param error_out \see errors.h
|
||||
IKA_API void ikarus_object_set_info(IkarusObject const * object, char const * new_info, IkarusErrorData * error_out);
|
||||
|
||||
/// \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.
|
||||
/// \pre \li Must exist.
|
||||
/// \param rhs The right hand side object.
|
||||
/// \pre \li Must not be null.
|
||||
/// \pre \li Must exist.
|
||||
/// \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, IkarusErrorData * error_out);
|
||||
|
||||
/// \brief Visits an object. Calling the appropriate function for the object's type.
|
||||
/// \param object The object to visit.
|
||||
/// \param blueprint_visitor The function to call if the object is a blueprint. Skipped if null.
|
||||
|
|
@ -84,9 +28,9 @@ IKA_API bool ikarus_object_is_equal(IkarusObject const * lhs, IkarusObject const
|
|||
/// \param error_out \see errors.h
|
||||
IKA_API void ikarus_object_visit(
|
||||
IkarusObject * object,
|
||||
void (*blueprint_visitor)(struct IkarusBlueprint *, void *),
|
||||
void (*property_visitor)(struct IkarusProperty *, void *),
|
||||
void (*entity_visitor)(struct IkarusEntity *, void *),
|
||||
void (*blueprint_visitor)(struct IkarusBlueprint *, IkarusErrorData * error_out, void *),
|
||||
void (*property_visitor)(struct IkarusProperty *, IkarusErrorData * error_out, void *),
|
||||
void (*entity_visitor)(struct IkarusEntity *, IkarusErrorData * error_out, void *),
|
||||
void * data,
|
||||
IkarusErrorData * error_out
|
||||
);
|
||||
|
|
@ -94,9 +38,9 @@ IKA_API void ikarus_object_visit(
|
|||
/// \see ikarus_object_visit
|
||||
IKA_API void ikarus_object_visit_const(
|
||||
IkarusObject const * object,
|
||||
void (*blueprint_visitor)(struct IkarusBlueprint const *, void *),
|
||||
void (*property_visitor)(struct IkarusProperty const *, void *),
|
||||
void (*entity_visitor)(struct IkarusEntity const *, void *),
|
||||
void (*blueprint_visitor)(struct IkarusBlueprint const *, IkarusErrorData * error_out, void *),
|
||||
void (*property_visitor)(struct IkarusProperty const *, IkarusErrorData * error_out, void *),
|
||||
void (*entity_visitor)(struct IkarusEntity const *, IkarusErrorData * error_out, void *),
|
||||
void * data,
|
||||
IkarusErrorData * error_out
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue