libdom
Loading...
Searching...
No Matches
attr.h
Go to the documentation of this file.
1/*
2 * This file is part of libdom.
3 * Licensed under the MIT License,
4 * http://www.opensource.org/licenses/mit-license.php
5 * Copyright 2007 John-Mark Bell <jmb@netsurf-browser.org>
6 */
7
8#ifndef dom_internal_core_attr_h_
9#define dom_internal_core_attr_h_
10
11#include <dom/core/attr.h>
12
13struct dom_document;
14struct dom_type_info;
15
17 dom_string *name, dom_string *namespace,
18 dom_string *prefix, bool specified,
19 struct dom_attr **result);
20void _dom_attr_destroy(struct dom_attr *attr);
22 struct dom_document *doc, dom_string *name,
23 dom_string *namespace, dom_string *prefix,
24 bool specified, struct dom_attr **result);
25void _dom_attr_finalise(struct dom_attr *attr);
26
27/* Virtual functions for dom_attr */
29 dom_string **result);
30dom_exception _dom_attr_get_specified(struct dom_attr *attr, bool *result);
32 dom_string **result);
34 dom_string *value);
36 struct dom_element **result);
38 struct dom_type_info **result);
39dom_exception _dom_attr_is_id(struct dom_attr *attr, bool *result);
40
41#define DOM_ATTR_VTABLE \
42 _dom_attr_get_name, \
43 _dom_attr_get_specified, \
44 _dom_attr_get_value, \
45 _dom_attr_set_value, \
46 _dom_attr_get_owner, \
47 _dom_attr_get_schema_type_info, \
48 _dom_attr_is_id
49
50/* Overloading dom_node functions */
52 dom_string **result);
54 dom_node_internal **result);
56 dom_string *prefix);
59 dom_string *namespace, dom_string **result);
61 dom_string *namespace, bool *result);
63 dom_string *prefix, dom_string **result);
64#define DOM_NODE_VTABLE_ATTR \
65 _dom_node_try_destroy, \
66 _dom_node_get_node_name, \
67 _dom_attr_get_node_value, /*overload*/\
68 _dom_node_set_node_value, \
69 _dom_node_get_node_type, \
70 _dom_node_get_parent_node, \
71 _dom_node_get_child_nodes, \
72 _dom_node_get_first_child, \
73 _dom_node_get_last_child, \
74 _dom_node_get_previous_sibling, \
75 _dom_node_get_next_sibling, \
76 _dom_node_get_attributes, \
77 _dom_node_get_owner_document, \
78 _dom_node_insert_before, \
79 _dom_node_replace_child, \
80 _dom_node_remove_child, \
81 _dom_node_append_child, \
82 _dom_node_has_child_nodes, \
83 _dom_attr_clone_node, /*overload*/\
84 _dom_node_normalize, \
85 _dom_node_is_supported, \
86 _dom_node_get_namespace, \
87 _dom_node_get_prefix, \
88 _dom_attr_set_prefix, /*overload*/\
89 _dom_node_get_local_name, \
90 _dom_node_has_attributes, \
91 _dom_node_get_base, \
92 _dom_node_compare_document_position, \
93 _dom_node_get_text_content, \
94 _dom_node_set_text_content, \
95 _dom_node_is_same, \
96 _dom_attr_lookup_prefix, /*overload*/\
97 _dom_attr_is_default_namespace, /*overload*/\
98 _dom_attr_lookup_namespace, /*overload*/\
99 _dom_node_is_equal, \
100 _dom_node_get_feature, \
101 _dom_node_set_user_data, \
102 _dom_node_get_user_data
103
104/* The protected virtual functions */
107 dom_node_internal **copy);
108
109#define DOM_ATTR_PROTECT_VTABLE \
110 __dom_attr_destroy, \
111 _dom_attr_copy
112
113
114void _dom_attr_set_isid(struct dom_attr *attr, bool is_id);
115void _dom_attr_set_specified(struct dom_attr *attr, bool specified);
116bool _dom_attr_readonly(const dom_attr *a);
117
118#endif
dom_exception
Definition exceptions.h:24
dom_exception _dom_attr_initialise(struct dom_attr *a, struct dom_document *doc, dom_string *name, dom_string *namespace, dom_string *prefix, bool specified, struct dom_attr **result)
Definition attr.c:129
dom_exception _dom_attr_lookup_namespace(dom_node_internal *node, dom_string *prefix, dom_string **result)
Definition attr.c:743
dom_exception _dom_attr_get_schema_type_info(struct dom_attr *attr, struct dom_type_info **result)
Definition attr.c:632
void _dom_attr_finalise(struct dom_attr *attr)
Definition attr.c:159
dom_exception _dom_attr_get_value(struct dom_attr *attr, dom_string **result)
Definition attr.c:441
dom_exception _dom_attr_is_default_namespace(dom_node_internal *node, dom_string *namespace, bool *result)
Definition attr.c:723
dom_exception _dom_attr_get_node_value(dom_node_internal *node, dom_string **result)
Definition attr.c:659
void _dom_attr_set_isid(struct dom_attr *attr, bool is_id)
Definition attr.c:815
dom_exception _dom_attr_get_name(struct dom_attr *attr, dom_string **result)
Definition attr.c:409
void _dom_attr_set_specified(struct dom_attr *attr, bool specified)
Definition attr.c:826
dom_exception _dom_attr_get_specified(struct dom_attr *attr, bool *result)
Definition attr.c:423
dom_exception _dom_attr_set_value(struct dom_attr *attr, dom_string *value)
Definition attr.c:534
void _dom_attr_destroy(struct dom_attr *attr)
Definition attr.c:177
dom_exception _dom_attr_is_id(struct dom_attr *attr, bool *result)
Definition attr.c:648
bool _dom_attr_readonly(const dom_attr *a)
Definition attr.c:837
dom_exception _dom_attr_normalize(dom_node_internal *node)
dom_exception _dom_attr_set_prefix(dom_node_internal *node, dom_string *prefix)
Definition attr.c:693
dom_exception _dom_attr_create(struct dom_document *doc, dom_string *name, dom_string *namespace, dom_string *prefix, bool specified, struct dom_attr **result)
Definition attr.c:89
dom_exception _dom_attr_copy(dom_node_internal *old, dom_node_internal **copy)
Definition attr.c:773
dom_exception _dom_attr_clone_node(dom_node_internal *node, bool deep, dom_node_internal **result)
Definition attr.c:669
dom_exception _dom_attr_get_owner(struct dom_attr *attr, struct dom_element **result)
Definition attr.c:608
dom_exception _dom_attr_lookup_prefix(dom_node_internal *node, dom_string *namespace, dom_string **result)
Definition attr.c:703
void __dom_attr_destroy(dom_node_internal *node)
Definition attr.c:767
Definition attr.c:31
Definition document.h:43
Definition element.h:29
Definition node.h:54
Definition string.h:19
Definition typeinfo.c:14