TMLArray
typedef struct TMLArray{
u32 first;
u32 count;
}TMLArray;
typedef struct TMLArray{
u32 first;
u32 count;
}TMLArray;
typedef struct TMLF64Slice{
f64 const *data;
u32 count;
}TMLF64Slice;
typedef struct TMLI64Slice{
i64 const *data;
u32 count;
}TMLI64Slice;
typedef struct TMLString{
char const *data;
u32 size;
}TMLString;
typedef struct TMLStringSlice{
TMLString const *data;
u32 count;
}TMLStringSlice;
typedef enum TMLValueType{
TML_VALUE_BOOL,
TML_VALUE_I64,
TML_VALUE_F64,
TML_VALUE_STRING,
TML_VALUE_ARRAY_I64,
TML_VALUE_ARRAY_F64,
TML_VALUE_ARRAY_STRING
}TMLValueType;
Retrieve a boolean value from an entry.
X_TML_API int tml_entry_get_bool(
TMLEntry const *entry,
u8 *out_value
);
Non-zero on success, 0 if the entry is NULL or not a boolean.
Retrieve a double-precision floating point value from an entry.
X_TML_API int tml_entry_get_f64(
TMLEntry const *entry,
f64 *out_value
);
Non-zero on success, 0 if the entry is NULL or not a float.
Retrieve an f64 array slice from an entry.
X_TML_API int tml_entry_get_f64_array(
TMLDocument const *doc,
TMLEntry const *entry,
TMLF64Slice *out_value
);
TMLDocument const *docTMLEntry const *entryTMLF64Slice *out_valueNon-zero on success, 0 if the entry is NULL or not an f64 array.
Retrieve a signed 64-bit integer value from an entry.
X_TML_API int tml_entry_get_i64(
TMLEntry const *entry,
i64 *out_value
);
Non-zero on success, 0 if the entry is NULL or not an integer.
Retrieve an i64 array slice from an entry.
X_TML_API int tml_entry_get_i64_array(
TMLDocument const *doc,
TMLEntry const *entry,
TMLI64Slice *out_value
);
TMLDocument const *docTMLEntry const *entryTMLI64Slice *out_valueNon-zero on success, 0 if the entry is NULL or not an i64 array.
Retrieve a string value from an entry.
X_TML_API int tml_entry_get_string(
TMLEntry const *entry,
TMLString *out_value
);
Non-zero on success, 0 if the entry is NULL or not a string.
Retrieve a string array slice from an entry.
X_TML_API int tml_entry_get_string_array(
TMLDocument const *doc,
TMLEntry const *entry,
TMLStringSlice *out_value
);
TMLDocument const *docTMLEntry const *entryTMLStringSlice *out_valueNon-zero on success, 0 if the entry is NULL or not a string array.