Struct in stdx_tml.h

TMLArray

typedef struct TMLArray{
  u32 first;
  u32 count;
}TMLArray;
Struct in stdx_tml.h

TMLF64Slice

typedef struct TMLF64Slice{
  f64 const *data;
  u32 count;
}TMLF64Slice;
Struct in stdx_tml.h

TMLI64Slice

typedef struct TMLI64Slice{
  i64 const *data;
  u32 count;
}TMLI64Slice;
Struct in stdx_tml.h

TMLString

typedef struct TMLString{
  char const *data;
  u32 size;
}TMLString;
Struct in stdx_tml.h

TMLStringSlice

typedef struct TMLStringSlice{
  TMLString const *data;
  u32 count;
}TMLStringSlice;
Enum in stdx_tml.h

TMLValueType

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;
Function in stdx_tml.h

tml_entry_get_bool

Retrieve a boolean value from an entry.

X_TML_API int tml_entry_get_bool(
 TMLEntry const *entry,
 u8 *out_value
);

Parameters

TMLEntry const *entry
Pointer to the entry.
u8 *out_value
Output boolean value.

Returns

Non-zero on success, 0 if the entry is NULL or not a boolean.

Function in stdx_tml.h

tml_entry_get_f64

Retrieve a double-precision floating point value from an entry.

X_TML_API int tml_entry_get_f64(
 TMLEntry const *entry,
 f64 *out_value
);

Parameters

TMLEntry const *entry
Pointer to the entry.
f64 *out_value
Output floating point value.

Returns

Non-zero on success, 0 if the entry is NULL or not a float.

Function in stdx_tml.h

tml_entry_get_f64_array

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
);

Parameters

TMLDocument const *doc
Pointer to the parsed document.
TMLEntry const *entry
Pointer to the entry.
TMLF64Slice *out_value
Output array slice.

Returns

Non-zero on success, 0 if the entry is NULL or not an f64 array.

Function in stdx_tml.h

tml_entry_get_i64

Retrieve a signed 64-bit integer value from an entry.

X_TML_API int tml_entry_get_i64(
 TMLEntry const *entry,
 i64 *out_value
);

Parameters

TMLEntry const *entry
Pointer to the entry.
i64 *out_value
Output integer value.

Returns

Non-zero on success, 0 if the entry is NULL or not an integer.

Function in stdx_tml.h

tml_entry_get_i64_array

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
);

Parameters

TMLDocument const *doc
Pointer to the parsed document.
TMLEntry const *entry
Pointer to the entry.
TMLI64Slice *out_value
Output array slice.

Returns

Non-zero on success, 0 if the entry is NULL or not an i64 array.

Function in stdx_tml.h

tml_entry_get_string

Retrieve a string value from an entry.

X_TML_API int tml_entry_get_string(
 TMLEntry const *entry,
 TMLString *out_value
);

Parameters

TMLEntry const *entry
Pointer to the entry.
TMLString *out_value
Output string view.

Returns

Non-zero on success, 0 if the entry is NULL or not a string.

Function in stdx_tml.h

tml_entry_get_string_array

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
);

Parameters

TMLDocument const *doc
Pointer to the parsed document.
TMLEntry const *entry
Pointer to the entry.
TMLStringSlice *out_value
Output array slice.

Returns

Non-zero on success, 0 if the entry is NULL or not a string array.