libdom
Loading...
Searching...
No Matches
namednodemap.h File Reference
#include <dom/core/exceptions.h>
#include <dom/core/string.h>
#include <dom/inttypes.h>

Go to the source code of this file.

Macros

#define dom_namednodemap_get_named_item(m, n, r)
 
#define dom_namednodemap_set_named_item(m, a, n)
 
#define dom_namednodemap_remove_named_item(m, n, r)
 
#define dom_namednodemap_item(m, i, n)
 
#define dom_namednodemap_get_named_item_ns(m, n, l, r)
 
#define dom_namednodemap_set_named_item_ns(m, a, n)
 
#define dom_namednodemap_remove_named_item_ns(m, n, l, r)
 

Typedefs

typedef struct dom_namednodemap dom_namednodemap
 

Functions

void dom_namednodemap_ref (struct dom_namednodemap *map)
 
void dom_namednodemap_unref (struct dom_namednodemap *map)
 
dom_exception dom_namednodemap_get_length (struct dom_namednodemap *map, dom_ulong *length)
 
dom_exception _dom_namednodemap_get_named_item (struct dom_namednodemap *map, dom_string *name, struct dom_node **node)
 
dom_exception _dom_namednodemap_set_named_item (struct dom_namednodemap *map, struct dom_node *arg, struct dom_node **node)
 
dom_exception _dom_namednodemap_remove_named_item (struct dom_namednodemap *map, dom_string *name, struct dom_node **node)
 
dom_exception _dom_namednodemap_item (struct dom_namednodemap *map, dom_ulong index, struct dom_node **node)
 
dom_exception _dom_namednodemap_get_named_item_ns (struct dom_namednodemap *map, dom_string *namespace, dom_string *localname, struct dom_node **node)
 
dom_exception _dom_namednodemap_set_named_item_ns (struct dom_namednodemap *map, struct dom_node *arg, struct dom_node **node)
 
dom_exception _dom_namednodemap_remove_named_item_ns (struct dom_namednodemap *map, dom_string *namespace, dom_string *localname, struct dom_node **node)
 

Macro Definition Documentation

◆ dom_namednodemap_get_named_item

#define dom_namednodemap_get_named_item ( m,
n,
r )
Value:
(n), (dom_node **) (r))
dom_exception _dom_namednodemap_get_named_item(struct dom_namednodemap *map, dom_string *name, struct dom_node **node)
Definition namednodemap.c:137
Definition namednodemap.c:26
Definition node.h:79

◆ dom_namednodemap_get_named_item_ns

#define dom_namednodemap_get_named_item_ns ( m,
n,
l,
r )
Value:
(n), (l), (dom_node **) (r))
dom_exception _dom_namednodemap_get_named_item_ns(struct dom_namednodemap *map, dom_string *namespace, dom_string *localname, struct dom_node **node)
Definition namednodemap.c:234

◆ dom_namednodemap_item

#define dom_namednodemap_item ( m,
i,
n )
Value:
(dom_namednodemap *) (m), (uint32_t) (i), \
(dom_node **) (n))
dom_exception _dom_namednodemap_item(struct dom_namednodemap *map, dom_ulong index, struct dom_node **node)
Definition namednodemap.c:211

◆ dom_namednodemap_remove_named_item

#define dom_namednodemap_remove_named_item ( m,
n,
r )
Value:
(n), (dom_node **) (r))
dom_exception _dom_namednodemap_remove_named_item(struct dom_namednodemap *map, dom_string *name, struct dom_node **node)
Definition namednodemap.c:189

◆ dom_namednodemap_remove_named_item_ns

#define dom_namednodemap_remove_named_item_ns ( m,
n,
l,
r )
Value:
(dom_namednodemap *) (m), (n),(l), (dom_node **) (r))
dom_exception _dom_namednodemap_remove_named_item_ns(struct dom_namednodemap *map, dom_string *namespace, dom_string *localname, struct dom_node **node)
Definition namednodemap.c:299

◆ dom_namednodemap_set_named_item

#define dom_namednodemap_set_named_item ( m,
a,
n )
Value:
(dom_node *) (a), (dom_node **) (n))
dom_exception _dom_namednodemap_set_named_item(struct dom_namednodemap *map, struct dom_node *arg, struct dom_node **node)
Definition namednodemap.c:168

◆ dom_namednodemap_set_named_item_ns

#define dom_namednodemap_set_named_item_ns ( m,
a,
n )
Value:
(dom_node *) (a), (dom_node **) (n))
dom_exception _dom_namednodemap_set_named_item_ns(struct dom_namednodemap *map, struct dom_node *arg, struct dom_node **node)
Definition namednodemap.c:272

Typedef Documentation

◆ dom_namednodemap

typedef struct dom_namednodemap dom_namednodemap

Function Documentation

◆ _dom_namednodemap_get_named_item()

dom_exception _dom_namednodemap_get_named_item ( dom_namednodemap * map,
dom_string * name,
dom_node ** node )

Retrieve an item by name from a named node map

Parameters
mapThe map to retrieve the item from
nameThe name of the item to retrieve
nodePointer to location to receive item
Returns
DOM_NO_ERR.

The returned node will have had its reference count increased. The client should unref the node once it has finished with it.

◆ _dom_namednodemap_get_named_item_ns()

dom_exception _dom_namednodemap_get_named_item_ns ( dom_namednodemap * map,
dom_string * namespace,
dom_string * localname,
dom_node ** node )

Retrieve an item by namespace/localname from a named node map

Parameters
mapThe map to retrieve the item from
namespaceThe namespace URI of the item to retrieve
localnameThe local name of the node to retrieve
nodePointer to location to receive item
Returns
DOM_NO_ERR on success, DOM_NOT_SUPPORTED_ERR if the implementation does not support the feature "XML" and the language exposed through the Document does not support Namespaces.

The returned node will have had its reference count increased. The client should unref the node once it has finished with it.

◆ _dom_namednodemap_item()

dom_exception _dom_namednodemap_item ( dom_namednodemap * map,
dom_ulong index,
dom_node ** node )

Retrieve an item from a named node map

Parameters
mapThe map to retrieve the item from
indexThe map index to retrieve
nodePointer to location to receive item
Returns
DOM_NO_ERR.

::index is a zero-based index into ::map. ::index lies in the range [0, length-1]

The returned node will have had its reference count increased. The client should unref the node once it has finished with it.

◆ _dom_namednodemap_remove_named_item()

dom_exception _dom_namednodemap_remove_named_item ( dom_namednodemap * map,
dom_string * name,
dom_node ** node )

Remove an item by name from a named node map

Parameters
mapThe map to remove from
nameThe name of the item to remove
nodePointer to location to receive removed item
Returns
DOM_NO_ERR on success, DOM_NOT_FOUND_ERR if there is no node named ::name in ::map, DOM_NO_MODIFICATION_ALLOWED_ERR if ::map is readonly.

The returned node will have had its reference count increased. The client should unref the node once it has finished with it.

◆ _dom_namednodemap_remove_named_item_ns()

dom_exception _dom_namednodemap_remove_named_item_ns ( dom_namednodemap * map,
dom_string * namespace,
dom_string * localname,
dom_node ** node )

Remove an item by namespace/localname from a named node map

Parameters
mapThe map to remove from
namespaceThe namespace URI of the item to remove
localnameThe local name of the item to remove
nodePointer to location to receive removed item
Returns
DOM_NO_ERR on success, DOM_NOT_FOUND_ERR if there is no node named ::name in ::map, DOM_NO_MODIFICATION_ALLOWED_ERR if ::map is readonly. DOM_NOT_SUPPORTED_ERR if the implementation does not support the feature "XML" and the language exposed through the Document does not support Namespaces.

The returned node will have had its reference count increased. The client should unref the node once it has finished with it.

◆ _dom_namednodemap_set_named_item()

dom_exception _dom_namednodemap_set_named_item ( dom_namednodemap * map,
dom_node * arg,
dom_node ** node )

Add a node to a named node map, replacing any matching existing node

Parameters
mapThe map to add to
argThe node to add
nodePointer to location to receive replaced node
Returns
DOM_NO_ERR on success, DOM_WRONG_DOCUMENT_ERR if ::arg was created from a different document than ::map, DOM_NO_MODIFICATION_ALLOWED_ERR if ::map is readonly, DOM_INUSE_ATTRIBUTE_ERR if ::arg is an Attr that is already an attribute on another Element, DOM_HIERARCHY_REQUEST_ERR if the type of ::arg is not permitted as a member of ::map.

::arg's nodeName attribute will be used to store it in ::map. It will be accessible using the nodeName attribute as the key for lookup.

Replacing a node by itself has no effect.

The returned node will have had its reference count increased. The client should unref the node once it has finished with it.

◆ _dom_namednodemap_set_named_item_ns()

dom_exception _dom_namednodemap_set_named_item_ns ( dom_namednodemap * map,
dom_node * arg,
dom_node ** node )

Add a node to a named node map, replacing any matching existing node

Parameters
mapThe map to add to
argThe node to add
nodePointer to location to receive replaced node
Returns
DOM_NO_ERR on success, DOM_WRONG_DOCUMENT_ERR if ::arg was created from a different document than ::map, DOM_NO_MODIFICATION_ALLOWED_ERR if ::map is readonly, DOM_INUSE_ATTRIBUTE_ERR if ::arg is an Attr that is already an attribute on another Element, DOM_HIERARCHY_REQUEST_ERR if the type of ::arg is not permitted as a member of ::map. DOM_NOT_SUPPORTED_ERR if the implementation does not support the feature "XML" and the language exposed through the Document does not support Namespaces.

::arg's namespaceURI and localName attributes will be used to store it in ::map. It will be accessible using the namespaceURI and localName attributes as the keys for lookup.

Replacing a node by itself has no effect.

The returned node will have had its reference count increased. The client should unref the node once it has finished with it.

◆ dom_namednodemap_get_length()

dom_exception dom_namednodemap_get_length ( dom_namednodemap * map,
dom_ulong * length )

Retrieve the length of a named node map

Parameters
mapMap to retrieve length of
lengthPointer to location to receive length
Returns
DOM_NO_ERR.

◆ dom_namednodemap_ref()

void dom_namednodemap_ref ( dom_namednodemap * map)

Claim a reference on a DOM named node map

Parameters
mapThe map to claim a reference on

◆ dom_namednodemap_unref()

void dom_namednodemap_unref ( dom_namednodemap * map)

Release a reference on a DOM named node map

Parameters
mapThe map to release the reference from

If the reference count reaches zero, any memory claimed by the map will be released