implement toggle/number/text values
Signed-off-by: Folling <mail@folling.io>
This commit is contained in:
parent
fec84033af
commit
3dd30d74c5
14 changed files with 280 additions and 48 deletions
|
|
@ -4,7 +4,6 @@
|
|||
/// \author Folling <folling@ikarus.world>
|
||||
|
||||
#include <ikarus/macros.h>
|
||||
#include <ikarus/stdtypes.h>
|
||||
|
||||
/// \defgroup entity_value Entity Values
|
||||
/// \brief The values stored in entities.
|
||||
|
|
@ -25,15 +24,22 @@ struct IkarusValue;
|
|||
/// \return True if the value is indeterminate, false otherwise.
|
||||
IKA_API bool ikarus_value_is_indeterminate(IkarusValue const * value);
|
||||
|
||||
// \brief Converts an entity value to a string.
|
||||
// \pre \li Must not be null.
|
||||
// \param value The entity value.
|
||||
// \return A string representation of the value or null if an error occurred.
|
||||
// \remark The returned value is a copy and owned by the caller.
|
||||
/// \brief Sets the indeterminate state of a value.
|
||||
/// \param value The value.
|
||||
/// \pre \li Must not be null.
|
||||
/// \param indeterminate The new indeterminate state.
|
||||
IKA_API void ikarus_value_set_indeterminate(IkarusValue * value, bool indeterminate);
|
||||
|
||||
/// \brief Converts an entity value to a string.
|
||||
/// \pre \li Must not be null.
|
||||
/// \param value The entity value.
|
||||
/// \return A string representation of the value or null if an error occurred.
|
||||
/// \remark The returned value is owned by the caller.
|
||||
IKA_API char const * ikarus_value_to_string(IkarusValue const * value);
|
||||
|
||||
/// \brief Visits an entity value, calling the appropriate function for the value's type.
|
||||
/// \param value The entity value to visit.
|
||||
/// \pre \li Must not be null.
|
||||
/// \param toggle_visitor The function to call if the value is a toggle value. Skipped if null.
|
||||
/// \param number_visitor The function to call if the value is a number value. Skipped if null.
|
||||
/// \param text_visitor The function to call if the value is a text value. Skipped if null.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue