LayOut C API

- Main Page
- Related Pages
- Data Structures
- Files

- File List
- Globals

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Enumerations | Functions
typed_value.h File Reference
`#include <LayOutAPI/common.h>`
`#include <LayOutAPI/model/defs.h>`

Go to the source code of this file.

## Enumerations
enum | LOTypedValueType { LOTypedValueType_Empty = 0, LOTypedValueType_Bool, LOTypedValueType_Int32, LOTypedValueType_Double, LOTypedValueType_String, LOTypedValueType_Dictionary, LONumTypedValueTypes }
| Defines the set of types that a LOTypedValueRef can represent. More...

## Functions
LO_RESULT | LOTypedValueCreate (LOTypedValueRef *typed_value)
| Creates a new typed value object. More...
LO_RESULT | LOTypedValueRelease (LOTypedValueRef *typed_value)
| Releases a typed value object. *typed_value will be set to invalid by this function. More...
LO_RESULT | LOTypedValueGetType (LOTypedValueRef typed_value, LOTypedValueType *type)
| Gets the type of value stored by a typed value object. More...
LO_RESULT | LOTypedValueGetBool (LOTypedValueRef typed_value, bool *bool_value)
| Gets the boolean value of a typed value object. More...
LO_RESULT | LOTypedValueSetBool (LOTypedValueRef typed_value, bool bool_value)
| Sets the boolean value of a typed value object. More...
LO_RESULT | LOTypedValueGetInt32 (LOTypedValueRef typed_value, int32_t *int32_value)
| Gets the int32 value of a typed value object. More...
LO_RESULT | LOTypedValueSetInt32 (LOTypedValueRef typed_value, int32_t int32_value)
| Sets the int32 value of a typed value object. More...
LO_RESULT | LOTypedValueGetDouble (LOTypedValueRef typed_value, double *double_value)
| Gets the double value of a typed value object. More...
LO_RESULT | LOTypedValueSetDouble (LOTypedValueRef typed_value, double double_value)
| Sets the double value of a typed value object. More...
LO_RESULT | LOTypedValueGetString (LOTypedValueRef typed_value, SUStringRef *out_string)
| Gets a string value from the typed value object. More...
LO_RESULT | LOTypedValueSetString (LOTypedValueRef typed_value, const char *string)
| Sets the value of typed_value to the given string. More...
LO_RESULT | LOTypedValueGetDictionary (LOTypedValueRef typed_value, LODictionaryRef *out_dictionary)
| Gets a dictionary from the typed value object. More...
LO_RESULT | LOTypedValueSetDictionary (LOTypedValueRef typed_value, LODictionaryRef dictionary)
| Sets the value of typed_value to the given dictionary. More...

## Enumeration Type Documentation

enum LOTypedValueType

Defines the set of types that a LOTypedValueRef can represent.

Enumerator
LOTypedValueType_Empty |
LOTypedValueType_Bool |
LOTypedValueType_Int32 |
LOTypedValueType_Double |
LOTypedValueType_String |
LOTypedValueType_Dictionary |
LONumTypedValueTypes |

## Function Documentation

LO_RESULT LOTypedValueCreate | ( | LOTypedValueRef * | typed_value | ) |

Creates a new typed value object.

Parameters

  [out] | typed_value | The created typed value object.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_NULL_POINTER_OUTPUT if typed_value is NULL
  - SU_ERROR_OVERWRITE_VALID if *typed_value already refers to a valid object

LO_RESULT LOTypedValueGetBool | ( | LOTypedValueRef | typed_value,
|  | bool * | bool_value
| ) |  |

Gets the boolean value of a typed value object.

Parameters

  [in] | typed_value | The typed value object.
  [out] | bool_value | The boolean value.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if typed_value is not a valid object
  - SU_ERROR_NULL_POINTER_OUTPUT if bool_value is NULL
  - SU_ERROR_NO_DATA if typed_value is not of the requested type

LO_RESULT LOTypedValueGetDictionary | ( | LOTypedValueRef | typed_value,
|  | LODictionaryRef * | out_dictionary
| ) |  |

Gets a dictionary from the typed value object.

Since
  LayOut 2026.0, API 11.0

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if typed_value does not refer to a valid object
  - SU_ERROR_NO_DATA if the typed value does not contain a dictionary
  - SU_ERROR_NULL_POINTER_OUTPUT if out_string is NULL
  - SU_ERROR_INVALID_OUTPUT if out_string does not refer to a valid object

LO_RESULT LOTypedValueGetDouble | ( | LOTypedValueRef | typed_value,
|  | double * | double_value
| ) |  |

Gets the double value of a typed value object.

Parameters

  [in] | typed_value | The typed value object.
  [out] | double_value | The double value.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if typed_value is not a valid object
  - SU_ERROR_NULL_POINTER_OUTPUT if double_value is NULL
  - SU_ERROR_NO_DATA if typed_value is not of the requested type

LO_RESULT LOTypedValueGetInt32 | ( | LOTypedValueRef | typed_value,
|  | int32_t * | int32_value
| ) |  |

Gets the int32 value of a typed value object.

Parameters

  [in] | typed_value | The typed value object.
  [out] | int32_value | The int32 value.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if typed_value is not a valid object
  - SU_ERROR_NULL_POINTER_OUTPUT if int32_value is NULL
  - SU_ERROR_NO_DATA if typed_value is not of the requested type

LO_RESULT LOTypedValueGetString | ( | LOTypedValueRef | typed_value,
|  | SUStringRef * | out_string
| ) |  |

Gets a string value from the typed value object.

Since
  LayOut 2018, API 3.0

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if typed_value does not refer to a valid object
  - SU_ERROR_NO_DATA if the typed value does not contain a string
  - SU_ERROR_NULL_POINTER_OUTPUT if out_string is NULL
  - SU_ERROR_INVALID_OUTPUT if out_string does not refer to a valid object

LO_RESULT LOTypedValueGetType | ( | LOTypedValueRef | typed_value,
|  | LOTypedValueType * | type
| ) |  |

Gets the type of value stored by a typed value object.

Parameters

  [in] | typed_value | The typed value object.
  [out] | type | The type of value stored by typed_value.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if type_value is not a valid object
  - SU_ERROR_NULL_POINTER_OUTPUT if type is NULL

LO_RESULT LOTypedValueRelease | ( | LOTypedValueRef * | typed_value | ) |

Releases a typed value object. *typed_value will be set to invalid by this function.

Parameters

  [in] | typed_value | The typed value object.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_NULL_POINTER_INPUT if typed_value is NULL
  - SU_ERROR_INVALID_INPUT if *typed_value references an invalid object

LO_RESULT LOTypedValueSetBool | ( | LOTypedValueRef | typed_value,
|  | bool | bool_value
| ) |  |

Sets the boolean value of a typed value object.

Parameters

  [in] | typed_value | The typed value object.
  [in] | bool_value | The boolean value to set.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if typed_value is not a valid object

LO_RESULT LOTypedValueSetDictionary | ( | LOTypedValueRef | typed_value,
|  | LODictionaryRef | dictionary
| ) |  |

Sets the value of typed_value to the given dictionary.

Since
  LayOut 2026.0, API 11.0

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if typed_value is not a valid object

LO_RESULT LOTypedValueSetDouble | ( | LOTypedValueRef | typed_value,
|  | double | double_value
| ) |  |

Sets the double value of a typed value object.

Parameters

  [in] | typed_value | The typed value object.
  [in] | double_value | The double value to set.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if typed_value is not a valid object

LO_RESULT LOTypedValueSetInt32 | ( | LOTypedValueRef | typed_value,
|  | int32_t | int32_value
| ) |  |

Sets the int32 value of a typed value object.

Parameters

  [in] | typed_value | The typed value object.
  [in] | int32_value | The int32 value to set.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if typed_value is not a valid object

LO_RESULT LOTypedValueSetString | ( | LOTypedValueRef | typed_value,
|  | const char * | string
| ) |  |

Sets the value of typed_value to the given string.

Since
  LayOut 2018, API 3.0

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if typed_value is not a valid object
  - SU_ERROR_NULL_POINTER_INPUT if string is NULL