MCPcopy Create free account
hub / github.com/acl-dev/acl / first_attr

Method first_attr

lib_acl_cpp/src/stdlib/xml2.cpp:79–99  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

77}
78
79const xml_attr* xml2_node::first_attr() const
80{
81 ACL_ARRAY* a = node_->attr_list;
82 if (a == NULL) {
83 return NULL;
84 }
85
86 if (attr_iter_ == NULL) {
87 const_cast<xml2_node*>(this)->attr_iter_ =
88 (ACL_ITER*) acl_mymalloc(sizeof(ACL_ITER));
89 }
90
91 ACL_XML2_ATTR* attr = (ACL_XML2_ATTR*) a->iter_head(attr_iter_, a);
92 if (attr == NULL) {
93 return NULL;
94 }
95
96 xml2_attr* xa = NEW xml2_attr(const_cast<xml2_node*>(this), attr);
97 const_cast<xml2_node*>(this)->attrs_tmp_.push_back(xa);
98 return xa;
99}
100
101const xml_attr* xml2_node::next_attr() const
102{

Callers 6

testFunction · 0.45
node_attr_printFunction · 0.45
testFunction · 0.45
node_attr_printFunction · 0.45
print_attrsFunction · 0.45
doXmlMethod · 0.45

Calls 1

push_backMethod · 0.45

Tested by

no test coverage detected