Go to the source code of this file.
|
void | dom_tokenlist_ref (struct dom_tokenlist *list) |
|
void | dom_tokenlist_unref (struct dom_tokenlist *list) |
|
dom_exception | dom_tokenlist_create (struct dom_element *ele, struct dom_string *attr, dom_tokenlist **list) |
|
dom_exception | dom_tokenlist_get_length (struct dom_tokenlist *list, uint32_t *length) |
|
dom_exception | _dom_tokenlist_item (struct dom_tokenlist *list, uint32_t index, struct dom_string **value) |
|
dom_exception | dom_tokenlist_get_value (struct dom_tokenlist *list, struct dom_string **value) |
|
dom_exception | dom_tokenlist_set_value (struct dom_tokenlist *list, struct dom_string *value) |
|
dom_exception | dom_tokenlist_contains (struct dom_tokenlist *list, struct dom_string *value, bool *contains) |
|
dom_exception | dom_tokenlist_add (struct dom_tokenlist *list, struct dom_string *value) |
|
dom_exception | dom_tokenlist_remove (struct dom_tokenlist *list, struct dom_string *value) |
|
◆ dom_tokenlist_item
#define dom_tokenlist_item |
( |
| l, |
|
|
| i, |
|
|
| n ) |
Value:
dom_exception _dom_tokenlist_item(struct dom_tokenlist *list, uint32_t index, struct dom_string **value)
Definition tokenlist.c:404
Definition tokenlist.c:28
◆ dom_tokenlist
typedef struct dom_tokenlist dom_tokenlist |
◆ _dom_tokenlist_item()
Get a particular item from the tokenlist
- Parameters
-
list | The list to retrieve the item from |
index | The index of the item to retrieve |
value | The value of the item returns here |
- Returns
- DOM_NO_ERR on success, otherwise the failure code
◆ dom_tokenlist_add()
Add the given value to the tokenlist
- Parameters
-
list | The list to add to |
value | The value to add |
- Returns
- DOM_NO_ERR on success, otherwise the failure code
◆ dom_tokenlist_contains()
Check if the given value is in the tokenlist
- Parameters
-
list | The list to scan for the given value |
value | The value to look for in the token list |
contains | This will be set based on whether or not the value is present |
- Returns
- DOM_NO_ERR on success, otherwise the failure code
◆ dom_tokenlist_create()
Create a tokenlist
- Parameters
-
ele | The element which owns the tokenlist attribute |
attr | The name of the attribute we are treating as a tokenlist |
list | The tokenlist output which is set on success |
- Returns
- DOM_NO_ERR on success, DOM_NO_MEM_ERR on memory exhaustion
The returned list will already be referenced, so the client need not do so explicitly. The client must unref the list once finished with it.
This list will take its own references to ::ele and ::attr
◆ dom_tokenlist_get_length()
Get the length of the tokenlist
- Parameters
-
list | The list to get the length of |
length | Length of the list outputs here |
- Returns
- DOM_NO_ERR on success, otherwise the failure code
◆ dom_tokenlist_get_value()
Retrieve the value of the tokenlist as a string
- Parameters
-
list | The list to retrieve the value of |
value | The value of the list returns here |
- Returns
- DOM_NO_ERR on success, otherwise the failure code
◆ dom_tokenlist_ref()
Claim a ref on a tokenlist
- Parameters
-
list | The tokenlist to claim a ref on |
◆ dom_tokenlist_remove()
Remove the given value from the tokenlist
- Parameters
-
list | The list to remove from |
value | The value to remove |
- Returns
- DOM_NO_ERR on success, otherwise the failure code
◆ dom_tokenlist_set_value()
Set the value of the tokenlist as a string
- Parameters
-
list | The list to set the value of |
value | The value to set |
- Returns
- DOM_NO_ERR on success, otherwise the failure code
◆ dom_tokenlist_unref()
Release a ref on a tokenlist
- Parameters
-
list | The list to release the reference of |
If you release the last ref, this cleans up the tokenlist