split property & values into separate classes and files

Signed-off-by: Folling <mail@folling.io>
This commit is contained in:
folling 2023-11-21 15:10:43 +01:00 committed by Folling
parent f38ebeab14
commit e377340781
Signed by: folling
SSH key fingerprint: SHA256:S9qEx5WCFFLK49tE/LKnKuJYM5sw+++Dn6qJbbyxnCY
28 changed files with 700 additions and 269 deletions

View file

@ -0,0 +1,44 @@
#pragma once
/// \file text_value.h
/// \author Folling <folling@ikarus.world>
#include <ikarus/macros.h>
/// \addtogroup entity_value Entity Values
/// @{
IKARUS_BEGIN_HEADER
/// \brief A true/false boolean-like value. For example "IsDead".
struct IkarusTextValue;
/// \brief Creates a text value from a boolean.
/// \param value The text value.
/// \return The entity value.
/// \remark Must be freed with #ikarus_free.
IKA_API IkarusTextValue * ikarus_text_value_create(char const * value);
/// \brief Creates an indeterminate text value.
/// \return The entity value.
/// \remark Must be freed with #ikarus_free.
IKA_API IkarusTextValue * ikarus_text_value_create_indeterminate();
/// \brief Sets the value of a text value.
/// \param value The text value.
/// \pre \li Must not be null.
/// \param new_value The new value.
IKA_API void ikarus_text_value_set(IkarusTextValue * value, bool new_value);
/// \brief Fetches the underlying value of a text value.
/// \param value The text value.
/// \return The underlying value.
/// \warning If the value is indeterminate, false is returned.
IKA_API char const * ikarus_text_value_get_underlying(IkarusTextValue const * value);
/// \brief Converts a text value to an entity value.
/// \param text_value The text value to convert.
/// \return The converted entity value.
IKA_API struct IkarusEntityValue * ikarus_text_value_to_entity_value(IkarusTextValue * text_value);
IKARUS_END_HEADER