split property & values into separate classes and files
Signed-off-by: Folling <mail@folling.io>
This commit is contained in:
parent
424bd22aa5
commit
9e63219bf9
28 changed files with 700 additions and 269 deletions
44
include/ikarus/values/text_value.h
Normal file
44
include/ikarus/values/text_value.h
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue