Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
3584 | sourcerer | 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 |
||
6 | */ |
||
7 | |||
8 | #ifndef dom_internal_core_document_type_h_ |
||
9 | #define dom_internal_core_document_type_h_ |
||
10 | |||
11 | #include |
||
12 | |||
13 | struct dom_namednodemap; |
||
14 | |||
15 | /* Create a DOM document type */ |
||
16 | dom_exception _dom_document_type_create(dom_string *qname, |
||
17 | dom_string *public_id, |
||
18 | dom_string *system_id, |
||
19 | dom_document_type **doctype); |
||
20 | /* Destroy a document type */ |
||
21 | void _dom_document_type_destroy(dom_node_internal *doctypenode); |
||
22 | dom_exception _dom_document_type_initialise(dom_document_type *doctype, |
||
23 | dom_string *qname, dom_string *public_id, |
||
24 | dom_string *system_id); |
||
25 | void _dom_document_type_finalise(dom_document_type *doctype); |
||
26 | |||
27 | /* The virtual functions of DocumentType */ |
||
28 | dom_exception _dom_document_type_get_name(dom_document_type *doc_type, |
||
29 | dom_string **result); |
||
30 | dom_exception _dom_document_type_get_entities( |
||
31 | dom_document_type *doc_type, |
||
32 | struct dom_namednodemap **result); |
||
33 | dom_exception _dom_document_type_get_notations( |
||
34 | dom_document_type *doc_type, |
||
35 | struct dom_namednodemap **result); |
||
36 | dom_exception _dom_document_type_get_public_id( |
||
37 | dom_document_type *doc_type, |
||
38 | dom_string **result); |
||
39 | dom_exception _dom_document_type_get_system_id( |
||
40 | dom_document_type *doc_type, |
||
41 | dom_string **result); |
||
42 | dom_exception _dom_document_type_get_internal_subset( |
||
43 | dom_document_type *doc_type, |
||
44 | dom_string **result); |
||
45 | |||
46 | dom_exception _dom_document_type_get_text_content(dom_node_internal *node, |
||
47 | dom_string **result); |
||
48 | dom_exception _dom_document_type_set_text_content(dom_node_internal *node, |
||
49 | dom_string *content); |
||
50 | |||
51 | #define DOM_DOCUMENT_TYPE_VTABLE \ |
||
52 | _dom_document_type_get_name, \ |
||
53 | _dom_document_type_get_entities, \ |
||
54 | _dom_document_type_get_notations, \ |
||
55 | _dom_document_type_get_public_id, \ |
||
56 | _dom_document_type_get_system_id, \ |
||
57 | _dom_document_type_get_internal_subset |
||
58 | |||
59 | #define DOM_NODE_VTABLE_DOCUMENT_TYPE \ |
||
60 | _dom_node_try_destroy, \ |
||
61 | _dom_node_get_node_name, \ |
||
62 | _dom_node_get_node_value, \ |
||
63 | _dom_node_set_node_value, \ |
||
64 | _dom_node_get_node_type, \ |
||
65 | _dom_node_get_parent_node, \ |
||
66 | _dom_node_get_child_nodes, \ |
||
67 | _dom_node_get_first_child, \ |
||
68 | _dom_node_get_last_child, \ |
||
69 | _dom_node_get_previous_sibling, \ |
||
70 | _dom_node_get_next_sibling, \ |
||
71 | _dom_node_get_attributes, \ |
||
72 | _dom_node_get_owner_document, \ |
||
73 | _dom_node_insert_before, \ |
||
74 | _dom_node_replace_child, \ |
||
75 | _dom_node_remove_child, \ |
||
76 | _dom_node_append_child, \ |
||
77 | _dom_node_has_child_nodes, \ |
||
78 | _dom_node_clone_node, \ |
||
79 | _dom_node_normalize, \ |
||
80 | _dom_node_is_supported, \ |
||
81 | _dom_node_get_namespace, \ |
||
82 | _dom_node_get_prefix, \ |
||
83 | _dom_node_set_prefix, \ |
||
84 | _dom_node_get_local_name, \ |
||
85 | _dom_node_has_attributes, \ |
||
86 | _dom_node_get_base, \ |
||
87 | _dom_node_compare_document_position, \ |
||
88 | _dom_document_type_get_text_content, \ |
||
89 | _dom_document_type_set_text_content, \ |
||
90 | _dom_node_is_same, \ |
||
91 | _dom_node_lookup_prefix, \ |
||
92 | _dom_node_is_default_namespace, \ |
||
93 | _dom_node_lookup_namespace, \ |
||
94 | _dom_node_is_equal, \ |
||
95 | _dom_node_get_feature, \ |
||
96 | _dom_node_set_user_data, \ |
||
97 | _dom_node_get_user_data |
||
98 | |||
99 | /* Following comes the protected vtable */ |
||
100 | void _dom_dt_destroy(dom_node_internal *node); |
||
101 | dom_exception _dom_dt_copy(dom_node_internal *old, dom_node_internal **copy); |
||
102 | |||
103 | #define DOM_DT_PROTECT_VTABLE \ |
||
104 | _dom_dt_destroy, \ |
||
105 | _dom_dt_copy |
||
106 | |||
107 | #endif |