xs/tree.xs

filter: Statementstmt 7.6% 1 / 13 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub n/a Podpod n/a totaltotal 7.6% 1 / 13 CC 0 SCAR 0
CC
0
Cov
0%
CRAP 0
« MyHTML.xs ↑ Summary blib/lib/HTML/MyHTML.pm »
1 #/*
2 # Copyright 2015-2016 Alexander Borisov
3 #
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
7 #
8 # http://www.apache.org/licenses/LICENSE-2.0
9 #
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
15 #
16 # Author: lex.borisov@gmail.com (Alexander Borisov)
17 #*/
18  
19 MODULE = HTML::MyHTML::Tree PACKAGE = HTML::MyHTML::Tree
20 PROTOTYPES: DISABLE
21  
22 #=sort 1
23  
24 myhtml_status_t
25 init(tree, myhtml)
26 HTML::MyHTML::Tree tree;
27 HTML::MyHTML myhtml;
28
29 CODE:
30 0 RETVAL = myhtml_tree_init(tree, myhtml);
31 OUTPUT:
32 RETVAL
33  
34 #=sort 2
35  
36 void
37 clean(tree)
38 HTML::MyHTML::Tree tree;
39
40 CODE:
41 0 myhtml_tree_clean(tree);
42  
43 #=sort 3
44  
45 HTML::MyHTML::Tree
46 destroy(tree)
47 HTML::MyHTML::Tree tree;
48
49 CODE:
50 1 RETVAL = myhtml_tree_destroy(tree);
51 OUTPUT:
52 RETVAL
53  
54 #=sort 4
55  
56 HTML::MyHTML
57 get_myhtml(tree)
58 HTML::MyHTML::Tree tree;
59
60 CODE:
61 0 RETVAL = myhtml_tree_get_myhtml(tree);
62 OUTPUT:
63 RETVAL
64  
65 #=sort 5
66  
67 HTML::MyHTML::Tag
68 get_tag(tree)
69 HTML::MyHTML::Tree tree;
70
71 CODE:
72 0 RETVAL = myhtml_tree_get_tag(tree);
73 OUTPUT:
74 RETVAL
75  
76 #=sort 6
77  
78 HTML::MyHTML::Tag::Index
79 get_tag_index(tree)
80 HTML::MyHTML::Tree tree;
81
82 CODE:
83 0 RETVAL = myhtml_tree_get_tag_index(tree);
84 OUTPUT:
85 RETVAL
86  
87 #=sort 7
88  
89 HTML::MyHTML::Tree::Node
90 document(tree)
91 HTML::MyHTML::Tree tree;
92
93 CODE:
94 0 RETVAL = myhtml_tree_get_document(tree);
95 OUTPUT:
96 RETVAL
97  
98 #=sort 8
99  
100 mchar_async_t*
101 get_mchar(tree)
102 HTML::MyHTML::Tree tree;
103
104 CODE:
105 0 RETVAL = myhtml_tree_get_mchar(tree);
106 OUTPUT:
107 RETVAL
108  
109 #=sort 9
110  
111 size_t
112 get_mchar_node_id(tree)
113 HTML::MyHTML::Tree tree;
114
115 CODE:
116 0 RETVAL = myhtml_tree_get_mchar_node_id(tree);
117 OUTPUT:
118 RETVAL
119  
120 #=sort 10
121  
122 SV*
123 get_elements_by_tag_id(tree, tag_id)
124 HTML::MyHTML::Tree tree;
125 myhtml_tag_id_t tag_id;
126
127 CODE:
128 0 RETVAL = newRV_noinc((SV *)sm_get_elements_by_tag_id(tree, tag_id));
129 OUTPUT:
130 RETVAL
131  
132 #=sort 11
133  
134 SV*
135 get_elements_by_tag_name(tree, tag_name)
136 HTML::MyHTML::Tree tree;
137 SV* tag_name;
138
139 PREINIT:
140 STRLEN len;
141 CODE:
142 0 const char *char_tag_name = SvPV(tag_name, len);
143
144 0 myhtml_tag_id_t tag_id = myhtml_tag_id_by_name(tree, char_tag_name, len);
145 0 RETVAL = newRV_noinc((SV *)sm_get_elements_by_tag_id(tree, tag_id));
146 OUTPUT:
147 RETVAL
148  
149  
« MyHTML.xs ↑ Summary blib/lib/HTML/MyHTML.pm »